For AI

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.

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 has copy-paste examples in cURL, Python (requests) and TypeScript (fetch). The shape of every answer is on the requests page.

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 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 or give it the agent skills.

Updated

Connect once, then just ask.

Every new key comes with $0.10 to try it. One sentence connects your agent.

Start free
Connect your AI

Paste this into your agent

Read https://okdata.online/agents.md and set up okdata for me; my key is in the OKDATA_API_KEY environment variable.

Claude Code, Cursor, Codex and other agents that can open a link set themselves up from it.

MCP serverhttps://api.okdata.online/mcp