The EODHD Macro Indicators API exposes 39 macroeconomic time series per country — GDP, inflation, unemployment, demographics, trade balances, debt ratios and more. Data is sourced from the World Bank World Development Indicators (WDI) and refreshed annually as the World Bank publishes new vintages. Most series start in 1960; the latest available year is typically the previous calendar year.
API Endpoint
https://eodhd.com/api/macro-indicator/{country}
Path Parameter
Parameter
Required
Description
country
Yes
ISO 3166-1 alpha-3 country code (e.g. USA, FRA, DEU, GBR, JPN). Case-insensitive — usa and USA are equivalent. World Bank aggregate codes are also accepted (see Country Codes section).
Query Parameters
Parameter
Required
Description
api_token
Yes
Your EODHD API token
indicator
No
Indicator key from the list below. Default is gdp_current_usd
fmt
No
Response format, json (default) or csv. Note that csv truncates decimal values to integers
Available Indicators
39 indicators are exposed. The Status column reflects how regularly the underlying World Bank series is updated and whether the data is suitable for current analysis. See Known Limitations for the indicators flagged as data issue or historical.
National Accounts and Growth
Indicator key
Description
Status
gdp_current_usd
GDP, current US$
Active
gdp_per_capita_usd
GDP per capita, current US$
Active
gdp_growth_annual
GDP growth, annual %
Active
gni_usd
GNI, Atlas method, current US$
Active
gni_per_capita_usd
GNI per capita, Atlas method, current US$
Active
gni_ppp_usd
GNI, PPP, current international $
Active (from 1990)
gni_per_capita_ppp_usd
GNI per capita, PPP, current international $
Active (from 1990)
gross_capital_formation_percent_gdp
Gross capital formation, % of GDP
Active
agriculture_value_added_percent_gdp
Agriculture, value added, % of GDP
Active (coverage varies by country)
industry_value_added_percent_gdp
Industry, value added, % of GDP
Active (coverage varies by country)
services_value_added_percent_gdp
Services, value added, % of GDP
Active (coverage varies by country)
Prices and Inflation
Indicator key
Description
Status
inflation_consumer_prices_annual
Inflation, consumer prices, annual %
Active
consumer_price_index
Consumer Price Index, 2010 = 100
Active
inflation_gdp_deflator_annual
Inflation, GDP deflator, annual %
Active
real_interest_rate
Real interest rate, %
Stale — last update 2021, missing for several countries
Trade and External Sector
Indicator key
Description
Status
net_trades_goods_services
Net trades in goods and services, current US$
Active
exports_of_goods_services_percent_gdp
Exports of goods and services, % of GDP
Active
imports_of_goods_services_percent_gdp
Imports of goods and services, % of GDP
Active
merchandise_trade_percent_gdp
Merchandise trade, % of GDP
Active
high_technology_exports_percent_total
High-technology exports, % of manufactured exports
Active (from 2007)
Government Finance and Debt
Indicator key
Description
Status
debt_percent_gdp
Central government debt, % of GDP
Active (limited country coverage)
revenue_excluding_grants_percent_gdp
Revenue, excluding grants, % of GDP
Active
cash_surplus_deficit_percent_gdp
Cash surplus/deficit, % of GDP
Historical — last update 2014. Values look implausible, see Known Limitations
total_debt_service_percent_gni
Total debt service, % of GNI
Active for IBRD/IDA borrowers only — empty for high-income countries
Population and Demographics
Indicator key
Description
Status
population_total
Population, total
Active
population_growth_annual
Population growth, annual %
Active
net_migration
Net migration, absolute value (5-year totals)
Active
life_expectancy
Life expectancy at birth, total years
Active
fertility_rate
Fertility rate, total births per woman
Active
prevalence_hiv_total
Prevalence of HIV, total, % of population ages 15-49
Active for low- and middle-income countries — empty for the US and several high-income countries
Labour, Poverty and Income
Indicator key
Description
Status
unemployment_total_percent
Unemployment, total, % of labour force
Active
income_share_lowest_twenty
Income share held by lowest 20%, %
Active (sparse — based on national household surveys)
poverty_poverty_lines_percent_population
Poverty headcount ratio at national poverty lines, % of population
Sparse — based on national surveys, often only a handful of data points per country, empty for the US
Financial Markets and Business Environment
Indicator key
Description
Status
market_cap_domestic_companies_percent_gdp
Market capitalization of listed domestic companies, % of GDP
Active (coverage varies by country)
mobile_subscriptions_per_hundred
Mobile cellular subscriptions per 100 people
Active
internet_users_per_hundred
Internet users per 100 people
Historical — last update 2015. Values look implausible, see Known Limitations
startup_procedures_register
Start-up procedures to register a business, number
Historical — World Bank discontinued the Doing Business programme in 2021. Final data point is 2019
Environment and Geography
Indicator key
Description
Status
co2_emissions_tons_per_capita
CO2 emissions, metric tons per capita
Stale — last update 2020. Values look implausible, see Known Limitations
surface_area_km
Surface area, sq. km
Active
Country Codes
The country path parameter accepts ISO 3166-1 alpha-3 codes — three letters, case-insensitive. Common examples: USA (United States), FRA (France), DEU (Germany), GBR (United Kingdom), JPN (Japan), CHN (China), IND (India), BRA (Brazil).
The endpoint also accepts World Bank aggregate codes, which return aggregated regional or income-group data. The most useful aggregates:
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API.
Simply describe how you want to use our data, and get a working piece of code.
Don’t forget to replace the API token with your own.
The response is a JSON array of observations, one per year, ordered from newest to oldest. Each observation has the same shape regardless of the requested indicator:
ISO 3166-1 alpha-3 country code (always returned in upper case, regardless of the case used in the request)
CountryName
string
Country name in English, as published by the World Bank
Indicator
string
Human-readable indicator name (e.g. “GDP (current US$)”). Matches the World Bank WDI indicator name verbatim
Date
string (date)
End-of-period date in YYYY-MM-DD format. Always 12-31 for annual data
Period
string
Reporting period. Currently always “Annual” — no quarterly or monthly series are exposed
Value
number or null
Indicator value. Units depend on the indicator and are reflected in the Indicator name (US$, %, count, etc.)
An empty array [] is returned when the country code is recognised but no observations exist for the requested indicator. The same empty-array response is also returned when the country code is unknown — check that the country actually has data before treating an empty array as “no observations”.
Response Codes
Code
Meaning
200
Success. The response body is a JSON array (possibly empty) or a CSV document
401
Missing or invalid api_token
403
Plan does not include access to the Macro Indicators API
404
Indicator name is not recognised. The error message “Indicator or Country are Not Found.” is returned as plain text
429
Rate limit exceeded
Known Limitations
Annual frequency only. All series are published at annual cadence. For quarterly or monthly macro releases (GDP nowcasts, CPI flash, central bank decisions), use the Economic Events Data API instead.
Refresh cadence depends on the source. The World Bank publishes WDI updates on an annual cycle, typically several months after the reference year ends. Expect the latest year to be one to two years behind the current calendar year for most series.
Country coverage is uneven across indicators. Several indicators are only collected for certain country groups: total_debt_service_percent_gni applies to IBRD/IDA borrowers; prevalence_hiv_total is empty for the US and some high-income countries; debt_percent_gdp coverage depends on whether the country reports to the IMF GFS database.
Historical-only indicators. startup_procedures_register, cash_surplus_deficit_percent_gdp and internet_users_per_hundred are exposed for backward compatibility but the underlying World Bank series stopped updating in 2019, 2014 and 2015 respectively. The Doing Business programme was discontinued by the World Bank in 2021.
Data quality flags. Three indicators currently return values that appear out of expected range: co2_emissions_tons_per_capita, internet_users_per_hundred and cash_surplus_deficit_percent_gdp. Treat these as unverified until the data feed is reviewed. Other indicators have been spot-checked against the World Bank WDI portal and match.
Unknown country codes return an empty array, not a 404. A request with an unrecognised country code (e.g. a two-letter ISO code, or a typo) returns HTTP 200 with an empty JSON array, identical to the response for a recognised country with no data. Validate the country code before issuing the request.
CSV output truncates decimals. The fmt=csv option emits integer-only values for the Value column. Use fmt=json (the default) if you need full precision.