# 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](https://pushbuild.com/apis/app/signup?api=us-trade-imports-exports)

Example request

```
POST /us-trade-imports-exports/run
{
  "hsCodes": [
    "8542",
    "8703"
  ],
  "maxItems": 20
}
```

## What a response looks like

POST /us-trade-imports-exports/run{"hsCodes": ["8542", "8703"], "maxItems": 5}

```
{"count": 5, "items": [{ "country": "TOTAL FOR ALL COUNTRIES", "countryCode": "-", "description": "ELECTRONIC INTEGRATED CIRCUITS & MICROASSEMBL, PTS", "flow": "imports", "hsCode": "8542", "hsLevel": "HS4", "isCountryGroup": true, "month": "2026-09", "quantity": 0.0, "unit": "-", … ]}
```

| country | countryCode | description | flow | hsCode | hsLevel |
| --- | --- | --- | --- | --- | --- |
| TOTAL FOR ALL COUNTRIES | - | ELECTRONIC INTEGRATED CIRCUITS & MICROASSEMBL,… | imports | 8542 | HS4 |
| TOTAL FOR ALL COUNTRIES | - | ELECTRONIC INTEGRATED CIRCUITS & MICROASSEMBL,… | imports | 8542 | HS4 |
| TOTAL FOR ALL COUNTRIES | - | ELECTRONIC INTEGRATED CIRCUITS & MICROASSEMBL,… | imports | 8542 | HS4 |
| TOTAL FOR ALL COUNTRIES | - | ELECTRONIC INTEGRATED CIRCUITS & MICROASSEMBL,… | imports | 8542 | HS4 |
| TOTAL FOR ALL COUNTRIES | - | ELECTRONIC INTEGRATED CIRCUITS & MICROASSEMBL,… | imports | 8542 | HS4 |

Real rows returned by this API on 2026-11-21 for the request shown.

## 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.

| Field | Type | Description |
| --- | --- | --- |
| `hsCodes` | list of strings | Harmonized System codes, 2, 4, 6 or 10 digits, e.g. 8542 (integrated circuits), 870380 (electric cars). Empty = all 2-digit chapters. |
| `flows` | list of strings | Default: both. |
| `byCountry` | boolean | One row per country and group (EU, ASEAN, continents) instead of the world total. Default: `false`. |
| `countries` | list of strings | Partner names as Census spells them (CHINA, MEXICO, KOREA, SOUTH) or 4-digit Census codes. Overrides the breakdown. |
| `monthFrom` | string | YYYY-MM. Default: 25 months ago, so the last year has year-over-year change. |
| `monthTo` | string | YYYY-MM. Default: last month (Census publishes about 5 weeks after month end). |
| `includeZero` | boolean | Keep country-months with no trade. Default: `false`. |
| `maxItems` | integer | Maximum 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.

| Trade rows | Cost |
| --- | --- |
| 1,000 | $0.40 |
| 10,000 | $4.00 |
| 100,000 | $40.00 |
| 1,000,000 | $400.00 |
| 2,500 a month | Free ($1 monthly credit) |

## Use it from Claude, ChatGPT or Cursor

This API is also an MCP server: `https://api.pushbuild.com/mcp/us-trade-imports-exports`. Add it to any assistant that supports remote MCP servers, with your key in the `X-API-Key` header. Same prices. [Setup for each app](https://pushbuild.com/apis/mcp.html).

## Related APIs

- [EU & UK Public Tenders API](https://pushbuild.com/apis/eu-uk-tenders.html): Search open public-sector tenders across the EU (TED, Official Journal) and the UK (Contracts Finder) by keyword, country, CPV code, value and date.
- [Product Barcode Lookup API](https://pushbuild.com/apis/product-barcodes.html): Look up any EAN/UPC barcode or search 3M+ products: name, brand, quantity, ingredients, allergens, additives, nutrition per 100 g, Nutri-Score, NOVA and Eco-Score, categories, stores and image.
- [Mineral Commodities API](https://pushbuild.com/apis/usgs-mineral-commodities.html): USGS Mineral Commodity Summaries: US and world mine production, reserves, prices, imports, exports and consumption for 90+ mineral commodities (lithium, copper, rare earths, cobalt and more), critical-mineral flags and US net import reliance..
- [Upbit API](https://pushbuild.com/apis/upbit-market-data.html): Upbit (Korea) market data: tickers for every KRW, BTC and USDT market with trade price, change, open, high, low, 24h volume and value, and 52-week high and low..
- [US Jobless Claims API: Weekly Initial & Continued Claims API](https://pushbuild.com/apis/us-jobless-claims.html): US weekly unemployment insurance claims from the Department of Labor: national initial and continued claims, seasonally adjusted and not, 4-week averages, seasonal factors and insured unemployment rate, plus initial and continued claims for every state, back to 1967..
- [US Government Directory API](https://pushbuild.com/apis/us-government-directory.html): Counties, cities, townships, special districts, schools, libraries, police, fire, hospitals, colleges, transit, tribes and water systems in one directory, keyed to federal IDs..

## 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](mailto:hello@pushbuild.com?subject=API%20question)

## New APIs and data, twice a month

New data APIs, coverage changes and analysis from Pushbuild. No spam; one click to leave.

---
As of 2026-12-03. Source: https://pushbuild.com/apis/us-trade-imports-exports.html
