Government
Rank all countries by a World Bank indicator API
Cross-country leaderboard for any World Bank development indicator (GDP per capita, life expectancy, CO2, internet users, …) with 1-based rank and global percentile per country, region/income aggregates filtered out. Answers 'which country has the highest GDP per capita', 'rank countries by inflation', 'where does each country sit globally on this metric'.
Price$0.01per request
MethodPOST
Route/v1/gov/worldbank-indicator-ranking
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache86400s public
govecon-dataworld-bankrankingindicatorsgdpdevelopmentleaderboardpercentile
API URL
Integration docshttps://x402.hexl.dev/v1/gov/worldbank-indicator-rankingExample request
{
"metric": "gdp-per-capita",
"limit": 5
}Example response
{
"indicator": "NY.GDP.PCAP.CD",
"metric": "gdp-per-capita",
"year": 2024,
"order": "desc",
"countriesRanked": 215,
"leaderboard": [
{
"country": "Monaco",
"iso3": "MCO",
"value": 288001.4334,
"rank": 1,
"percentile": 100
},
{
"country": "Liechtenstein",
"iso3": "LIE",
"value": 206780.5904,
"rank": 2,
"percentile": 99.53
},
{
"country": "Bermuda",
"iso3": "BMU",
"value": 142855.3747,
"rank": 3,
"percentile": 99.07
},
{
"country": "Luxembourg",
"iso3": "LUX",
"value": 137781.6817,
"rank": 4,
"percentile": 98.6
},
{
"country": "Ireland",
"iso3": "IRL",
"value": 112894.9532,
"rank": 5,
"percentile": 98.13
}
]
}Input schema
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"description": "Plain metric name: gdp, gdp-per-capita, gdp-growth, population, inflation, unemployment, life-expectancy, co2-per-capita, internet-users, exports, imports, government-debt, poverty-rate, urban-population, mobile-subscriptions."
},
"indicator": {
"type": "string",
"description": "Raw World Bank indicator code (e.g. NY.GDP.PCAP.CD); overrides metric."
},
"year": {
"type": "integer",
"description": "Specific year; omit for most-recent-non-empty value per country."
},
"order": {
"type": "string",
"enum": [
"desc",
"asc"
],
"default": "desc"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}