census_imports
Pack: census-trade · Endpoint: https://gateway.pipeworx.io/census-trade/mcp
Search US import data by HS commodity code (e.g., “8471” for computers) and/or country (e.g., “China”). Returns import values, quantities, and commodity details.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hs_code | string | yes | HS commodity code at 2, 4, or 6 digit level (e.g., “8471” for computers, “87” for vehicles) |
country_code | string | no | Census country code (e.g., “5700” for China, “2010” for Mexico). Optional — omit for all countries. |
year | string | yes | Trade year (e.g., “2024”) |
month | string | no | Trade month 01-12 (e.g., “06” for June). Optional — omit for annual data. |
limit | number | no | Maximum number of records to return (default 20) |
Example call
Arguments
{
"hs_code": "8471",
"year": "2024"
}
curl
curl -X POST https://gateway.pipeworx.io/census-trade/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"census_imports","arguments":{"hs_code":"8471","year":"2024"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('census_imports', {
"hs_code": "8471",
"year": "2024"
});
More examples
{
"hs_code": "87",
"country_code": "5700",
"year": "2023",
"month": "06",
"limit": 50
}
Response shape
Always returns: type, hs_code, period, count, records
| Field | Type | Description |
|---|---|---|
type | string | Trade direction indicator |
hs_code | string | HS commodity code queried |
period | string | Trade period (year or year-month) |
count | number | Number of records returned |
records | array |
Full JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Trade direction indicator"
},
"hs_code": {
"type": "string",
"description": "HS commodity code queried"
},
"period": {
"type": "string",
"description": "Trade period (year or year-month)"
},
"count": {
"type": "number",
"description": "Number of records returned"
},
"records": {
"type": "array",
"items": {
"type": "object",
"properties": {
"commodity_code": {
"type": "string",
"description": "HS commodity code"
},
"country_code": {
"type": "string",
"description": "Census country code"
},
"country_name": {
"type": "string",
"description": "Country name"
},
"import_value_usd": {
"type": "number",
"description": "Import value in USD"
},
"quantity": {
"type": "number",
"description": "Import quantity"
},
"period": {
"type": "string",
"description": "Trade period"
}
},
"required": [
"commodity_code",
"country_code",
"country_name",
"import_value_usd",
"quantity",
"period"
]
}
}
},
"required": [
"type",
"hs_code",
"period",
"count",
"records"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"census-trade": {
"url": "https://gateway.pipeworx.io/census-trade/mcp"
}
}
}
See Getting Started for client-specific install steps.