# Onekey documentation

Onekey is one API for public data from many platforms. You send one kind of request with one key, and you always get back the same JSON shape, whichever platform answered. Pricing is a flat, published number of credits per endpoint, and failed calls are refunded.

Right now there are **1,995 endpoints** across **294 platforms** (1,292 verified against the live source). The list grows all the time; the [platform catalog](https://onekey.dev/docs/platforms.md) is always current.

## How it works

1. **Get a key.** [Sign up](https://onekey.dev/signup) and copy your API key. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
2. **Make a call.** `GET https://api.onekey.dev/v1/{platform}/{endpoint}` with the key in the `x-api-key` header.
3. **Get unified JSON.** Every platform answers in the same shape, with the cost of the call inside it.

## Where to go next

- **New here?** Do the [Quickstart](https://onekey.dev/docs/quickstart.md). It takes about a minute.
- **Wondering what things cost?** Read [Credits & pricing](https://onekey.dev/docs/credits.md).
- **Something failed?** See [Errors](https://onekey.dev/docs/errors.md), and check the free [status endpoint](https://onekey.dev/docs/status.md) before you retry.
- **Paging through a list, or retrying safely?** See [Pagination](https://onekey.dev/docs/pagination.md) and [Idempotency](https://onekey.dev/docs/idempotency.md).
- **Have a link rather than an endpoint in mind?** Paste it into [URL lookup](https://onekey.dev/docs/lookup.md).
- **Many calls at once?** Send them as one [batch](https://onekey.dev/docs/batch.md), or run one query across platforms with [multi-platform search](https://onekey.dev/docs/search-multi.md), and [stream](https://onekey.dev/docs/streaming.md) the answers as they arrive.
- **Want a ready-made engagement rate or language?** Read about the [computed block](https://onekey.dev/docs/computed.md).
- **Looking for a platform?** Browse the [platform catalog](https://onekey.dev/docs/platforms.md).
- **Want one query planned across platforms?** See [universal search](https://onekey.dev/docs/universal-search.md). For a brand, a creator or a topic in one answer, see the [reports](https://onekey.dev/docs/reports.md).
- **Want to be told when data changes?** Save the call as a [monitor](https://onekey.dev/docs/monitors.md) and get a signed webhook instead of polling.
- **Building with an AI agent?** Start at [AI agents](https://onekey.dev/docs/ai-agents.md): every page here is also available as Markdown. Connect the hosted [MCP server](https://onekey.dev/docs/mcp.md), or follow an [integration guide](https://onekey.dev/docs/integrations.md) for n8n, LangChain, the Vercel AI SDK or Claude Code.

## The shape of every call

```bash
GET https://api.onekey.dev/v1/{platform}/{endpoint}?{params}
x-api-key: YOUR_API_KEY
```

To switch platforms you change two words in the path. The rest of your code stays the same.

More routes build on the same endpoints and answer in the same shape:

| Route | What it does |
| --- | --- |
| `GET /v1/lookup?url=` | Resolves a public URL to its endpoint and serves it. See [URL lookup](https://onekey.dev/docs/lookup.md). |
| `POST /v1/batch` | Up to 100 endpoint calls in one request, one row each. See [Batch](https://onekey.dev/docs/batch.md). |
| `GET /v1/search/multi`, `GET /v1/creator/card` | One query or handle across several platforms, side by side. See [Multi-platform search](https://onekey.dev/docs/search-multi.md). |
| Any of the three with `Accept: text/event-stream` | Rows as they arrive. See [Streaming](https://onekey.dev/docs/streaming.md). |
| `GET /v1/search/universal` | One query planned across platforms and rank-fused. See [Universal search](https://onekey.dev/docs/universal-search.md). |
| `GET /v1/reports/{kind}` | A brand, a creator or a topic in one answer. See [Reports](https://onekey.dev/docs/reports.md). |
| `POST /v1/monitors` | A saved call re-run on a schedule, with a signed webhook when the data changes. See [Monitors](https://onekey.dev/docs/monitors.md). |
