get_customs_country_trade
Query China merchandise trade by partner country/region, including all-partner totals using country TOTAL. Inputs: period, country and optional flow. IMPORT and EXPORT are China imports and exports; BOTH is recorded combined trade. Returns recorded trade values and units (currently 1000USD), scope, source_class, provenance, snapshot, pagination and limits. No commodity filter or currency conversion. No match returns an empty data array. Required: period, country. Missing required or invalid input produces an argument error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow | No | China trade direction: IMPORT or EXPORT or BOTH (recorded combined total). Optional; omission includes collected directions. | |
| limit | No | Maximum number of records returned. Integer 1–100; default 20. A page may contain fewer records. | |
| offset | No | Zero-based pagination offset. Integer 0–999; default 0. Offsets of 1000 or greater are rejected. Use the returned next_offset when present. | |
| period | Yes | Recorded statistical period: YYYY-MM for a single month, or YYYY-01/YYYY-MM for January-to-month cumulative observations. Exact collected period; these periods are not interchangeable. A snapshot identifies the dataset version, not a selectable statistical period. Required. | |
| country | Yes | China trade partner country/region, or TOTAL for all partners. TOTAL is an aggregate, not an alias for China. Exact recorded name or selected one-to-one alias; original labels remain in output. Required. | |
| snapshot | No | Optional expected snapshot.version, not a historical-version selector. If omitted, the current dataset snapshot is used. For continued pagination reuse the previous response snapshot.version; a mismatch is rejected. |