China SnapshotDocs
Get a key ↗
Open in AI ↗
Open in ChatGPTOpen in ClaudeView Markdown
Getting started

Onboard your agent

One prompt to discover the contract and make a successful first request.

Paste this prompt#

text
Integrate China Snapshot into this project. Read https://china-snapshot.com/docs/llms.txt and https://china-snapshot.com/openapi.json first. Use https://china-snapshot.com as the base URL. Make GET /api/datasets?dataset=documents&limit=1 with no credential, verify HTTP 200 and the items/coverage fields, and report the record ID and source URL if a row exists. Do not invent a row if items is empty.

Use the project's existing language and HTTP client. Preserve original titles, source URLs, publication dates and collection timestamps. Use next_cursor unchanged with the same filters to paginate one query. To poll for what is new or revised, use GET /api/changes?dataset=documents&since=<ISO timestamp> and continue with next_since (a 503 with code unavailable means the feed is not enabled on that deployment yet). Handle 429 using Retry-After and surface other errors.

If CS_API_KEY is already available, use Authorization: Bearer with that value and never print it. If I ask you to obtain a Free key, use only an email address I authorize for this purpose. POST JSON containing email to /api/key_signup with Accept: application/json. Follow status and next_steps: key_emailed requires my inbox; key_shown_once requires secure local storage. Do not assume signup always returns a key, read my inbox without authorization, or buy a plan. If key_exists is returned, follow the recovery guidance. Confirm an authenticated GET /api/series/pmi-manufacturing after the key is available.

To narrow to a maintained topic, pass watch=<slug> (alias topic=), for example watch=export-controls. MCP tools require an eligible research credential; Free public-data access is not MCP entitlement. Use the MCP guide only if I request MCP. Document what succeeded, the exact endpoint used, and any blocked step without logging credentials.

Signup is agent-readable, not inbox-free#

The signup API reference describes the request and all response states. An agent can submit an authorized email and consume next_steps; normal delivery still needs access to the recipient's inbox. A failed mail delivery can return a Free key once. It is not a substitute for verifying email ownership and cannot be upgraded through that fallback.

Connect a client#

Claude Code and Cursor configurations use the existing Bearer-protected remote endpoint. ChatGPT compatibility is documented separately there: the repo does not implement OAuth, so a native connection must not be promised.

Search documentation