UN Comtrade International Trade Statistics Scraper avatar

UN Comtrade International Trade Statistics Scraper

Pricing

from $28.50 / 1,000 results

Go to Apify Store
UN Comtrade International Trade Statistics Scraper

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

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

10

Total users

1

Monthly active users

9 hours ago

Last modified

Share

ParseForge Banner

🌐 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 institutionsBilateral 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

  1. πŸ“ Sign up. Create a free account with $5 credit (takes 2 minutes).
  2. 🌐 Open the Actor. Go to the UN Comtrade Scraper page on the Apify Store.
  3. 🎯 Set input. Pick a reporter (842 = USA), commodity (TOTAL or a specific HS code), flow (M for imports), and year.
  4. πŸš€ Run it. Click Start and let the Actor collect your trade data.
  5. πŸ“₯ 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.

πŸ’‘ 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.