UN Comtrade Trade Data Scraper - Bilateral Trade by HS Code
Pricing
from $0.90 / 1,000 results
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
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
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
| Field | Description | Default |
|---|---|---|
| reporterCountry | The country reporting the trade | India |
| partnerCountry | The trade partner country | China |
| hsCode | HS code filter (2/4/6-digit). Empty = all chapters | (empty) |
| flow | Trade direction: "imports" or "exports" | imports |
| years | Year(s), comma-separated for trends | 2023 |
| frequency | "annual" or "monthly" | annual |
| maxResults | Max records to return | 100 |
Output fields
| Field | Description |
|---|---|
| hs_code | Harmonized System product code |
| hs_description | Human-readable product description |
| trade_value_usd | Total trade value in US dollars |
| cif_value_usd | CIF value (cost + insurance + freight, for imports) |
| fob_value_usd | FOB value (free on board, for exports) |
| net_weight_kg | Net weight in kilograms |
| quantity | Quantity in the reported unit |
| quantity_unit | Unit of measurement for quantity |
| year | Reference year |
| period | Period code (year for annual, YYYYMM for monthly) |
| reporter_country | Reporting country name |
| partner_country | Partner country name |
| flow | "import" or "export" |
| unit_price_usd | Calculated: 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