Census Trade Scraper
Pricing
from $3.50 / 1,000 results
Go to Apify Store

Census Trade Scraper
Pricing
from $3.50 / 1,000 results
Rating
0.0
(0)
Developer

Fortuitous Pirate
Maintained by Community
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
3 days ago
Last modified
Categories
Share
US Census International Trade Data Scraper
Extract US import and export trade data from the official Census Bureau International Trade API. Get trade values, quantities, and commodity descriptions by HS code, country, and port.
Features
- Import & Export Data: Query US imports, exports, or both
- Multiple Data Levels: By HS code, port, NAICS industry, or end-use category
- Flexible Filtering: Filter by commodity (HS code), country, port, date range
- Quantity Data: Includes quantities and units of measure
- Date Ranges: Query single months or multi-month ranges (2013-present)
- No API Key Required: Works without authentication (key optional for higher limits)
Data Available
| Field | Description |
|---|---|
tradeType | "import" or "export" |
time | Month (YYYY-MM format) |
commodityCode | HS code (2, 4, 6, or 10 digits) |
commodityDescription | Human-readable commodity name |
countryName | Trading partner country |
countryCode | Census country code |
tradeValueMonthly | Trade value in USD for the month |
tradeValueYTD | Year-to-date trade value (optional) |
quantity | Quantity traded |
unit | Unit of measure (e.g., NO, KG, LTR) |
portCode | Port district code (if port-level) |
portName | Port name (if port-level) |
Input Examples
All US-China trade in vehicles (HS 87) for 2024
{"tradeType": "both","hsCode": "87","countryCode": "5700","startMonth": "2024-01","endMonth": "2024-12","aggregationLevel": "HS4"}
Semiconductor imports by port
{"tradeType": "imports","dataLevel": "porths","hsCode": "8542","startMonth": "2024-06"}
All exports to Mexico, broad categories
{"tradeType": "exports","countryCode": "2010","startMonth": "2024-01","aggregationLevel": "HS2"}
Common Country Codes
| Code | Country |
|---|---|
| 5700 | China |
| 2010 | Mexico |
| 1220 | Canada |
| 5880 | Japan |
| 4280 | Germany |
| 4120 | United Kingdom |
| 5830 | South Korea |
| 5330 | India |
Common HS Codes
| Code | Category |
|---|---|
| 84 | Machinery, mechanical appliances |
| 85 | Electrical machinery, equipment |
| 87 | Vehicles |
| 27 | Mineral fuels, oils |
| 90 | Optical, medical instruments |
| 8471 | Computers |
| 8542 | Integrated circuits |
| 8703 | Motor cars |
| 2709 | Crude petroleum |
API Information
- Source: US Census Bureau International Trade API
- Data Range: Monthly from 2013-present
- Update Frequency: Monthly (approximately 6-week lag)
- Documentation: https://www.census.gov/data/developers/data-sets/international-trade.html
Output
Results are saved to the default dataset. Each record includes:
- Trade type (import/export)
- Time period
- Commodity code and description
- Country information
- Trade value in USD
- Quantity and unit (if available)
- Port information (if port-level query)
Notes
- Large queries may be limited by the API. Use filters to narrow results.
- API key is optional but recommended for heavy usage.
- Get a free API key at: https://api.census.gov/data/key_signup.html