# SDKs: Python and TypeScript (coming soon)

> Official okdata SDKs for Python and TypeScript are being prepared. Until they are published, call the HTTP API directly or generate a client from openapi.json.

Canonical page: https://okdata.online/docs/sdk/

Official SDKs for Python and TypeScript are in preparation: one typed method per endpoint, an idempotency key on every call, retries that follow each error's `retry` advice, and page iterators with a spending cap. They are not published yet, so there is nothing to install today. This page will carry the install commands the day they are.

## Until then

The API is plain HTTPS with one header, so any HTTP library works. Every [endpoint page](/apis/) has copy-paste examples in cURL, Python (`requests`) and TypeScript (`fetch`). The shape of every answer is on the [requests page](/docs/requests/).

```python
import os, requests

r = requests.get(
    "https://api.okdata.online/v1/douyin/trends/list",
    headers={"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"},
    timeout=60,
)
body = r.json()
print(body["code"], body["meta"]["billing"]["amount"])
```

## Generate a client

[openapi.json](/openapi.json) is a complete OpenAPI 3.1 description of every endpoint, its parameters and its response, so any OpenAPI generator can produce a typed client in the language you use. It is regenerated whenever the catalog changes.

## For AI agents

An agent does not need an SDK: connect the [MCP server](/mcp/) or give it the [agent skills](/skills/).

Updated 2026-11-12
