

Commerce and Trade Competitiveness Data Hub
Data
Available ActionsEach successful request consumes credits as outlined below.
query_trade_data5cr
Details
Access World Bank trade and competitiveness data from TCdata360 (2,400+ indicators, 46 sources) for 200+ countries. Get merchandise exports/imports, trade balances, tariff rates, high-tech and ICT export shares, Logistics Performance Index rankings, Ease of Doing Business scores, and trade-to-GDP ratios. Includes CAGR trend analysis, regional comparisons, and SDG 17 alignment tracking.
Use Cases
Export market analysis,Trade competitiveness benchmarking,Tariff and logistics monitoring,Cross-border policy research,Country trade profile comparisons
Connect Your Agent In 5 Min
Watch the setup guide for your platform
Or Install Locally
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to https://api.agentpmt.com/mcp. All tool execution happens in the cloud and the server cannot edit any files on your computer.
npm install -g @agentpmt/mcp-routeragentpmt-setupActions(1)
query_trade_data5cr8 params(1 required)Fetch trade and competitiveness data for a country or region from the World Bank. Returns merchandise exports/imports, trade balance, tariff rates, high-tech/ICT export shares, Logistics Performance Index, Ease of Doing Business scores, trade openness ratios, CAGR trend analysis, and regional comparisons.
query_trade_data5cr8 params(1 required)Fetch trade and competitiveness data for a country or region from the World Bank. Returns merchandise exports/imports, trade balance, tariff rates, high-tech/ICT export shares, Logistics Performance Index, Ease of Doing Business scores, trade openness ratios, CAGR trend analysis, and regional comparisons.
country_or_regionrequiredstringCountry or region name in English (e.g., 'China', 'Japan', 'Vietnam', 'Sub-Saharan Africa'). Also accepts partial matches and income groups ('High Income', 'OECD'). Unicode names are not supported.
trade_topicstringTrade topic to query. Options: exports, imports, competitiveness, logistics, tariffs, trade_costs, or all.
Values:
exportsimportscompetitivenesslogisticstariffstrade_costsall
Default:
allcalculate_trade_balancebooleanCalculate trade balance (exports minus imports) if both merchandise export and import data are available.
Default:
trueinclude_doing_businessbooleanInclude Doing Business rankings and ease of doing business scores. Setting to false also filters out time-to-export/import and cost-to-export/import indicators.
Default:
trueinclude_lpibooleanInclude Logistics Performance Index (LPI) scores and rankings.
Default:
truetime_periodstringTime period: 'latest' (most recent), 'last_5_years', 'last_10_years', or specific range 'YYYY:YYYY' (e.g., '2015:2020').
Default:
latestinclude_regional_comparisonbooleanInclude regional and global comparison data (World, High Income, Upper Middle Income, Lower Middle Income) for key indicators.
Default:
trueinclude_trendsbooleanInclude trend analysis with absolute change, percent change, direction, and CAGR for indicators with multiple data points.
Default:
truecurl -X POST "https://api.agentpmt.com/products/purchase" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ********" \
-d '{
"product_id": "6980db6a71cad8f61bf5b1d4",
"parameters": {
"action": "query_trade_data",
"country_or_region": "example_country_or_region",
"trade_topic": "all",
"calculate_trade_balance": true,
"include_doing_business": true,
"include_lpi": true,
"time_period": "latest",
"include_regional_comparison": true,
"include_trends": true
}
}'import requests
import json
url = "https://api.agentpmt.com/products/purchase"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
}
data = {
"product_id": "6980db6a71cad8f61bf5b1d4",
"parameters": {
"action": "query_trade_data",
"country_or_region": "example_country_or_region",
"trade_topic": "all",
"calculate_trade_balance": true,
"include_doing_business": true,
"include_lpi": true,
"time_period": "latest",
"include_regional_comparison": true,
"include_trends": true
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6980db6a71cad8f61bf5b1d4",
parameters: {
"action": "query_trade_data",
"country_or_region": "example_country_or_region",
"trade_topic": "all",
"calculate_trade_balance": true,
"include_doing_business": true,
"include_lpi": true,
"time_period": "latest",
"include_regional_comparison": true,
"include_trends": true
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));const axios = require('axios');
const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6980db6a71cad8f61bf5b1d4",
parameters: {
"action": "query_trade_data",
"country_or_region": "example_country_or_region",
"trade_topic": "all",
"calculate_trade_balance": true,
"include_doing_business": true,
"include_lpi": true,
"time_period": "latest",
"include_regional_comparison": true,
"include_trends": true
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.message);
});Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
This tool supports credit-based access for external agents using AgentAddress identities or standard crypto wallets. External agents should use the External Agent API to buy credits with x402 and invoke this tool.
1. Buy Credits
Purchase credits via x402 payment (500 credit minimum, 100 credits = $1).
# Request payment requirements (returns 402 + PAYMENT-REQUIRED header)
curl -i -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'
# Sign the EIP-3009 authorization, then retry with signature header
curl -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64-json>" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'2. Create a Session Nonce (nonce used in signed balance/invoke)
curl -s -X POST "https://www.agentpmt.com/api/external/auth/session" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET" }'3. Invoke This Tool
Sign the message with your wallet (EIP-191 personal-sign), then POST to the invoke endpoint.
# Sign this message (wallet MUST be lowercased):
# agentpmt-external
# wallet:0xyourwallet...
# session:<session_nonce>
# request:<request_id>
# method:POST
# path:/external/tools/trade-competitiveness-data/actions/<actionSlug>/invoke
# payload:<sha256(canonical_json(parameters))>
curl -s -X POST "https://www.agentpmt.com/api/external/tools/trade-competitiveness-data/actions/<actionSlug>/invoke" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xYOUR_WALLET",
"session_nonce": "<session_nonce>",
"request_id": "invoke-uuid",
"signature": "0x<signature>",
"parameters": {
"your_param": "value"
}
}'Usage Instructions
Usage guidance provided directly by the developer for this product.
Commerce and Trade Competitiveness Data Hub
Overview
Natural language interface to World Bank trade and competitiveness data. Query exports, imports, trade balance, logistics performance, tariffs, and trade costs by country or region. Uses English country names only -- no indicator codes needed.
Data sourced from World Bank World Development Indicators (WDI) and TCdata360 (2,400+ indicators from 46 sources). Covers merchandise and service trade volumes, exports/imports as % of GDP, trade openness, Ease of Doing Business rankings, Logistics Performance Index (LPI), tariff rates, time and cost to trade, high-tech and ICT exports, and CAGR trend analysis. Includes regional/global comparisons, trade balance calculations, human-readable insights, and SDG 17 (Partnerships through Trade) alignment.
Actions
query_trade_data
Fetches trade and competitiveness data for a country or region from the World Bank.
Required parameters:
country_or_region(string): Country or region name in English (e.g., "China", "Japan", "Vietnam", "Sub-Saharan Africa"). Also accepts partial matches and income groups ("High Income", "OECD"). Unicode names are not supported. Unrecognized names return an error with a suggestion.
Optional parameters:
trade_topic(string): One of "exports", "imports", "competitiveness", "logistics", "tariffs", "trade_costs", or "all". Defaults to "all".calculate_trade_balance(boolean): Calculate trade balance (exports minus imports) if both merchandise export and import data are available. Defaults to true.include_doing_business(boolean): Include Doing Business rankings and ease of doing business scores. Defaults to true. Setting to false also filters out time-to-export/import and cost-to-export/import indicators.include_lpi(boolean): Include Logistics Performance Index scores. Defaults to true. Setting to false filters out the logistics_performance indicator.time_period(string): "latest" (most recent available), "last_5_years", "last_10_years", or a specific range "YYYY:YYYY" (e.g., "2015:2020"). Also accepts "YYYY-YYYY" format (converted to "YYYY:YYYY"). Defaults to "latest".include_regional_comparison(boolean): Include regional and global comparison data (World, High Income, Upper Middle Income, Lower Middle Income) for key indicators. Defaults to true.include_trends(boolean): Include trend analysis with absolute change, percent change, direction, and CAGR for indicators with multiple data points. Defaults to true.
Example -- All trade data for Vietnam:
{
"action": "query_trade_data",
"country_or_region": "Vietnam",
"trade_topic": "all",
"time_period": "latest"
}
Example -- Export trends for China over the last 10 years:
{
"action": "query_trade_data",
"country_or_region": "China",
"trade_topic": "exports",
"time_period": "last_10_years",
"include_trends": true
}
Example -- Competitiveness metrics for Singapore:
{
"action": "query_trade_data",
"country_or_region": "Singapore",
"trade_topic": "competitiveness",
"include_doing_business": true,
"include_lpi": true
}
Example -- Tariff analysis for India:
{
"action": "query_trade_data",
"country_or_region": "India",
"trade_topic": "tariffs",
"time_period": "latest"
}
Example -- Trade costs with regional comparison:
{
"action": "query_trade_data",
"country_or_region": "Rwanda",
"trade_topic": "trade_costs",
"include_regional_comparison": true
}
Example -- Logistics performance for Netherlands:
{
"action": "query_trade_data",
"country_or_region": "Netherlands",
"trade_topic": "logistics"
}
Example -- Imports data without Doing Business indicators:
{
"action": "query_trade_data",
"country_or_region": "Brazil",
"trade_topic": "imports",
"include_doing_business": false
}
Workflows
Country Trade Profile
- Call
query_trade_datawith a country andtrade_topic: "all"for a comprehensive trade overview. - Review the
insightsarray for human-readable analysis of trade patterns. - Check
trade_balancefor surplus/deficit status. - Review
regional_comparisonto see how the country compares to World, High Income, Upper Middle Income, and Lower Middle Income averages.
Trade Balance Analysis
- Call
query_trade_datawithcalculate_trade_balance: true(default). - The response includes a
trade_balancesection with exports, imports, balance amount, and surplus/deficit classification for each year. - Currency values are formatted in human-readable units (millions, billions, trillions).
Competitiveness Benchmarking
- Call
query_trade_datawithtrade_topic: "competitiveness". - Review Ease of Doing Business rank (1 = best, lower is better) and LPI score (1-5 scale, higher is better).
- Trade openness (trade as % of GDP) indicates how integrated the economy is with global trade.
Historical Trend Analysis
- Call
query_trade_datawithtime_period: "last_10_years"andinclude_trends: true. - Review the
trendssection for each indicator showing oldest/newest values, absolute and percent change, direction (improving/declining/stable), and CAGR. - For exports and competitiveness indicators, positive change means "improving". For tariffs, time, and cost indicators, negative change means "improving" (lower is better).
Notes
- Supported countries: 100+ countries by full English name (e.g., "Vietnam", "Japan", "Germany"), plus partial name matching. Also supports 2-3 letter ISO codes if they match known World Bank codes.
- Regions: "Sub-Saharan Africa", "Latin America", "Middle East", "South Asia", "East Asia", "Europe", "North America", "Arab World".
- Income groups: "Low Income", "Lower Middle Income", "Upper Middle Income", "High Income", "OECD".
- Special values: "World" or "Global" for worldwide data.
- Country name input longer than 100 characters is rejected.
- If country_or_region is empty, defaults to "World" (WLD).
- Trade topics and their indicators:
exports: merchandise exports, exports % of GDP, high-tech exports, ICT exports, service exports, time to export, cost to exportimports: merchandise imports, imports % of GDP, service imports, time to import, cost to importcompetitiveness: Ease of Doing Business rank, LPI, trade % of GDP, exports/imports % of GDPlogistics: LPI score, time to export/importtariffs: simple mean tariff rate, weighted mean tariff ratetrade_costs: time to export/import, cost to export/import, simple and weighted mean tariff ratesall: all available trade indicators
- Trade balance calculation: Exports minus imports. Positive = surplus, negative = deficit, zero = balanced. Calculated by matching merchandise export and import data by year.
- Currency formatting: Large values displayed in millions, billions, or trillions (e.g., "$1.23 trillion").
- CAGR (Compound Annual Growth Rate): Calculated when multi-year data is available and both start and end values are positive.
- Trend direction interpretation: For exports/competitiveness/logistics, positive change = "improving". For tariffs/time/cost/ease of doing business, negative change = "improving" (lower is better).
- Insights generated automatically: Trade surplus/deficit, export orientation (% of GDP), trade openness, LPI interpretation (world-class/strong/moderate/developing/challenges), Doing Business rank tier, tariff level, export process efficiency, ICT export strength, export growth trends, and comparison to global averages.
- LPI score interpretation: 4.0+ = world-class, 3.5-4.0 = strong, 3.0-3.5 = moderate, 2.5-3.0 = developing, below 2.5 = significant challenges.
- Ease of Doing Business interpretation: Rank 1-30 = top-tier, 31-100 = competitive, 100+ = challenges present. Note: Doing Business project was discontinued in 2021; latest data from 2020.
- Regional comparison: Compares key indicators (exports % of GDP, imports % of GDP, trade % of GDP, LPI, Ease of Doing Business) against World, High Income, Upper Middle Income, and Lower Middle Income averages.
- Data availability varies by country and indicator. Most recent data is typically 1-2 years behind the current year.
- SDG alignment: SDG 17 (Partnerships for the Goals), SDG 17.10 (universal trading system), SDG 17.11 (increase developing country exports).





