API Documentation
Free REST API for global statistics. JSON responses. No authentication required for basic access.
https://statisticsoftheworld.comRate Limits & Pricing
| Tier | Rate Limit | Price | Auth |
|---|---|---|---|
| Anonymous | 1,000 req/day | Free | None (IP-based) |
| Developer | 1,000 req/day | Free | X-API-Key |
| Data Pro | 10,000 req/day | $29/mo | X-API-Key |
| API Pro | 50,000 req/day | $49/mo | X-API-Key |
| Enterprise | Unlimited | Custom | X-API-Key |
Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-RateLimit-Tier
Compare API plans →Quick start
import requests
r = requests.get(
"https://statisticsoftheworld.com/api/v2/history",
params={"indicator": "NY.GDP.MKTP.CD", "country": "USA"},
headers={"X-API-Key": "sotw_YOUR_KEY"}, # optional under 1K/day
)
data = r.json()
print(data["data"][-1]) # latest yearconst params = new URLSearchParams({ indicator: "NY.GDP.MKTP.CD", country: "USA" });
const res = await fetch(
`https://statisticsoftheworld.com/api/v2/history?${params}`,
{ headers: { "X-API-Key": "sotw_YOUR_KEY" } } // optional under 1K/day
);
const data = await res.json();
console.log(data.data.at(-1)); // latest yearEndpoints
/api/v1/countriesList all 218 countries with metadata.
curl https://statisticsoftheworld.com/api/v1/countries{"count":218,"data":[{"id":"USA","name":"United States","region":"North America",...}]}/api/v1/countries/:idGet a single country with its latest indicator values. Upgrading preserves the public catalog and raises the request limit.
curl https://statisticsoftheworld.com/api/v1/countries/USA{"country":{"id":"CAN","name":"Canada",...},"indicators":[{"id":"NY.GDP.MKTP.CD","value":2240000000000,...}]}/api/v1/indicatorsList 334 public indicators. Paid keys retain the public catalog and add higher request limits.
curl https://statisticsoftheworld.com/api/v1/indicators{"count":334,"categories":[...],"data":[{"id":"SP.POP.TOTL","label":"Population",...}]}/api/v1/indicators/:idGet a single indicator ranked across all countries.
curl https://statisticsoftheworld.com/api/v1/indicators/USA{"indicator":{...},"count":192,"data":[{"rank":1,"countryId":"USA","value":31820000000000},...]}/api/v1/history/:indicator/:countryGet 20+ years of historical data for an indicator-country pair.
curl https://statisticsoftheworld.com/api/v1/history/SP.POP.TOTL/CAN{"indicator":{...},"country":"CAN","data":[{"year":2000,"value":744631000000},{"year":2001,...}]}/api/v1/rankings/:indicatorGet ranked list of countries for an indicator. Supports ?limit=N parameter.
curl https://statisticsoftheworld.com/api/v1/rankings/SP.POP.TOTL{"indicator":{...},"count":192,"data":[{"rank":1,"countryId":"CHN","country":"China","value":1425893000},...]}/api/v1/seriesHigh-frequency catalog: daily yield curves and reference rates, central bank policy rates, monthly CPI for ~190 countries, unemployment, industrial production, electricity, and shipping activity. Every series carries machine-readable licence metadata.
curl https://statisticsoftheworld.com/api/v1/series{"count":51,"data":[{"id":"UST.YC.10Y","frequency":"D","licence":"public-domain","resale_permitted":true,...}]}/api/v1/series/:idObservations for one series. ?geo=USA for one country, ?latest=1 for the newest value per country, ?from=YYYY-MM-DD to bound history.
curl https://statisticsoftheworld.com/api/v1/series/USA{"series":{"id":"IMF.CPI.YOY.M","unit":"% y/y",...},"data":[{"geo":"USA","period":"2026-05","value":4.25},...]}/api/v1/series/bulkStream the redistributable high-frequency corpus as CSV (?since=YYYY-MM-DD for increments). Rights are enforced per series for every tier.
curl https://statisticsoftheworld.com/api/v1/series/bulkseries_id,geo,freq,period,period_start,value,obs_status,licence\nUST.YC.10Y,USA,D,2026-07-17,2026-07-17,4.55,,public-domain