census_exports

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

Search US export data by HS commodity code and/or country. Returns export values, quantities, and commodity details. Pass country as a plain English name (e.g. “Mexico”). Omit hs_code for total exports to a country; omit country for all countries combined.

Parameters

NameTypeRequiredDescription
hs_codestringnoHS commodity code at 2, 4, or 6 digit level (e.g., “8471” for computers). Optional — omit for total exports across all commodities.
countrystringnoCountry name in plain English (e.g., “Mexico”, “South Korea”, “European Union”). Preferred over country_code — this is resolved for you. Optional — omit for all countries combined.
country_codestringnoCensus Schedule C country code if you already have one (e.g., “5700” China, “2010” Mexico). NOT an ISO code — “MX” and “CN” will not work. Prefer country and pass a name instead. Optional.
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

{
  "country": "Mexico",
  "hs_code": "87",
  "year": "2025"
}

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":{"country":"Mexico","hs_code":"87","year":"2025"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('census_exports', {
  "country": "Mexico",
  "hs_code": "87",
  "year": "2025"
});

More examples

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

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 August 8, 2026