census_exports

Pack: census-trade · Endpoint: https://gateway.pipeworx.io/census-trade/mcp

Search US export data by HS commodity code (e.g., “8471” for computers) and/or country (e.g., “Mexico”). Returns export values, quantities, and commodity details.

Parameters

NameTypeRequiredDescription
hs_codestringyesHS commodity code at 2, 4, or 6 digit level (e.g., “8471” for computers)
country_codestringnoCensus country code (e.g., “5700” for China). Optional — omit for all countries.
yearstringyesTrade year (e.g., “2024”)
monthstringnoTrade month 01-12. Optional — omit for annual data.
limitnumbernoMaximum 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_exports","arguments":{"hs_code":"8471","year":"2024"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('census_exports', {
  "hs_code": "8471",
  "year": "2024"
});

More examples

{
  "hs_code": "2709",
  "country_code": "2010",
  "year": "2023",
  "limit": 30
}

Response shape

Always returns: type, hs_code, period, count, records

FieldTypeDescription
typestringTrade direction indicator
hs_codestringHS commodity code queried
periodstringTrade period (year or year-month)
countnumberNumber of records returned
recordsarray
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"
          },
          "export_value_usd": {
            "type": "number",
            "description": "Export value in USD"
          },
          "quantity": {
            "type": "number",
            "description": "Export quantity"
          },
          "period": {
            "type": "string",
            "description": "Trade period"
          }
        },
        "required": [
          "commodity_code",
          "country_code",
          "country_name",
          "export_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.

Regenerated from source · build May 9, 2026