UN Comtrade International Trade Data Tracker avatar

UN Comtrade International Trade Data Tracker

Pricing

from $1.00 / 1,000 item processeds

Go to Apify Store
UN Comtrade International Trade Data Tracker

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.

Pricing

from $1.00 / 1,000 item processeds

Rating

0.0

(0)

Developer

Hojun Lee

Hojun Lee

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

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)

CodeCountryCodeCountry
USUnited StatesKRSouth Korea
CNChinaINIndia
JPJapanGBUnited Kingdom
DEGermanyFRFrance
ITItalyCACanada
AUAustraliaBRBrazil
MXMexicoRURussia
SASaudi Arabia

Use "0" as the partner code to retrieve world totals (all partners combined).

Input Parameters

ParameterTypeDefaultDescription
reportersstring[]["US", "CN"]ISO2 codes of reporting countries
partnersstring[]["0"]ISO2 codes of partner countries, or "0" for world total
commodityCodesstring[]["TOTAL"]HS commodity codes (e.g. "8471" for computers) or "TOTAL"
flowCodestring"X,M"Trade flow: X = exports, M = imports, X,M = both
periodsinteger[][2023]List of years to query
maxRecordsPerQueryinteger250Max records per API call (max 250 for free tier)

Common HS Commodity Codes

CodeDescription
TOTALAll commodities
8471Computers
8517Phones & communication equipment
8542Integrated circuits / semiconductors
2709Crude oil
2711Natural gas (LNG)
7208Steel flat-rolled products
2601Iron ore
8703Passenger vehicles

Output Fields

Each record contains:

FieldDescription
reporter_codeUN Comtrade numeric code of reporting country
reporter_nameName of reporting country
reporter_isoISO3 code of reporting country
partner_codeUN Comtrade numeric code of partner country
partner_nameName of partner country
partner_isoISO3 code of partner country
flowTrade flow description (Export / Import)
commodity_codeHS commodity code
commodity_descriptionHS commodity description
periodYear of the data
trade_value_usdTrade value in USD
netweight_kgNet weight in kilograms
qtyQuantity (units vary by commodity)
sourceAlways "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:

EventPrice
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.


  • 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