Getting started
Search official Chinese government publications in English and Chinese.
On this page
The ReConnect China API gives partner organizations scripted access to the corpus behind reconnectchina.org on another website: official publications from central, ministry, provincial and local government websites in China, with English titles and summaries.
What these pages are
These pages are the reference for the API, and a console for it. Every operation has a page of its own, with its parameters as a form: fill it in, run the request once you are logged in, and copy it as Python, curl or Node. Read them in order, with the links at the foot of each page, and you will have seen all of the API.
If you would rather start from code, the examples are complete programs that each do one job, such as writing a search's results to a CSV file. Download one, run it, and come back here for whatever you want to change.
Where to start
Reading these pages needs no account. Running a request from them needs a reconnectchina.org account: Logging in. A script logs in with a token of its own: Creating a token for a script. To call the API from Python or Node, install a client library: Client libraries.
Registering an account is an application, which we review. Once your account is in an
organization the API answers it, the sandbox first. Until then every request is refused with
403 and the problem type no-organization, although you
can log in. We warmly recommend turning on two-factor authentication for your account at
account.reconnectchina.org. It is optional, and it keeps a stolen password from being enough.
- Using the API covers what holds for every request: access belongs to your organization, the sandbox, paging, errors and what stays compatible.
- Search is where most scripts begin. The contents list every other operation.
- Term expressions and Instant expressions describe the two small languages a search is written in, and Dates and time zones which dates a search filters on, how to show them, and in which time zone to count.
In other formats
The API is described by an OpenAPI document. Every API host publishes it beside these pages, at /docs/v1/openapi.json.
Every page is also there as Markdown, for a program or an AI agent to read, or for you to keep:
add .md to its path, as in /docs/v1/search.md, or ask for the page itself
with the header Accept: text/markdown. It holds all of the page's text, an operation's inputs
and responses in full, and the samples. The link at the foot of every page opens it, and
/llms.txt lists them all, in the order of these pages.