Docs
From sign-up to your first record in four steps.
Quick start
Sign up and create an API key
Create it on the API Keys page of the console. The full key is shown once; save it right away.
Browse the catalog for free
Search and detail endpoints need no key and use no quota; they are only rate limited.
curl "https://11db.cn/api/v1/search?q=medical" curl "https://11db.cn/api/v1/datasets/<slug>"
Read records
Call the records endpoint with your key; tokens are charged per record returned. Use fields to fetch only what you need.
curl -H "Authorization: Bearer 11db_live_…" \ "https://11db.cn/api/v1/datasets/<slug>/records?limit=100&fields=question,answer"
Paginate
Pass the returned next_cursor as cursor on the next request until it is null.
Response headers
- X-RateLimit-*
- Limit, remaining requests and reset time of the current window
- Retry-After
- Seconds to wait after being rate limited
- X-Tokens-Charged
- Tokens charged for this request
- X-Tokens-Remaining
- Balance after the charge
- X-Tokens-Truncated
- Whether the page was trimmed because the balance was short
- X-Cache
- HIT / MISS / BYPASS
- X-Search-Mode
- hybrid (meaning + keywords) or fulltext (keywords only)
MCP
The MCP endpoint shares quota and limits with REST. Each call returns at most 200 records and never more than your plan's page size.
claude mcp add --transport http 11db https://11db.cn/mcp \ --header "Authorization: Bearer 11db_live_…"
| Tool | Billing |
|---|---|
search_datasets | Free |
get_dataset | Free |
get_usage | Free |
query_records | Per record |
search_records | Per record |
Errors
{ "error": { "code": "rate_limited", "message": "…", "request_id": "…" } }Every error carries a code and a request_id. 402 means the quota is used up; 429 means a rate or daily limit was hit.