Pushbuild

US Imports & Exports by Product and Country (Census Trade)

Monthly US imports and exports by HS product code (2 to 10 digits) and partner country from the Census Bureau: value, year-to-date value, quantity and year-over-year change. Track tariffs, supply chains and commodity flows.

$0.40 per 1,000 trade rows

Get an API key

What it returns

Official monthly US trade statistics from the Census Bureau, by product and partner country, in clean JSON.

One row per month, product and country: HS code and description, partner country (or group: EU, ASEAN, USMCA, continents, world total), **value in USD**, year-to-date value, quantity and unit, and **year-over-year change %**. Imports are general imports; exports are total exports.

Request

POST https://api.pushbuild.com/us-trade-imports-exports/run with a JSON body. Send your key in the X-API-Key header.

FieldTypeDescription
hsCodeslist of stringsHarmonized System codes, 2, 4, 6 or 10 digits, e.g. 8542 (integrated circuits), 870380 (electric cars). Empty = all 2-digit chapters.
flowslist of stringsDefault: both.
byCountrybooleanOne row per country and group (EU, ASEAN, continents) instead of the world total. Default: false.
countrieslist of stringsPartner names as Census spells them (CHINA, MEXICO, KOREA, SOUTH) or 4-digit Census codes. Overrides the breakdown.
monthFromstringYYYY-MM. Default: 25 months ago, so the last year has year-over-year change.
monthTostringYYYY-MM. Default: last month (Census publishes about 5 weeks after month end).
includeZerobooleanKeep country-months with no trade. Default: false.
maxItemsintegerMaximum items to return (1-500). Default: 100.

Example

curl -X POST https://api.pushbuild.com/us-trade-imports-exports/run \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hsCodes": ["8542", "8703"], "maxItems": 20}'

Response

{"count": 20, "truncated": false, "seconds": 1.4, "items": [ { ... } ]}

Each call returns up to 500 items. Records that fail validation or are not found are flagged in the items and not charged.

Pricing

Pay only for results returned: $0.40 per 1,000 trade rows. No charge for errors or empty searches.

Tell us what you need built.

Questions about this API, higher volumes, or a data source you need that we don't cover yet.

hello@pushbuild.com

(617) 299-8887

Tell us about your project

A few questions so we can come back with a written scope. We reply within one business day.