UN Comtrade Trade Data Scraper - Bilateral Trade by HS Code avatar

UN Comtrade Trade Data Scraper - Bilateral Trade by HS Code

Pricing

from $0.90 / 1,000 results

Go to Apify Store
UN Comtrade Trade Data Scraper - Bilateral Trade by HS Code

UN Comtrade Trade Data Scraper - Bilateral Trade by HS Code

Scrape bilateral trade data from UN Comtrade. Get import/export values between any two countries at HS code level. Find top traded product categories, track trade trends over time. Covers 200+ countries, all HS codes.

Pricing

from $0.90 / 1,000 results

Rating

0.0

(0)

Developer

Thirdwatch

Thirdwatch

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

UN Comtrade Trade Data Scraper

Scrape bilateral trade data between any two countries from the UN Comtrade database. Get import/export values broken down by HS (Harmonized System) product codes -- perfect for identifying top traded product categories and tracking trade trends over time.

What data is available?

UN Comtrade is the world's largest repository of international trade statistics, maintained by the United Nations. This actor fetches:

  • Bilateral trade flows between any two countries (200+ countries supported)
  • HS code level detail -- from 2-digit chapters (e.g., "85 - Electrical machinery") down to 6-digit subheadings
  • Trade values in USD, including CIF (cost, insurance, freight) for imports and FOB (free on board) for exports
  • Weight and quantity data where available
  • Annual or monthly data frequency
  • Multi-year data for trend analysis

Example use cases

  • Find top imports from China to India in electronics: Set reporter=India, partner=China, hsCode=85, flow=imports
  • Track India-China trade trends over 4 years: Set years=2020,2021,2022,2023
  • Identify what India exports to the USA: Set reporter=India, partner=USA, flow=exports
  • Find specific product trade values: Use 4 or 6-digit HS codes (e.g., 8517 for telecom equipment)

Input

FieldDescriptionDefault
reporterCountryThe country reporting the tradeIndia
partnerCountryThe trade partner countryChina
hsCodeHS code filter (2/4/6-digit). Empty = all chapters(empty)
flowTrade direction: "imports" or "exports"imports
yearsYear(s), comma-separated for trends2023
frequency"annual" or "monthly"annual
maxResultsMax records to return100

Output fields

FieldDescription
hs_codeHarmonized System product code
hs_descriptionHuman-readable product description
trade_value_usdTotal trade value in US dollars
cif_value_usdCIF value (cost + insurance + freight, for imports)
fob_value_usdFOB value (free on board, for exports)
net_weight_kgNet weight in kilograms
quantityQuantity in the reported unit
quantity_unitUnit of measurement for quantity
yearReference year
periodPeriod code (year for annual, YYYYMM for monthly)
reporter_countryReporting country name
partner_countryPartner country name
flow"import" or "export"
unit_price_usdCalculated: trade_value / quantity (or weight)

Results are sorted by trade_value_usd descending, so the biggest trade categories come first.

Supported countries (top 20 trading nations)

India, China, USA, UK, Germany, Japan, South Korea, France, Italy, Canada, Australia, Brazil, Mexico, Indonesia, Thailand, Vietnam, Malaysia, Singapore, UAE, Saudi Arabia

You can also pass numeric M49 country codes directly for countries not in this list.

Technical details

  • Pure HTTP actor (no browser needed), runs on 256 MB memory
  • Uses the UN Comtrade public preview API (no authentication required)
  • Data typically lags 1-2 years behind current date
  • No proxy needed -- UN Comtrade has no anti-bot protection