China Company API Requests and Responses

Read the request parameters, JSON envelope, company fields, language versions and response headers for ChinaValidate company lookups.

ArticlesPublished by ChinaValidatePublished December 3, 2026Last updated December 3, 2026

Find Chinese companies by name or keyword. Use a matching record’s legal name or Unified Social Credit Code for a profile lookup.

View API documentationAPI workspace
China Company API Requests and Responses

A ChinaValidate company API response includes an application code and data. Read the HTTP response first to see whether the exchange completed, then interpret the JSON code as the outcome of the operation. For company search and profile, a successful lookup contains a count and items. An empty items array can be a valid result. Request parameters and the fields inside each item depend on the endpoint you called. ChinaValidate OpenAPI reference

This guide is a reference for wiring an existing client or reviewing an integration. It covers where input values are placed, how to read the response and what to retain from a completed lookup. Use the current operation documentation to check the full list of parameters and the shape of an item before mapping fields into your own system.

Put parameters in the right place

Company search uses GET. Put the keyword, and any optional page, scope or language parameters, in the query string. In the request examples, values with Chinese characters are URL-encoded by the client. Company profile accepts a full Chinese legal name or Unified Social Credit Code and uses a POST body encoded as JSON. Company registration details can accept the same kind of identity in a GET query. Treat those two requests as distinct operations even though they can use similar input. Company Search API · Company Profile API

Operation Request style Main input
Company search GET with query parameters Keyword
Company profile POST with JSON body Chinese legal name or credit code
Company registration details GET with query parameters Chinese legal name or credit code
Company annual reports GET with query parameters Full Chinese legal name

Keep the authentication header outside the request parameters and response language settings. Put the server-owned key in the Authorization field using the Bearer scheme. For a JSON request use the appropriate content type. Where you accept freeform input for a query, use your HTTP client's query encoder to keep input characters intact. When logging a request, omit the key. Save the operation and fields needed for tracing rather than printing the full request by default. ChinaValidate quick start

Read HTTP status and application code independently

The documented company operations normally return HTTP 200 for application results. The JSON envelope contains the application code, a message and data. Success can return candidate rows, a requested company profile or a valid empty result. A code indicating an application error requires its own handling even when the network exchange completed. Read the code before consuming data as a successful business result.

{
  "code": 200,
  "msg": "ok",
  "data": {
    "total_count": 0,
    "items": []
  }
}

That body says the operation completed and returned zero rows. It cannot establish that the business does not exist in any register. For a search request, check the exact keyword and page before deciding how to show the outcome. For a profile lookup, check the full name or credit code you sent, especially if the identifier came from a copy of an older document. Keep the last confirmed company data with its own date when a fresh lookup returns nothing.

When the input is invalid or the account cannot make a request, expect an application error instead of unpacking items. Use the documentation's codes rather than hard-coding outcomes based on the wording of the message. For example, a code for insufficient API credits belongs with account handling, a bad request belongs with input review, and an authentication error belongs with credential configuration. A client that receives incomplete JSON must handle that as a different problem.

Preserve original fields and translated values

The original result appears under data. For supported non-Chinese requests with a result, a separate translation object can be returned for display. The same entity can be described differently in the two views. Preserve the original Chinese legal name and credit code. When a later operation expects a Chinese name, use the original value, not the translated rendering. The translation is an aid for reading the record.

Search can return several candidates. Keep the returned legal names and any identifying fields with their respective items, including information that distinguishes companies with similar names. A user can compare a name or code with independent documentation before making a selection. A shortlist shown on one page should still be distinguishable from a full company profile saved after making that choice.

When saving optional fields, inspect what was returned. An original field may be absent, null, empty or present with a value. For a convenience view you may choose the same label for several unavailable states while retaining the source evidence. For example, if capital is present, preserve the reported number or text with its units and currency. Do not assign a default zero if the field is missing. Registrations, annual reports and other operations may place related information in different sections. Registration details response

Decode a result in your application

The small JavaScript function below illustrates one way to interpret the documented company search or profile envelope. It is deliberately limited to those response shapes; validate each other endpoint against its own definition before sharing a parser. Call it with a parsed JSON object after handling the HTTP connection and any protocol error. It returns the original rows and keeps the translated view separate.

function readCompanyResult(reply) {
  if (!reply || typeof reply !== "object" || !Number.isInteger(reply.code)) {
    throw new Error("Invalid API response");
  }
  if (reply.code !== 200) {
    return { state: "api_error", code: reply.code };
  }
  if (!Array.isArray(reply.data?.items)) {
    throw new Error("Invalid company result");
  }
  return {
    state: reply.data.items.length === 0 ? "no_rows" : "rows_returned",
    total: reply.data.total_count,
    items: reply.data.items,
    translation: reply.translation ?? null
  };
}

The state names in the example are internal application names. They do not replace the original response code. A service can pass them into a user interface, store them with an application reference or use them to prompt further review. If an operation uses a different data contract, write a separate mapping and test it. Generic envelope handling can still be reused for the HTTP and application error paths.

Record useful response headers

When present, the documented headers include X-CV-Request-Id, X-CV-Charged-Amount and X-CV-Currency. Preserve the identifiers and amount details appropriate to your support or accounting needs. Keep the provider's identifier alongside your own job or request ID when a user needs to trace the lookup. Do not assume the response arrived merely because your own application generated a job reference.

The documentation also describes Retry-After for a rate-limit response. Use the returned guidance where applicable rather than resending repeated calls immediately. A timeout or interrupted connection has a different shape because the client may not know whether the provider completed the operation. Check usage where possible before retrying a request with uncertain completion. Pricing may depend on the operation and requested response language. Normal no-result responses may consume credits. API pricing and billing

Test how your system describes the result

Write a test for a valid company response, a zero-row response and a non-success application code all delivered over a successful HTTP exchange. Add a response with an omitted optional field and a response with translated values. Check that your application preserves the original identifiers and that it does not turn absent values into unfavorable facts about the company. Then test an unavailable connection or an invalid body separately.

Keep the selected entity, the lookup result and the action taken as separate facts when your product saves decisions. For example, a reviewer can verify a candidate now, save the profile information available at that moment, and ask for more information later. A newer request should be tied to its input and date so that a second person can tell which response supports each decision. That record is more useful than a single success banner because it spells out the actual outcome the API returned.

Explain differences between two successful calls

Suppose a first search page shows a company name and status but does not include a usable credit code. A follow-up profile request made with a verified legal name may show additional fields. Save the profile result with its own endpoint and time. The earlier search item remains useful evidence of how the candidate was identified, while the profile describes the result of a different call. Displaying both records can help an operator reconstruct the decision without filling missing search fields after the fact.

A second kind of difference can appear when the requested response language changes. The original account of the returned identity is still the one to keep for matching. Save the response language and use the translated view only when it is present. When a translation is unavailable, an accurate display can make the original field visible with its original language. It should avoid implying that the provider already supplied a translated value.

Document these distinctions in your team's integration notes and parser tests. Specify which properties are always needed by the application and which can be displayed opportunistically. For an operation that returns multiple records, preserve their association with the outer request and any selected entity. A tabular export should let users trace an important value back to its company and API response even if fields from multiple operations are shown side by side.