Economic indicator series

GET https://api.api.sh/econ/v1/series
1 credit / call public data try it in the playground →

Yearly values of a World Bank indicator for up to 30 countries, regions or income groups: GDP, GDP per capita and growth, inflation, unemployment, population, trade, FDI, debt, reserves, interest and exchange rates, CO2, poverty, Gini and ~1,500 more (friendly names like gdp or inflation, or any indicator code). A year range or the most recent N values; each series with its latest value.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
indicatorrequired string Indicator code (e.g. NY.GDP.MKTP.CD) or name: gdp, gdp_per_capita, gdp_growth, gdp_ppp, gni_per_capita, inflation, unemployment, population, population_growth, life_expectancy, exports, imports, trade_pct_gdp, fdi, debt_pct_gdp, current_account, reserves, interest_rate, real_interest_rate, exchange_rate, co2_per_capita, electricity_access, internet_users, literacy, poverty, gini, urban_population, military_spending, health_spending, education_spending. Example: gdp
country string ISO-2/ISO-3 codes or aggregates (WLD, EUU, HIC...), comma-separated, or all (default WLD). Example: US,CN,DE
start_year integer First year (default 20 years ago). Example: 2015
end_year integer Last year (default this year).
most_recent integer Instead of years: the N most recent non-empty values.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/econ/v1/series?indicator=gdp" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.