Country Trade Data

Get a country's top exports and imports, trade balance and main trading partners, from the World Bank.

Pay by wallet (x402) country-trade-data

Example

Input
{
  "year": 2025,
  "country_code": "SE"
}
Answer
{
  "note": "Product breakdown and partner data are estimates based on 2023 published trade statistics.",
  "year": 2025,
  "data_source": "embedded-trade-data",
  "top_exports": [
    {
      "product": "Refined petroleum",
      "value_usd": 14000000000,
      "share_percent": 7.2
    },
    {
      "product": "Automobiles (Volvo)",
      "value_usd": 12000000000,
      "share_percent": 6.2
    },
    {
      "product": "Pharmaceuticals",
      "value_usd": 11000000000,
      "share_percent": 5.6
    },
    {
      "product": "Iron and steel",
      "value_usd": 8000000000,
      "share_percent": 4.1
    },
    {
      "product": "Telecommunications equipment (Ericsson)",
      "value_usd": 8000000000,
      "share_percent": 4.1
    }
  ],
  "top_imports": [
    {
      "product": "Crude petroleum",
      "value_usd": 12000000000,
      "share_percent": 6.2
    },
    {
      "product": "Automobiles",
      "value_usd": 11000000000,
      "share_percent": 5.6
    },
    {
      "product": "Pharmaceuticals",
      "value_usd": 5500000000,
      "share_percent": 2.8
    },
    {
      "product": "Broadcasting equipment",
      "value_usd": 5000000000,
      "share_percent": 2.6
    },
    {
      "product": "Computers",
      "value_usd": 4500000000,
      "share_percent": 2.3
    }
  ],
  "country_code": "SE",
  "country_name": "Sweden",
  "top_partners": [
    {
      "type": "export",
      "country": "Germany",
      "trade_value_usd": 20000000000
    },
    {
      "type": "export",
      "country": "Norway",
      "trade_value_usd": 18000000000
    },
    {
      "type": "import",
      "country": "Germany",
      "trade_value_usd": 30000000000
    },
    {
      "type": "import",
      "country": "Netherlands",
      "trade_value_usd": 15000000000
    },
    {
      "type": "import",
      "country": "China",
      "trade_value_usd": 12000000000
    }
  ],
  "total_exports_usd": 195000000000,
  "total_imports_usd": 195000000000,
  "trade_balance_usd": 0
}

Inputs

FieldTypeRequiredWhat it is
yearnumberNo—
country_codestringYes—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
top_exportsarrayAlways (present in every successful answer)
top_importsarrayAlways (present in every successful answer)
total_exports_usdnumberAlways (present in every successful answer)
total_imports_usdnumberAlways (present in every successful answer)
trade_balance_usdnumberAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "country-trade-data",
    "inputs": {
      "year": 2025,
      "country_code": "SE"
    },
    "max_price_cents": 20
  }'

Limitations

  • Trade figures can lag by 6–12 months

    Trade statistics based on AI knowledge — most recent data may lag 6-12 months behind actual trade flows

    What to do instead: Cross-reference with UN Comtrade or national customs statistics for the most current trade figures