Build with SOTW Data
Global statistics, official ECB exchange rates, World Bank commodity benchmarks, an institutional release calendar, and prediction markets — all free via API.
MCP Server
The Model Context Protocol (MCP) lets AI agents like Claude directly query SOTW data. Point your MCP client at the hosted endpoint below. No installation needed; the X-API-Key is optional under 1,000 requests/day.
// Claude Desktop / Cursor / Cline config
{
"mcpServers": {
"sotw": {
"transport": {
"type": "streamable-http",
"url": "https://statisticsoftheworld.com/api/mcp",
"headers": { "X-API-Key": "sotw_YOUR_KEY_HERE" }
}
}
}
}Available Tools (8)
| Tool | Description |
|---|---|
| get_country_overview | All key stats + AI narrative for a country |
| get_indicator_ranking | Rank countries by any indicator (top/bottom N) |
| get_historical_data | 20+ years of time series data |
| compare_countries | Side-by-side comparison of 2-10 countries |
| search_indicators | Find indicators by keyword |
| get_available_indicators | List all 334 indicators by category |
| get_country_list | All 218 countries with metadata |
| get_release_calendar | Central-bank decisions and official release dates from primary schedules |
REST API
Basic access is free, returns JSON, and requires no authentication. Add format=markdown to v2 endpoints for LLM-friendly output.
Country Data
334 indicators · 218 countries/api/v2/country/:idAll indicators for a country with AI narrative and suggested follow-ups
curl https://statisticsoftheworld.com/api/v2/country/USA?format=markdown/api/v2/indicator/:idCountry rankings by indicator with metadata and related indicators
curl "https://statisticsoftheworld.com/api/v2/indicator/IMF.NGDPD?limit=10&order=desc"/api/v2/historyHistorical time series (20+ years) with YoY, CAGR, min/max stats
curl "https://statisticsoftheworld.com/api/v2/history?indicator=IMF.NGDPD&country=USA"/api/v1/searchSearch indicators by keyword
curl "https://statisticsoftheworld.com/api/v1/search?q=gdp"/api/v1/compareCompare 2-10 countries side by side
curl "https://statisticsoftheworld.com/api/v1/compare?countries=USA,CHN,JPN"/api/v1/countriesList all 218 countries with region, income level, capital
curl https://statisticsoftheworld.com/api/v1/countries/api/v1/indicatorsList all 334 indicators with categories
curl https://statisticsoftheworld.com/api/v1/indicators/api/chatNatural language query — ask anything about global statistics
curl -X POST https://statisticsoftheworld.com/api/chat \
-H "Content-Type: application/json" \
-d '{"message":"top 5 countries by GDP per capita"}'Markets
ECB FX · World Bank commodities/api/quotesOfficial reference prices: daily ECB euro foreign-exchange reference rates and monthly World Bank Pink Sheet commodity benchmarks
curl https://statisticsoftheworld.com/api/quotesPrediction Markets
Polymarket/api/predictionsReal-money prediction markets with probability, volume, liquidity. Filter by category or search.
curl "https://statisticsoftheworld.com/api/predictions?limit=20&category=Elections+%26+Politics"Release Calendar
ECB · BoC · BEA/api/v1/calendarCentral-bank decisions, official data releases, and IMF/World Bank meeting dates from primary institutional schedules. Supports from/to/institution filters and format=csv
curl "https://statisticsoftheworld.com/api/v1/calendar?institution=ECB"Trade Data
UN COMTRADE/api/tradeBilateral trade flows — top import/export partners and product breakdown
curl "https://statisticsoftheworld.com/api/trade?country=USA"Analytics
/api/forecastsIMF 2-year forecasts for GDP growth, inflation, unemployment, etc.
curl "https://statisticsoftheworld.com/api/forecasts?indicator=IMF.NGDP_RPCH"/api/correlationsCross-indicator correlations (r-value, r-squared, sample size)
curl https://statisticsoftheworld.com/api/correlations/api/heatmapMulti-indicator country heatmap data with preset categories
curl https://statisticsoftheworld.com/api/heatmap/api/sparklines10-year sparkline data for any indicator across all countries
curl "https://statisticsoftheworld.com/api/sparklines?indicator=IMF.NGDP_RPCH"range parameter with values: 1d, 5d, 1mo, 3mo, 6mo, 1y, 5y, maxOpenAPI & GPT Actions
Use our OpenAPI 3.1 spec with any AI framework — LangChain, CrewAI, AutoGen, GPT Actions, and more.
# Python — LangChain
from langchain_community.tools import OpenAPIToolkit
toolkit = OpenAPIToolkit.from_openapi_spec(
"https://statisticsoftheworld.com/api/openapi.json"
)
# JavaScript — fetch
const spec = await fetch("https://statisticsoftheworld.com/api/openapi.json")
.then(r => r.json());AI Discovery Files
Machine-readable files for AI crawlers and answer engines.
| /llms.txt | Site overview, all API endpoints, data coverage, key IDs |
| /api/openapi.json | OpenAPI 3.1 specification |
| /.well-known/ai-plugin.json | GPT Actions / ChatGPT plugin manifest |
Key IDs Reference
Country Indicators
IMF.NGDPDGDP (nominal, USD billions)IMF.NGDPDPCGDP per capita (USD)IMF.NGDP_RPCHReal GDP growth (%)IMF.PPPPCGDP per capita, PPPSP.POP.TOTLPopulationSP.DYN.LE00.INLife expectancyIMF.PCPIPCHInflation rate (%)IMF.LURUnemployment rate (%)IMF.GGXWDG_NGDPGovernment debt (% GDP)EN.GHG.CO2.PC.CE.AR5CO2 emissions per capitaSI.POV.GINIGini index (inequality)MS.MIL.XPND.GD.ZSMilitary spending (% GDP)SE.XPD.TOTL.GD.ZSEducation spending (% GDP)SH.XPD.CHEX.GD.ZSHealth spending (% GDP)IT.NET.USER.ZSInternet users (%)NE.TRD.GNFS.ZSTrade openness (% GDP)Stock Index IDs
YF.IDX.USAS&P 500 (United States)YF.IDX.GBRFTSE 100 (United Kingdom)YF.IDX.DEUDAX (Germany)YF.IDX.JPNNikkei 225 (Japan)YF.IDX.CHNSSE Composite (China)YF.IDX.INDBSE Sensex (India)YF.IDX.CANTSX Composite (Canada)YF.IDX.AUSASX 200 (Australia)YF.IDX.KORKOSPI (South Korea)YF.IDX.BRABovespa (Brazil)YF.FUT.SP500S&P 500 FuturesYF.FUT.NASDAQNASDAQ FuturesCommodity IDs
YF.GOLDGoldYF.SILVERSilverYF.CRUDE_OILWTI Crude OilYF.BRENTBrent CrudeYF.NATGASNatural GasYF.COPPERCopperYF.WHEATWheatYF.CORNCornYF.SOYBEANSSoybeansYF.COFFEECoffeeSINA.COPPERCopper (SHFE, China)SINA.IRON_ORE_CNIron Ore (DCE, China)FX Pairs & Prediction Categories
EURUSDEuro / US DollarUSDJPYUS Dollar / Japanese YenGBPUSDBritish Pound / US DollarUSDCADUS Dollar / Canadian DollarAUDUSDAustralian Dollar / US DollarUSDCNYUS Dollar / Chinese YuanExample AI Workflows
Data Sources
Country-indicator responses include source-specific attribution. Reuse rights vary by provider: WHO series are non-commercial, IMF and UN have separate terms, and market or trade feeds retain vendor terms. Paid delivery is limited to a separately reviewed 277-indicator World Bank catalog.