UN Comtrade International Trade Data Scraper avatar

UN Comtrade International Trade Data Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
UN Comtrade International Trade Data Scraper

UN Comtrade International Trade Data Scraper

Extract UN Comtrade international trade statistics — imports/exports by reporter country, partner, HS commodity code, and year. Powered by the official UN Comtrade public preview API.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Compute Edge

Compute Edge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Share

Extract official UN Comtrade international trade statistics straight from the United Nations public API. Perfect for market research, supply-chain analysis, economic forecasting, and competitive intelligence on global trade flows.

The UN Comtrade Database is the world's most comprehensive trade dataset, covering imports, exports, and re-exports between 200+ countries going back to 1962. This Actor wraps the official public preview endpoint and pushes results directly into your Apify dataset — no API key required.

What you get

FieldDescription
periodReporting period (year or year-month)
reporterDescCountry reporting the trade
partnerDescTrading partner country
flowDescTrade direction (Import, Export, Re-Export, etc.)
cmdCodeHS or SITC commodity code
cmdDescCommodity description
primaryValueTrade value in USD
netWgt / grossWgtWeights in kilograms
qty / qtyUnitReported quantity and unit
motDescMode of transport

How to scrape UN Comtrade

  1. Open the Actor's input form.
  2. Set Reporter Country Code to the UN M49 code of the country whose trade you want — for example 842 (USA), 156 (China), 276 (Germany), 392 (Japan), 826 (UK).
  3. Choose Period (year). Use commas to query multiple years.
  4. Pick Frequency — Annual (A) or Monthly (M).
  5. Pick Trade Flow — Goods (C) or Services (S).
  6. Set Commodity Code to TOTAL for all goods or any 2/4/6-digit HS code (e.g. 87 for vehicles, 2709 for crude oil, 8517 for telephones).
  7. Set Partner Code to 0 for World, or another M49 code for bilateral trade.
  8. Click Start and watch the dataset fill in seconds.

Use cases

  • Market entry analysis — Quantify a country's import demand for your product category before launch.
  • Supply-chain risk — Track concentration of imports/exports across partners.
  • Commodity research — Build pricing or volume models from authoritative customs data.
  • Macro & ESG models — Feed structured trade data into RAG pipelines or BI dashboards.

Pricing

This Actor is priced at $0.003 per result. A typical query returns 100–5,000 records, so most runs cost a few cents in addition to Apify compute.

Input example

{
"reporterCode": "842",
"period": "2022",
"frequency": "A",
"tradeFlow": "C",
"classification": "HS",
"cmdCode": "TOTAL",
"partnerCode": "0",
"maxResults": 1000
}

Output example

{
"period": "2022",
"reporterDesc": "USA",
"partnerDesc": "World",
"flowDesc": "Export",
"cmdCode": "TOTAL",
"primaryValue": 2064787398567,
"netWgt": null,
"qty": null
}
  • FRED Federal Reserve Economic Data Scraper — pair trade volumes with macro indicators.
  • USAspending Government Spending Scraper — for federal contracts touching imported inputs.
  • SEC EDGAR Filings Scraper — public-company exposure to trade routes.

FAQ

Do I need an API key? No. The Actor uses UN Comtrade's free public preview endpoint.

Can I get monthly data? Yes — set Frequency to M and Period to a YYYYMM value.

Is the data official? Yes — directly from the United Nations Statistics Division.

This Actor accesses publicly available trade statistics published by the United Nations. Users are responsible for complying with the UN Comtrade Terms of Use. The Actor does not bypass any authentication or rate-limit controls.

Support: bciccarelli6@gmail.com