get_customs_commodity_trade
Query China import or export observations by recorded major-commodity label. Inputs: period, commodity, flow and optional metric. Selected exact Chinese aliases and normalized existing names are supported; this is not general translation or HS-code classification. Returns trade_value or quantity observations with original commodity labels, units, scope, source_class, provenance, snapshot, pagination and limits. No category merging or conversion. No match returns an empty data array. Required: period, commodity, flow. Missing required or invalid input produces an argument error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow | Yes | China trade direction: IMPORT or EXPORT. Required. | |
| limit | No | Maximum number of records returned. Integer 1–100; default 20. A page may contain fewer records. | |
| metric | No | Recorded metric trade_value or quantity. trade_value currently uses 1000USD; quantity units vary by commodity and are returned unchanged. Optional; omission includes both collected metrics. | |
| 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. | |
| 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. | |
| commodity | Yes | Recorded major-commodity name or a selected exact Chinese alias. Existing literal substring matching remains; known aliases resolve only to their exact canonical label. NFKC, leading/trailing spaces and letter case are normalized for known names. No fuzzy translation, HS mapping or broader/narrower category expansion. Required. |