# Census international trade by commodity and country

US international goods trade from the Census Bureau: exports and imports by HS commodity code and trading partner, monthly.

- No API key needed to call. The provider needs an API key; AgentNative holds it.
- Source: [US Census Bureau Data API](https://www.census.gov/data/developers.html)
- Licence and terms: [US federal work, 17 U.S.C. 105; Census Bureau API terms](https://www.census.gov/data/developers/about/terms-of-service.html)
- Coverage: United States trade
- Answers are shared and cached for 86400 seconds.

## Questions you can ask

- What was the value of US vehicle exports to China in January 2024? (operation `census_exports_hs`)
- What was the value of US vehicle imports from China in January 2024? (operation `census_imports_hs`)

## Operations

### US exports by HS commodity and country

Answers: what was the value of US exports of an HS2 commodity chapter \(for example 87 vehicles\) to a country in a month?

- `hs2`: required, string, Two-digit HS chapter.
- `country_code`: required, string, Census country code, for example 5700 China, 1220 Canada, 2010 Mexico.
- `month`: required, string, YYYY-MM.

Example: What was the value of US vehicle exports to China in January 2024?

Over MCP:

```
{"tool":"call_connector_operation","arguments":{"connector":"census_trade","operation":"census_exports_hs","params":{"hs2":"87","country_code":"5700","month":"2024-01"}}}
```

Over HTTP:

```
curl '/v1/connectors/census_trade/census_exports_hs?hs2=87&country_code=5700&month=2024-01'
```

### US imports by HS commodity and country

Answers: what was the value of US imports of an HS2 commodity chapter \(for example 87 vehicles\) from a country in a month?

- `hs2`: required, string, Two-digit HS chapter.
- `country_code`: required, string, Census country code, for example 5700 China, 1220 Canada, 2010 Mexico.
- `month`: required, string, YYYY-MM.

Example: What was the value of US vehicle imports from China in January 2024?

Over MCP:

```
{"tool":"call_connector_operation","arguments":{"connector":"census_trade","operation":"census_imports_hs","params":{"hs2":"87","country_code":"5700","month":"2024-01"}}}
```

Over HTTP:

```
curl '/v1/connectors/census_trade/census_imports_hs?hs2=87&country_code=5700&month=2024-01'
```

## Source notice

Source: US Census Bureau. This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau. US federal government works are not subject to copyright: 17 U.S.C. 105 states "Copyright protection under this title is not available for any work of the United States Government".

## Missing something?

Tell us what data, endpoint or feature you wish we had. It is free and needs no signup: call the MCP tool request_capability, or POST a short description to https://agentnative.dennery.ai/v1/capabilities/request.
