Search
POST /v1/search
Runs a search and returns its first page, together with the total number of hits and
the histograms named in histograms. Use next with POST /v1/continue_search for the
following pages. With "pageSize": 0 there is no page: only hits and the histograms.
Responses
200 · Success
The first page of results.
Where a document's field comes from: From the source from the source page, AI generated machine-generated, Assigned assigned by ReConnect China. What a document tells you
hitsinteger, at least 0How many documents match the search in total. Each histogram adds up to this number. It comes with the first page only.
summarieslist of objectsA document's id, assigned by ReConnect China, the same one reconnectchina.org uses: the path segment after
/items/inrc. Use it as it is; its format is not part of this contract.Assigned by ReConnect China: the document's page on reconnectchina.org. The last part of the link is derived from the English title (
en.title) once, when the page first appears, and kept from then on: a link keeps working when the title is later revised.Assigned by ReConnect China: a ready-made attribution for this document, to publish next to anything derived from it.
From the source website: the page to link to for this document, the one that presents it. A document can draw on more than one page, such as a listing that gives its document number; this is the page to send a reader to. Absent when there is no such page that can be linked to.
The kind of document, machine-generated by our classifier from the document itself:
law/decree(法, 令, 条例),regulation(规定, 办法, 细则),notice/announcement(通知, 公告, 通报),opinion/plan(意见, 规划, 方案, 纲要),news(news and reports),leaders(about the activities of leading officials), andother: anything else, including documents that have not been classified yet. A document can therefore move fromotherto another kind once it is classified, and a kind can change when the classifier improves.A fixed set for the lifetime of
/v1.The administrative level a document was issued at, machine-generated by our classifier from the document itself:
centre(the State Council, the Party centre and the ministries),provinces(provincial-level units, including the four municipalities with province rank),cities(municipal and county governments), andotherfor documents that have not been classified yet.This is the level the reconnectchina.org search filters by. It is not derived from
issuer: a city may repost a central document, which is thencentre.A fixed set for the lifetime of
/v1.What a document is about, machine-generated by our classifier from the document itself.
othercovers everything else: documents on a topic we do not publish, documents that have not been classified yet, and any topic a later classifier adds. A document can therefore move fromotherto a topic once it is classified, and a topic can change when the classifier improves.A fixed set for the lifetime of
/v1.An issuer, one of those
issuerIntakes (machine-generated). The list may grow: handle a name you do not know rather than failing on it.The one date the document is treated as having, an instant in UTC, chosen by ReConnect China from its dates.
fromandtofilter on it, the time histogram buckets it and the ranking uses it, unlessdateFieldnames another date. How far back a search reaches is always measured on it. It is one of the dates indates, the publication date when the page gives one, anddateKindsays which. When the source page gives no date at all it is when we collected the document, which is an approximation and can be later than the document's own date.datesobjectEvery date the document has, each an instant in UTC. The first three are printed on the source page, and each is absent when the page does not give it; only
addedis always there. Summaries and detail carry the same set, so a search result already holds every date the document has.When the document was published (发布日期, 公布日期), from the source page. For presentation to users, prefer formatting in China Standard Time.
When the document was written or signed (成文日期), from the source page. For presentation to users, prefer formatting in China Standard Time.
When the document comes or came into effect (施行), from the source page. For presentation to users, prefer formatting in China Standard Time.
When we first collected the document, stamped by us rather than printed. It says the document existed by then, not when anyone last looked at the source page.
From the source page, the official document number (文号) as printed, e.g.
云政办发〔2024〕27号. Not unique: a document reposted by several websites carries the same number in each copy, so it can find copies, whileididentifies one. Absent for documents that carry none, such as news.enobjectEnglish, machine-generated.
A title in English, machine-generated: one line that names the document. A language model writes it from the Chinese headline and text, so it is not a translation of
zh.headlineline by line. It is often shorter than the headline, but no length is promised. It can change when the model improves.A summary of the text, machine-generated, as the summarizer wrote it. It can run to several paragraphs and contain lists, and its line breaks carry that structure, so show it with them kept. It may use light markup in the manner of Markdown, but no particular markup language is promised. Absent until summarization has run, and for documents without text to summarize.
zhobjectmay be absentChinese, as published. Each field is absent when it is left out (see
hidden), andzhitself when all of them are.From the source page, the headline as published, one entry per line.
histogramsobjectmay be absentAbsent when the request named no histograms.
timelist of objectsmay be absentHits per period of the chosen date (
dateField), in time order. The period follows the searched range: a day for up to 92 days, a month for up to twenty years, a year beyond that. Every period of the range is there, an empty one with0, and each bucket states its own bounds, in UTC. The periods are days, months or years in the time zone the request names inhistograms.time.timeZone, UTC by default (see Dates and time zones in the introduction). The first starts atfromand the last ends atto, so either is part of a period when the range does not begin or end where a period does.fromstringThe start of the period (inclusive).
tostringThe end of the period (exclusive).
hitsinteger, at least 0issuerlist of objectsmay be absentHits per issuer.
An issuer, one of those
issuerIntakes (machine-generated). The list may grow: handle a name you do not know rather than failing on it.hitsinteger, at least 0levellist of objectsmay be absentHits per administrative level (machine-generated, see
level).The administrative level a document was issued at, machine-generated by our classifier from the document itself:
centre(the State Council, the Party centre and the ministries),provinces(provincial-level units, including the four municipalities with province rank),cities(municipal and county governments), andotherfor documents that have not been classified yet.This is the level the reconnectchina.org search filters by. It is not derived from
issuer: a city may repost a central document, which is thencentre.A fixed set for the lifetime of
/v1.hitsinteger, at least 0topiclist of objectsmay be absentHits per topic (machine-generated, see
topic).What a document is about, machine-generated by our classifier from the document itself.
othercovers everything else: documents on a topic we do not publish, documents that have not been classified yet, and any topic a later classifier adds. A document can therefore move fromotherto a topic once it is classified, and a topic can change when the classifier improves.A fixed set for the lifetime of
/v1.hitsinteger, at least 0nextstringmay be absentOpaque. Absent when there is nothing more, and when paging stops early, which
truncatedthen says (see Paging). Send it back unchanged, from the account that received it. It expires, at the earliest one hour after its search's first request.truncatedobjectmay be absentreasonstringWhy paging stops here.
depth: the search has reached the depth your organization may page to (agreement.depthinGET /v1/me); to reach the rest, narrow the search. More reasons may be added: treat one you do not know as "there is more" all the same.
Errors
Every error is a problem document with the fields below. Its type names the problem, and is the address of the problem's page.
- 400
invalid-request The request is not valid (
invalid-request): a path that cannot be read, a body that is not JSON or does not match the schema, an unknown field, afromortothat is not a valid instant expression (an unknown time zone, or a time of day the zone skips, included), afromthat is not earlier thanto, atermthat does not parse or is longer than your organization's agreement allows, an unknown issuer, a scope in the body that does not exist, or a saved search's name that breaks the naming rule.errorsnames each offending part: apointerinto the body (for the run of a saved search, intoparametersas it ran), or theparameterof the path (see problem types).- 401
unauthenticated No access token, or one that is invalid or has expired (
unauthenticated). Refresh the access token and try again.- Header
WWW-AuthenticateBearer, as RFC 6750 on another website specifies.
- Header
- 403
no-organizationmultiple-organizationsorganization-not-registerednot-entitledaccess-endedtier-served-elsewhererange-not-entitledsuspended The account may not do this.
typesays why: a refusal every operation can meet (no-organization,multiple-organizations,organization-not-registered,not-entitled,access-ended,tier-served-elsewhereorsuspended, see Problem types), or the search reaches further than the organization's agreement allows (range-not-entitled, with the earliest allowedfrominearliestFrom, the latest allowedtoinlatestTo, and anerrorsentry pointing at each end at fault).- 413
payload-too-large The request body is too large (
payload-too-large).- 415
unsupported-media-type The request body is not
application/json(unsupported-media-type).- 429
rate-limited Too many requests, or too many at the same time (
rate-limited), from your account, your organization, or your network address. Wait forRetry-Afterseconds, then send the same request again.- Header
Retry-AfterHow many seconds to wait before sending the same request again.
- Header
- 431
headers-too-large The request's headers are too large (
headers-too-large). An access token is far below the limit, so look for a header your client adds.- 503
unavailable The API is temporarily unavailable (
unavailable), because our servers are under pressure or briefly out of service. Wait forRetry-Afterseconds, then send the same request again.- Header
Retry-AfterHow many seconds to wait before sending the same request again.
- Header
A problem document's fields
typestringIdentifies the problem; branch on this. One of the problem types under
https://api.reconnectchina.org/docs/v1/problems/, named in each response's description and itsx-problem-types, and listed in Problem types, for examplehttps://api.reconnectchina.org/docs/v1/problems/continuation-expired. The URL is also the type's documentation.titlestringA short, human-readable summary of the problem type.
statusintegerThe HTTP status code.
detailstringmay be absentA human-readable explanation of this occurrence.
errorslist of objectsmay be absentFor
invalid-request, each part of the request that is not valid, and forrange-not-entitled, each end of the range that reaches too far. Each names the part in exactly one way:pointerfor a part of the body,parameterfor a part of the path. A part with several mistakes in it, such as aterm, has an entry for each, andspansays where in it each one is.parameterstringmay be absentThe name of the path parameter, as this document names it, for example
namein/v1/saved_searches/{scope}/{name}.pointerstringmay be absentA JSON Pointer (RFC 6901 on another website) into the request body, for example
/levelIn/0. Empty for the body as a whole. For the run of a saved search, it points into the search as it ran, as if the body had been{"parameters": …}with the saved parameters and your overrides:/parameters/fromwhetherfromwas saved or sent.spanobjectmay be absentWhere in a string a problem is: the characters from
startup to, not including,end, counting from 0. Characters are Unicode code points, asmaxLengthcounts them, so低空经济is four; a program that marks text in another unit converts, such as a browser, whose strings count a character outside the Basic Multilingual Plane as two. Equalstartandendmark the place where something is missing, such as the end of a term that stops after&&.startinteger, at least 0endinteger, at least 0detailstringearliestFromstring, up to 128 charactersmay be absentFor
range-not-entitled, the earliestfromyour organization may use, as an instant expression such asnow-1yor1900-01-01.latestTostring, up to 128 charactersmay be absentFor
range-not-entitled, the latesttoyour organization may use, as an instant expression such as3000-01-01.serverstringmay be absentFor
tier-served-elsewhere, the server of this API that your account may use, one ofservers, such ashttps://sandbox.api.reconnectchina.org.