UN Comtrade International Trade Data Tracker
Pricing
from $1.00 / 1,000 item processeds
UN Comtrade International Trade Data Tracker
Fetch bilateral trade data (exports/imports) from UN Comtrade's free Preview API. Query by reporter country, partner country, HS commodity code, and year. Ideal for tariff analysis, supply chain research, and geopolitical trade intelligence. No API key required.
Fetch bilateral international trade data (exports and imports) from the UN Comtrade Preview API — completely free, no API key required. Query by reporter country, partner country, HS commodity code, and year range.
What is UN Comtrade?
UN Comtrade is the world's largest repository of international merchandise trade statistics maintained by the United Nations Statistics Division. It contains annual, quarterly, and monthly trade flows reported by more than 200 countries and territories.
Use Cases
- Tariff & Trade Policy Analysis — Track the impact of tariffs on bilateral trade flows (e.g., US-CN trade war, EU carbon border tax)
- Supply Chain Intelligence — Identify which countries export critical components (semiconductors, batteries, rare earths)
- Geopolitical Research — Monitor trade diversification, reshoring trends, and friend-shoring patterns
- Commodity Market Research — Track global trade volumes for specific HS codes (oil, LNG, steel, agricultural goods)
- Academic & Financial Research — Build datasets for macroeconomic models, country risk, or investment theses
Supported Countries (ISO2)
| Code | Country | Code | Country |
|---|---|---|---|
| US | United States | KR | South Korea |
| CN | China | IN | India |
| JP | Japan | GB | United Kingdom |
| DE | Germany | FR | France |
| IT | Italy | CA | Canada |
| AU | Australia | BR | Brazil |
| MX | Mexico | RU | Russia |
| SA | Saudi Arabia |
Use "0" as the partner code to retrieve world totals (all partners combined).
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
reporters | string[] | ["US", "CN"] | ISO2 codes of reporting countries |
partners | string[] | ["0"] | ISO2 codes of partner countries, or "0" for world total |
commodityCodes | string[] | ["TOTAL"] | HS commodity codes (e.g. "8471" for computers) or "TOTAL" |
flowCode | string | "X,M" | Trade flow: X = exports, M = imports, X,M = both |
periods | integer[] | [2023] | List of years to query |
maxRecordsPerQuery | integer | 250 | Max records per API call (max 250 for free tier) |
Common HS Commodity Codes
| Code | Description |
|---|---|
TOTAL | All commodities |
8471 | Computers |
8517 | Phones & communication equipment |
8542 | Integrated circuits / semiconductors |
2709 | Crude oil |
2711 | Natural gas (LNG) |
7208 | Steel flat-rolled products |
2601 | Iron ore |
8703 | Passenger vehicles |
Output Fields
Each record contains:
| Field | Description |
|---|---|
reporter_code | UN Comtrade numeric code of reporting country |
reporter_name | Name of reporting country |
reporter_iso | ISO3 code of reporting country |
partner_code | UN Comtrade numeric code of partner country |
partner_name | Name of partner country |
partner_iso | ISO3 code of partner country |
flow | Trade flow description (Export / Import) |
commodity_code | HS commodity code |
commodity_description | HS commodity description |
period | Year of the data |
trade_value_usd | Trade value in USD |
netweight_kg | Net weight in kilograms |
qty | Quantity (units vary by commodity) |
source | Always "UN Comtrade" |
Example Output
{"reporter_code": 840,"reporter_name": "United States of America","reporter_iso": "USA","partner_code": 156,"partner_name": "China","partner_iso": "CHN","flow": "Import","commodity_code": "8542","commodity_description": "Electronic integrated circuits","period": 2023,"trade_value_usd": 48234567890,"netweight_kg": 12345678,"qty": null,"source": "UN Comtrade"}
Pricing
This Actor uses Pay-Per-Event (PPE) pricing:
| Event | Price |
|---|---|
| Actor start | $0.005 |
| Per trade record fetched | $0.005 |
A typical run querying 2 countries × 1 partner × 1 commodity × 1 year returns up to 4 records, costing ~$0.025.
API Limits
This Actor uses the UN Comtrade Preview API (free tier):
- Maximum 250 records per query
- Rate limited: ~1 request per second
- Annual data only (monthly/quarterly require a subscription)
- 15 supported reporter countries
For higher volume or more countries, the UN Comtrade API subscription ($500/year) unlocks full access.
Data Attribution
Data sourced from UN Comtrade — United Nations Statistics Division. Please cite appropriately in academic or commercial publications.
Related actors
- World Bank Data Scraper — GDP, exports % of GDP, and trade balance to complement bilateral UN Comtrade flows
- OECD Stats Tracker — OECD trade statistics for G7/G20 bilateral comparison alongside UN Comtrade
- Eurostat Economic Data — EU trade data for cross-border flows within the Eurozone to complement UN data
Feedback
If this actor helps your trade research, a review helps others find it: Leave a review on Apify Store
Keywords: UN Comtrade, trade data, import export, international trade, trade balance, commodities, tariff, HS code, global trade, trade statistics, bilateral trade, country exports