SDKs & Libraries

Official SDKs for integrating with the AIDP API in your preferred language.

Available SDKs

For Node.js, browser, and TypeScript applications.

npm install @aidp/sdk

Features:

  • Full TypeScript support with type definitions

  • Promise-based async/await API

  • Automatic retry and error handling

  • Works in Node.js and browsers

  • Tree-shakeable for optimal bundle size


For Python 3.8+ applications.

pip install aidp-sdk

Features:

  • Type hints for better IDE support

  • Async/await support with asyncio

  • Automatic pagination

  • Built-in retry logic

  • Django and Flask integrations


For browser-only applications without build tools.

Features:

  • No build tools required

  • Works in all modern browsers

  • Lightweight (~15KB gzipped)

  • Promise-based API

  • CDN-hosted for fast loading


Quick Comparison

Feature
TypeScript/JS
Python
Vanilla JS

Environment

Node.js, Browser

Python 3.8+

Browser only

Installation

npm/yarn

pip

CDN script tag

Type Safety

✅ Full

✅ Type hints

❌ No

Async/Await

✅ Yes

✅ Yes

✅ Yes

Bundle Size

~25KB

N/A

~15KB

Tree Shaking

✅ Yes

N/A

❌ No


Common Features

All SDKs include:

Authentication

  • API key authentication

  • JWT token support

  • Automatic token refresh

Error Handling

  • Typed error responses

  • Automatic retry for transient errors

  • Rate limit handling

Request Features

  • Automatic pagination

  • Request cancellation

  • Timeout configuration

  • Custom headers

Response Features

  • Automatic JSON parsing

  • Type-safe responses

  • Error normalization


Getting Started

1. Get an API Key

  1. Navigate to Settings → API Keys

  2. Create a new API key

  3. Copy and store securely

2. Install SDK

Choose your preferred language and follow the installation guide:

3. Make Your First Request

TypeScript/JavaScript:

Python:

Vanilla JavaScript:


SDK Architecture

Client Initialization

All SDKs follow a similar initialization pattern:

Resource Organization

SDKs organize API endpoints into logical resources:

  • client.search() - Business search

  • client.businesses - Business management

  • client.analytics - Analytics data

  • client.auth - Authentication


Best Practices

1. Store API Keys Securely

Don't:

Do:

2. Handle Errors Properly

3. Use TypeScript for Type Safety


Support

Documentation

Help


Contributing

We welcome contributions to our SDKs!

Last updated