Skip to content
Eden Engine

Country Trade Data (Exports, Imports, Balance & Partners)

omnial/x402-country-trade-data

Given a country code (and an optional year), returns the country's total exports and imports in USD, its trade balance, its top exported and imported products with each product's share of trade, and its top trading partners -- country totals from World Bank trade statistics; the product and partner breakdowns are estimates.

activeper callv3

Price

Up to $0.325 per call; you pay what the call used

You pay the price shown. If a call turns out to cost more than its quote, you pay the actual price, capped at twice the quote. No monthly minimum. Top-ups start at $5.00.

Data source

World Bank

Data from World Bank.

Use it

Your AI assistant does the work: it finds this tool, shows you the price first, runs it, and you are charged when the run finishes. There is nothing to set up for this tool in particular.

Connect once and your AI can find and run this tool, and any other it needs.

For developers: the calls your assistant makes
agent
// 1. search: find the tool
omnial_search({ query: "what you need" })

// 2. inspect: price and input schema
omnial_inspect({ tool: "omnial/x402-country-trade-data" })

// 3. learn: read the usage guide at runtime
omnial_learn({ tool: "omnial/x402-country-trade-data" })

// 4. run: price the exact call first, then run it
omnial_execute({ tool: "omnial/x402-country-trade-data", input: { /* see input_schema */ }, dry_run: true })
omnial_execute({ tool: "omnial/x402-country-trade-data", input: { /* ... */ } })

// 5. settle: the call is charged when it finishes, nothing to do

Not connected yet? Point your MCP client at https://mcp.eden-engine.com/mcp, then copy a config for your client.

Pricing

Every charge this tool can incur.

ChargePrice
Per call
$0.325
Updated
Oct 27, 2026

Input and output schemas

Input schema
input_schema.json
{
  "type": "object",
  "required": [
    "country_code"
  ],
  "properties": {
    "year": {
      "type": "number"
    },
    "country_code": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
Output schema
output_schema.json
{
  "type": "object",
  "required": [
    "country_code",
    "country_name",
    "year",
    "total_exports_usd",
    "total_imports_usd",
    "trade_balance_usd",
    "top_exports",
    "top_imports",
    "top_partners",
    "data_source",
    "note"
  ],
  "properties": {
    "note": {
      "type": "string",
      "description": "A caveat about estimate quality. Observed as the SAME text -- '...based on 2023 published trade statistics' -- regardless of the requested year (e.g. 2022); this reads as a static disclaimer rather than one adjusted to the requested/returned year."
    },
    "year": {
      "type": "number",
      "description": "The trade data's reference year. Observed as 2023 when the optional `year` input was omitted and as the requested 2022 when it was supplied."
    },
    "data_source": {
      "type": "string",
      "description": "Typically the literal string 'World Bank API + embedded product data'."
    },
    "top_exports": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product": {
            "type": "string"
          },
          "value_usd": {
            "type": "number"
          },
          "share_percent": {
            "type": "number",
            "description": "Percent of total exports this product represents."
          }
        },
        "additionalProperties": true
      },
      "description": "Typically 5 entries."
    },
    "top_imports": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product": {
            "type": "string"
          },
          "value_usd": {
            "type": "number"
          },
          "share_percent": {
            "type": "number",
            "description": "Percent of total imports this product represents."
          }
        },
        "additionalProperties": true
      },
      "description": "Typically 5 entries, same shape as top_exports."
    },
    "country_code": {
      "type": "string",
      "description": "Two-letter ISO country code the endpoint resolved to, e.g. 'US', 'DE' -- note this differs from the three-letter code accepted as input (e.g. 'USA', 'DEU')."
    },
    "country_name": {
      "type": "string"
    },
    "top_partners": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "'export' or 'import' -- which direction this partner relationship represents. Observed as one of these two values."
          },
          "country": {
            "type": "string"
          },
          "trade_value_usd": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "description": "Typically 5 entries, mixing export-direction and import-direction partners in one list rather than two separate lists."
    },
    "total_exports_usd": {
      "type": "number"
    },
    "total_imports_usd": {
      "type": "number"
    },
    "trade_balance_usd": {
      "type": "number",
      "description": "Exports minus imports; e.g. negative for the US (a trade deficit) and positive for Germany (a trade surplus)."
    }
  },
  "description": "The country trade record.",
  "additionalProperties": true
}