Open Data API & Programmatic Integration Hub
The GlobalTradeData (GTD) Open Data Initiative provides standardized RESTful JSON endpoints for universities, quantitative research models, and macroeconomic analytics applications worldwide.
1. Standard RESTful JSON Endpoints
Parameters year and month are optional: they default to the latest period published by the requested reporter, which can differ (China 2026-09, United States 2026-08, European Union 2026-07). An unknown reporter returns HTTP 400.
Returns latest export, import, and trade balance aggregates across the Triad economies (CN, US, EU) alongside publication timestamps.
Query multidimensional export leaderboards. Supported query parameters: board (SCALE/GAINER/SURPLUS), scope (COMMODITY/PARTNER/SUBNATIONAL/GATEWAY), reporter (CN/US/EU/GLOBAL), year, and month.
Retrieve one reviewed industry topic: the published source line, its full monthly export value, quantity and estimated unit value series, and the stated measurement boundary.
Retrieve bilateral foreign trade timeline, monthly outbound exports (FOB), inbound imports (CIF), and net balance time series.
Query export price indices (EPI), volume indices (EQI), and net barter terms of trade (TOT) series across reporting economies (CN, EU).
import requests
# 1. Fetch Top 10 China Export Commodities by Value
url = "https://globaltradedata.org/api/v1/rankings"
params = {
"board": "SCALE",
"scope": "COMMODITY",
"reporter": "CN",
"limit": 10
}
resp = requests.get(url, params=params)
data = resp.json()
for item in data['data']:
print(f"#{item['rank_position']} {item['item_name_en']}: ${item['value_usd']:,.0f} USD (YoY: {item['yoy_growth']}%)")
China Data Endpoints
Beyond the rankings and partner feeds, the China data centre exposes its charts as JSON endpoints. Parameters are shown in the query string.
| Endpoint | Returns | Key parameters |
|---|---|---|
| /api/v1/china/commodity-data | Commodity rows by tab | tab=major|hs|sitc, year, month |
| /api/v1/china/commodity-timeseries | Monthly value/quantity series | commodity = table 13/14 source name (e.g. 集成电路) |
| /api/v1/china/commodity-hs-timeline | HS chapter timeline | commodity, year, month |
| /api/v1/china/commodity-sitc-timeline | SITC timeline | commodity, year, month |
| /api/v1/china/commodity-modes-timeline | Commodity x trade mode | code = MODE_…, flow |
| /api/v1/china/partner-top | Top partners | limit, year, month |
| /api/v1/china/partner-timeline | Partner timeline | codes (comma list, max 10), start, end |
Full list: the routes above are backed by the same warehouse facts shown on the China pages.
Version & Attribution
API version: v1 (paths are stable; additive fields may appear).
Attribution: when you publish figures, cite GlobalTradeData and the original agency: GACC (China), U.S. Census Bureau (United States), Eurostat Comext (European Union). Do not present derived shares as official statistics.
2. Real-Time Query Architecture & Fair Use
GTD serves live aggregated metrics directly from our high-performance relational warehouse. Programmatic queries are subject to zero authentication and provide immediate JSON responses.