UN Comtrade International Trade Statistics Scraper
Pricing
from $28.50 / 1,000 results
UN Comtrade International Trade Statistics Scraper
Scrape the United Nations Comtrade free preview API for international trade flows. Pull imports, exports, re-imports and re-exports between reporters and partners by HS commodity code and year, including value, quantity, net weight, gross weight and customs procedure.
Pricing
from $28.50 / 1,000 results
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
0
Bookmarked
10
Total users
1
Monthly active users
9 hours ago
Last modified
Categories
Share

π UN Comtrade International Trade Statistics Scraper
π Export bilateral trade flows in seconds. Pull imports, exports, re-imports and re-exports between 200+ reporting countries and partners, by HS commodity code and year. Includes CIF and FOB values, quantities, net and gross weights. No sign-up needed.
The UN Comtrade Scraper pulls from the official United Nations Comtrade source, the world's most comprehensive bilateral merchandise trade database. Every record carries 47 fields, including reporter and partner identifiers (UN M49 codes plus ISO 3166-1 alpha-3), commodity codes across every HS revision (HS 1988 through HS 2022), customs procedure, mode of transport, and a complete suite of value and quantity measures (CIF, FOB, primary value, net weight, gross weight, alternate quantity).
Coverage spans 200+ reporter countries, every UN partner economy, all four flow directions (Imports, Exports, Re-imports, Re-exports), and 8 HS classification revisions. Annual data goes back to 1962 for many reporters. Choose any commodity (TOTAL aggregate or specific 2- or 6-digit HS code), specify the year, optionally restrict to a single partner, and download the result as CSV, Excel, JSON, or XML in under three minutes.
| π― Target Audience | π‘ Primary Use Cases |
|---|---|
| Trade economists, supply chain analysts, customs and policy researchers, ESG teams, journalists, market researchers, academic institutions | Bilateral trade balances, import/export volume tracking, commodity sourcing analysis, sanctions monitoring, tariff impact studies, trade-flow visualisations |
π What the UN Comtrade Scraper does
Eleven filtering inputs combine in a single run:
- π³οΈ Reporter filter. Pick any UN M49 country code (842 = USA, 156 = China, 276 = Germany, 392 = Japan, 826 = United Kingdom, 250 = France) or pull a multi-reporter comparison.
- π€ Partner filter. Restrict to a single trading partner, leave empty for every partner row, or chain a second partner code for 3-way trade analysis.
- π¦ Commodity filter. TOTAL aggregate, broad chapters (27 = mineral fuels, 84 = machinery, 85 = electrical machinery, 87 = vehicles), or specific 6-digit HS codes.
- π Flow direction. Imports, Exports, Re-imports, Re-exports.
- π Period. Single year or comma-separated list across multiple years.
- π§Ύ Classification revision. HS current, plus HS 2022, 2017, 2012, 2007, 2002, 1996, 1988 for time-series consistency.
- π Customs procedure and mode of transport. Drill down to specific clearance regimes or transport modes.
- π Aggregation control. Roll up rows by named dimensions or keep the raw breakdown.
Each record returns reporter and partner ISO codes, descriptive labels, commodity description, CIF and FOB values, primary value, net and gross weights, quantities with their unit of measure, estimation flags, and a deep link back to the official Comtrade trade-flow viewer.
π‘ Why it matters: bilateral trade data underpins every supply-chain risk model, sanctions impact study, and country-level export competitiveness analysis. Building this pipeline yourself means handling complex paging, M49-to-ISO joins, dimension labelling, and multi-classification reconciliation. This Actor handles it all and keeps your dataset fresh on every run.
π Data fields
Each record includes: altQty, altQtyUnitCode, cifvalue, classificationCode, classificationSearchCode, cmdCode, customsCode, flowCode, flowDesc, fobvalue, freqCode, grossWgt, isAggregate, isAltQtyEstimated, isGrossWgtEstimated, isNetWgtEstimated, isOriginalClassification, isQtyEstimated, isReported, legacyEstimationFlag, mosCode, motCode, netWgt, partner2Code, partner2Desc, partner2ISO, partnerCode, partnerDesc, partnerISO, period, primaryValue, qty, qtyUnitCode, refMonth, refYear, reporterCode, reporterDesc, reporterISO, scrapedAt, typeCode. All 40 field names come from a real production run, so what you see here is what lands in your dataset.
π How to use
- π Sign up. Create a free account with $5 credit (takes 2 minutes).
- π Open the Actor. Go to the UN Comtrade Scraper page on the Apify Store.
- π― Set input. Pick a reporter (842 = USA), commodity (TOTAL or a specific HS code), flow (M for imports), and year.
- π Run it. Click Start and let the Actor collect your trade data.
- π₯ Download. Grab your results in the Dataset tab as CSV, Excel, JSON, or XML.
β±οΈ Total time from sign-up to downloaded dataset: 3-5 minutes. No coding required.
π Recommended Actors
- π Indexmundi Scraper - Global demographic and economic indicators
- π World Bank Open Data Scraper - Cross-country development indicators
- π EIA Energy Scraper - U.S. and global energy statistics
- π’οΈ OPEC Oil Data Scraper - Oil production and reserves data
- π USTR Tariff Scraper - U.S. trade representative tariff schedules
π‘ Pro Tip: browse the complete ParseForge collection for more reference-data scrapers.
β οΈ Disclaimer: this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the United Nations or UN Comtrade. All trademarks mentioned are the property of their respective owners. Only publicly available open trade statistics are collected.
π Need Help?
If you hit a bug, have questions about setup, or need a scraper we haven't built yet, open our contact form or write to parseforge@protonmail.com. We also take on paid custom data projects.
For faster answers, join our Discord. It's the best place to get support and suggest new actors.