China Customs

v0.2.1
io.github.pipeworx-io/china-customs Checked 2 days ago Published 1 month ago

China Customs (GACC English) — monthly merchandise trade statistics.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

china_trade_summary

China's total monthly merchandise trade — exports, imports, balance — in both USD and CNY (unit: 100 million), with official month-on-month and year-on-year percent changes, exactly as published by the General Administration of Customs (GACC) on its English site's 'preliminary' flash release. Defaults to the latest published month; pass `month` ("YYYY-MM") for an earlier one within the currently-linked range (see `available_months` in the response). Published on roughly a 1-week-after-month-end lag; a revised 'final' figure follows in GACC's next monthly cycle. 中国海关总署(GACC)…

ParameterTypeDescription
monthstringMonth as "YYYY-MM", e.g. "2026-07". Omit for the latest published month.

china_trade_by_country

China's merchandise exports/imports/balance by trading partner country or region, for the month and year-to-date, with year-on-year percent change — from GACC's English site 'final' monthly report. Optionally filter to one partner (substring match, e.g. "United States", "Japan", "Asia"). Values in US$1,000. 中国海关分国别(地区)进出口统计(美元)。

ParameterTypeDescription
monthstringMonth as "YYYY-MM", e.g. "2026-07". Omit for the latest published month.
partnerstringOptional country/region name filter, e.g. "United States", "Korea", "Asia".

china_trade_major_commodities

China's major export or import commodities in quantity and value (crude oil, soybeans, iron ore, steel, machinery, vehicles, chips and more), for the month and year-to-date, with published percentage change — from the General Administration of Customs (GACC) official English monthly bulletin, table 13 (exports) / 14 (imports). Defaults to the latest published month; the response lists `available_months`, so a month GACC has not yet released is reported as unavailable rather than guessed. Values in US$1,000. Optional `commodity` text filter. 中国海关总署主要进出口商品量值表。

ParameterTypeDescription
commoditystringOptional filter on the commodity line, e.g. "crude oil", "soybean", "steel".
directionstring"exports" (default) or "imports".
limitnumberMax lines returned (default 60, max 250).
monthstringMonth as "YYYY-MM", e.g. "2026-08". Omit for the latest published month.

china_trade_by_commodity

China's merchandise exports/imports by HS Section and 2-digit HS chapter (Division), for the month and year-to-date, with year-on-year percent change — from GACC's English site 'final' monthly report. Without `hs_section`, returns the 21 HS sections plus TOTAL; with it (a 2-digit HS chapter code like "84", or free text like "machinery"), also returns that section's individual chapters. Values in US$1,000. 中国海关分商品类别(HS 分类)进出口统计(美元)。

ParameterTypeDescription
hs_sectionstringOptional filter: a 2-digit HS chapter code (e.g. "84") or free text matching a section/chapter name (e.g. "machinery", "textiles").
monthstringMonth as "YYYY-MM", e.g. "2026-07". Omit for the latest published month.

china_trade_indices

China's trade indices — unit-value, quantum and value indices for exports or imports, base = same month of the prior year = 100 — from GACC's English site trade-index tables. Choose a classification via `series` (hs2, sitc2, bec, industry, hs4, sitc3) and `direction` (exports/imports); `chained` selects the chained-index variant. Returns TOTAL + section-level rows by default; pass a 2-digit HS2 `hs2` chapter code to drill into one chapter. NOTE: chapter/section labels in this specific GACC table are Chinese-only. 中国海关进出口价格、数量、金额指数(上年同月=100)。

ParameterTypeDescription
chainedbooleantrue for the chained-index variant. Default false.
directionstring"exports" (default) or "imports".
hs2stringOptional 2-digit HS chapter code to drill into, e.g. "84".
monthstringMonth as "YYYY-MM", e.g. "2026-07". Omit for the latest published month.
seriesstringClassification: hs2 (default), sitc2, bec, industry, hs4, or sitc3.