API Documentation

Free REST API for global statistics. JSON responses. No authentication required for basic access.

Base URL: https://statisticsoftheworld.com

Rate Limits & Pricing

TierRate LimitPriceAuth
Anonymous100 req/dayFreeNone (IP-based)
Developer1,000 req/dayFreeX-API-Key
Pro50,000 req/day$49/moX-API-Key
Business500,000 req/day$500/moX-API-Key
EnterpriseUnlimitedCustomX-API-Key

Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-RateLimit-Tier

Get API Key →

Endpoints

GET/api/v1/countries

List all 217 countries with metadata.

Example curl
curl https://statisticsoftheworld.com/api/v1/countries
Response
{"count":217,"data":[{"id":"USA","name":"United States","region":"North America",...}]}
GET/api/v1/countries/:id

Get a single country with all latest indicator values.

Example curl
curl https://statisticsoftheworld.com/api/v1/countries/USA
Response
{"country":{"id":"CAN","name":"Canada",...},"indicators":[{"id":"IMF.NGDPD","value":2420000000000,...}]}
GET/api/v1/indicators

List all indicators with categories and metadata.

Example curl
curl https://statisticsoftheworld.com/api/v1/indicators
Response
{"count":335,"categories":[...],"data":[{"id":"SP.POP.TOTL","label":"Population",...}]}
GET/api/v1/indicators/:id

Get a single indicator ranked across all countries.

Example curl
curl https://statisticsoftheworld.com/api/v1/indicators/USA
Response
{"indicator":{...},"count":192,"data":[{"rank":1,"countryId":"USA","value":31820000000000},...]}
GET/api/v1/history/:indicator/:country

Get 20+ years of historical data for an indicator-country pair.

Example curl
curl https://statisticsoftheworld.com/api/v1/history/SP.POP.TOTL/CAN
Response
{"indicator":{...},"country":"CAN","data":[{"year":2000,"value":744631000000},{"year":2001,...}]}
GET/api/v1/rankings/:indicator

Get ranked list of countries for an indicator. Supports ?limit=N parameter.

Example curl
curl https://statisticsoftheworld.com/api/v1/rankings/SP.POP.TOTL
Response
{"indicator":{...},"count":192,"data":[{"rank":1,"countryId":"CHN","country":"China","value":1425893000},...]}

Data Sources

IMF World Economic Outlook
World Bank WDI
FRED (Federal Reserve)
Yahoo Finance
European Central Bank
Alpha Vantage
ExchangeRate-API