{"id":2022,"date":"2020-11-24T16:02:26","date_gmt":"2020-11-24T16:02:26","guid":{"rendered":"https:\/\/eodhd.com\/financial-apis\/?p=2022"},"modified":"2026-05-27T11:34:43","modified_gmt":"2026-05-27T09:34:43","slug":"macroeconomics-data-and-macro-indicators-api","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api","title":{"rendered":"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country"},"content":{"rendered":"\n<p class=\"docs-content__text wp-block-paragraph\">The EODHD Macro Indicators API exposes 39 macroeconomic time series per country \u2014 GDP, inflation, unemployment, demographics, trade balances, debt ratios and more. Data is sourced from the <strong>World Bank World Development Indicators<\/strong> (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.<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><!--TOC--><\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-api-endpoint\">API Endpoint<\/h2>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">https:\/\/eodhd.com\/api\/macro-indicator\/{country}<\/code><\/pre>\n<\/div>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-path-parameter\">Path Parameter<\/h2>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>country<\/td><td>Yes<\/td><td>ISO 3166-1 alpha-3 country code (e.g. USA, FRA, DEU, GBR, JPN). Case-insensitive \u2014 usa and USA are equivalent. World Bank aggregate codes are also accepted (see Country Codes section).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-query-parameters\">Query Parameters<\/h2>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>api_token<\/td><td>Yes<\/td><td>Your EODHD API token<\/td><\/tr><tr><td>indicator<\/td><td>No<\/td><td>Indicator key from the list below. Default is gdp_current_usd<\/td><\/tr><tr><td>fmt<\/td><td>No<\/td><td>Response format, json (default) or csv. Note that csv truncates decimal values to integers<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-available-indicators\">Available Indicators<\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">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 <strong>data issue<\/strong> or <strong>historical<\/strong>.<\/p>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-national-accounts-and-growth\">National Accounts and Growth<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>gdp_current_usd<\/td><td>GDP, current US$<\/td><td>Active<\/td><\/tr><tr><td>gdp_per_capita_usd<\/td><td>GDP per capita, current US$<\/td><td>Active<\/td><\/tr><tr><td>gdp_growth_annual<\/td><td>GDP growth, annual %<\/td><td>Active<\/td><\/tr><tr><td>gni_usd<\/td><td>GNI, Atlas method, current US$<\/td><td>Active<\/td><\/tr><tr><td>gni_per_capita_usd<\/td><td>GNI per capita, Atlas method, current US$<\/td><td>Active<\/td><\/tr><tr><td>gni_ppp_usd<\/td><td>GNI, PPP, current international $<\/td><td>Active (from 1990)<\/td><\/tr><tr><td>gni_per_capita_ppp_usd<\/td><td>GNI per capita, PPP, current international $<\/td><td>Active (from 1990)<\/td><\/tr><tr><td>gross_capital_formation_percent_gdp<\/td><td>Gross capital formation, % of GDP<\/td><td>Active<\/td><\/tr><tr><td>agriculture_value_added_percent_gdp<\/td><td>Agriculture, value added, % of GDP<\/td><td>Active (coverage varies by country)<\/td><\/tr><tr><td>industry_value_added_percent_gdp<\/td><td>Industry, value added, % of GDP<\/td><td>Active (coverage varies by country)<\/td><\/tr><tr><td>services_value_added_percent_gdp<\/td><td>Services, value added, % of GDP<\/td><td>Active (coverage varies by country)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-prices-and-inflation\">Prices and Inflation<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>inflation_consumer_prices_annual<\/td><td>Inflation, consumer prices, annual %<\/td><td>Active<\/td><\/tr><tr><td>consumer_price_index<\/td><td>Consumer Price Index, 2010 = 100<\/td><td>Active<\/td><\/tr><tr><td>inflation_gdp_deflator_annual<\/td><td>Inflation, GDP deflator, annual %<\/td><td>Active<\/td><\/tr><tr><td>real_interest_rate<\/td><td>Real interest rate, %<\/td><td>Stale \u2014 last update 2021, missing for several countries<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-trade-and-external-sector\">Trade and External Sector<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>net_trades_goods_services<\/td><td>Net trades in goods and services, current US$<\/td><td>Active<\/td><\/tr><tr><td>exports_of_goods_services_percent_gdp<\/td><td>Exports of goods and services, % of GDP<\/td><td>Active<\/td><\/tr><tr><td>imports_of_goods_services_percent_gdp<\/td><td>Imports of goods and services, % of GDP<\/td><td>Active<\/td><\/tr><tr><td>merchandise_trade_percent_gdp<\/td><td>Merchandise trade, % of GDP<\/td><td>Active<\/td><\/tr><tr><td>high_technology_exports_percent_total<\/td><td>High-technology exports, % of manufactured exports<\/td><td>Active (from 2007)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-government-finance-and-debt\">Government Finance and Debt<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>debt_percent_gdp<\/td><td>Central government debt, % of GDP<\/td><td>Active (limited country coverage)<\/td><\/tr><tr><td>revenue_excluding_grants_percent_gdp<\/td><td>Revenue, excluding grants, % of GDP<\/td><td>Active<\/td><\/tr><tr><td>cash_surplus_deficit_percent_gdp<\/td><td>Cash surplus\/deficit, % of GDP<\/td><td>Historical \u2014 last update 2014. Values look implausible, see Known Limitations<\/td><\/tr><tr><td>total_debt_service_percent_gni<\/td><td>Total debt service, % of GNI<\/td><td>Active for IBRD\/IDA borrowers only \u2014 empty for high-income countries<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-population-and-demographics\">Population and Demographics<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>population_total<\/td><td>Population, total<\/td><td>Active<\/td><\/tr><tr><td>population_growth_annual<\/td><td>Population growth, annual %<\/td><td>Active<\/td><\/tr><tr><td>net_migration<\/td><td>Net migration, absolute value (5-year totals)<\/td><td>Active<\/td><\/tr><tr><td>life_expectancy<\/td><td>Life expectancy at birth, total years<\/td><td>Active<\/td><\/tr><tr><td>fertility_rate<\/td><td>Fertility rate, total births per woman<\/td><td>Active<\/td><\/tr><tr><td>prevalence_hiv_total<\/td><td>Prevalence of HIV, total, % of population ages 15-49<\/td><td>Active for low- and middle-income countries \u2014 empty for the US and several high-income countries<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-labour-poverty-and-income\">Labour, Poverty and Income<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>unemployment_total_percent<\/td><td>Unemployment, total, % of labour force<\/td><td>Active<\/td><\/tr><tr><td>income_share_lowest_twenty<\/td><td>Income share held by lowest 20%, %<\/td><td>Active (sparse \u2014 based on national household surveys)<\/td><\/tr><tr><td>poverty_poverty_lines_percent_population<\/td><td>Poverty headcount ratio at national poverty lines, % of population<\/td><td>Sparse \u2014 based on national surveys, often only a handful of data points per country, empty for the US<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-financial-markets-and-business-environment\">Financial Markets and Business Environment<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>market_cap_domestic_companies_percent_gdp<\/td><td>Market capitalization of listed domestic companies, % of GDP<\/td><td>Active (coverage varies by country)<\/td><\/tr><tr><td>mobile_subscriptions_per_hundred<\/td><td>Mobile cellular subscriptions per 100 people<\/td><td>Active<\/td><\/tr><tr><td>internet_users_per_hundred<\/td><td>Internet users per 100 people<\/td><td>Historical \u2014 last update 2015. Values look implausible, see Known Limitations<\/td><\/tr><tr><td>startup_procedures_register<\/td><td>Start-up procedures to register a business, number<\/td><td>Historical \u2014 World Bank discontinued the Doing Business programme in 2021. Final data point is 2019<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-environment-and-geography\">Environment and Geography<\/h3>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Indicator key<\/th><th>Description<\/th><th>Status<\/th><\/tr><\/thead><tbody><tr><td>co2_emissions_tons_per_capita<\/td><td>CO2 emissions, metric tons per capita<\/td><td>Stale \u2014 last update 2020. Values look implausible, see Known Limitations<\/td><\/tr><tr><td>surface_area_km<\/td><td>Surface area, sq. km<\/td><td>Active<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-country-codes\">Country Codes<\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">The country path parameter accepts ISO 3166-1 alpha-3 codes \u2014 three letters, case-insensitive. Common examples: <strong>USA<\/strong> (United States), <strong>FRA<\/strong> (France), <strong>DEU<\/strong> (Germany), <strong>GBR<\/strong> (United Kingdom), <strong>JPN<\/strong> (Japan), <strong>CHN<\/strong> (China), <strong>IND<\/strong> (India), <strong>BRA<\/strong> (Brazil).<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">The endpoint also accepts <strong>World Bank aggregate codes<\/strong>, which return aggregated regional or income-group data. The most useful aggregates:<\/p>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Code<\/th><th>Aggregate<\/th><\/tr><\/thead><tbody><tr><td>WLD<\/td><td>World<\/td><\/tr><tr><td>EUU<\/td><td>European Union<\/td><\/tr><tr><td>EMU<\/td><td>Euro area<\/td><\/tr><tr><td>OED<\/td><td>OECD members<\/td><\/tr><tr><td>LCN<\/td><td>Latin America and Caribbean<\/td><\/tr><tr><td>SSF<\/td><td>Sub-Saharan Africa<\/td><\/tr><tr><td>EAS<\/td><td>East Asia and Pacific<\/td><\/tr><tr><td>MEA<\/td><td>Middle East and North Africa<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">The full list of World Bank country and aggregate codes is published at <a href=\"https:\/\/api.worldbank.org\/v2\/country?format=json&amp;per_page=300\">api.worldbank.org\/v2\/country<\/a>.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-request-example\">Request Example<\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">    <div class=\"api-key\" data-feed=\"EOD Historical Data\">\n                <div class=\"api-key__topbar\">\n            <div class=\"api-key__tablist\" role=\"tablist\">\n                                                                        <button\n                        class=\"api-key__tab api-key__tab--active\"\n                        type=\"button\"\n                        role=\"tab\"\n                        data-tab=\"url\"                    >URL<\/button>\n                                                                            <button\n                        class=\"api-key__tab\"\n                        type=\"button\"\n                        role=\"tab\"\n                        data-tab=\"curl\"                    >cURL<\/button>\n                                                                            <button\n                        class=\"api-key__tab\"\n                        type=\"button\"\n                        role=\"tab\"\n                        data-tab=\"php\"                    >PHP<\/button>\n                                                                            <button\n                        class=\"api-key__tab\"\n                        type=\"button\"\n                        role=\"tab\"\n                        data-tab=\"python\"                    >Python<\/button>\n                                                                            <button\n                        class=\"api-key__tab\"\n                        type=\"button\"\n                        role=\"tab\"\n                        data-tab=\"r\"                    >R<\/button>\n                                                                            <button\n                        class=\"api-key__tab\"\n                        type=\"button\"\n                        role=\"tab\"\n                        data-tab=\"chatgpt\" data-actions=\"false\"                    >Chat GPT<\/button>\n                                                <\/div>\n            <div class=\"api-key__actions\">\n                <button class=\"api-key__btn api-key__btn--copy\" type=\"button\" aria-label=\"Copy\">\n                    <svg viewBox=\"0 0 20 20\" width=\"18\" height=\"18\" class=\"api-key__btn-icon api-key__btn-icon--default\"><use xlink:href=\"\/img\/icons\/copy.svg#copy\"\/><\/svg>\n                    <img decoding=\"async\" class=\"api-key__btn-icon api-key__btn-icon--success\" src=\"\/img\/approve_ico.svg\" alt=\"\" width=\"14\" height=\"14\" loading=\"eager\">\n                <\/button>\n                <button class=\"api-key__btn api-key__btn--view\" type=\"button\" aria-label=\"Open in new tab\" data-url=\"https:\/\/eodhd.com\/api\/macro-indicator\/FRA?indicator=inflation_consumer_prices_annual&amp;api_token=YOUR_TOKEN&amp;fmt=json\">\n                    <svg viewBox=\"0 0 20 21\" width=\"18\" height=\"18\"><use xlink:href=\"\/img\/icons\/openLink.svg#openLink\"\/><\/svg>\n                <\/button>\n            <\/div>\n        <\/div>\n        \n        <div class=\"api-key__panels\">\n                                                                        <div class=\"api-key__panel api-key__panel--active\" data-panel=\"url\">\n                                            <pre class=\"api-key__code\"><code>https:\/\/eodhd.com\/api\/macro-indicator\/FRA?<span class='white bold'>indicator<\/span>=<span class='orange bold indicator'>inflation_consumer_prices_annual<\/span>&<span class='white bold'>api_token<\/span>=<span class='orange bold api_token'>YOUR_TOKEN<\/span>&<span class='white bold'>fmt<\/span>=<span class='orange bold fmt'>json<\/span><\/code><\/pre>\n                        <div class=\"api-key__register\">(<a href=\"\/register\">Sign up<\/a> for free to get an API token)<\/div>\n                                    <\/div>\n                                                                            <div class=\"api-key__panel\" data-panel=\"curl\">\n                                                                    <pre class=\"api-key__code\"><code>curl --location &quot;https:\/\/eodhd.com\/api\/macro-indicator\/FRA?<span class='white bold'>indicator<\/span>=<span class='orange bold indicator'>inflation_consumer_prices_annual<\/span>&<span class='white bold'>api_token<\/span>=<span class='orange bold api_token'>YOUR_TOKEN<\/span>&<span class='white bold'>fmt<\/span>=<span class='orange bold fmt'>json<\/span>&quot;<\/code><\/pre>\n                        <div class=\"api-key__register\">(<a href=\"\/register\">Sign up<\/a> for free to get an API token)<\/div>\n                                    <\/div>\n                                                                            <div class=\"api-key__panel\" data-panel=\"php\">\n                                                                    <pre class=\"api-key__code\"><code>$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n    CURLOPT_URL =&gt; &#039;https:\/\/eodhd.com\/api\/macro-indicator\/FRA?<span class='white bold'>indicator<\/span>=<span class='orange bold indicator'>inflation_consumer_prices_annual<\/span>&<span class='white bold'>api_token<\/span>=<span class='orange bold api_token'>YOUR_TOKEN<\/span>&<span class='white bold'>fmt<\/span>=<span class='orange bold fmt'>json<\/span>&#039;,\n    CURLOPT_RETURNTRANSFER =&gt; true,\n    CURLOPT_ENCODING =&gt; &#039;&#039;,\n    CURLOPT_MAXREDIRS =&gt; 10,\n    CURLOPT_TIMEOUT =&gt; 0,\n    CURLOPT_FOLLOWLOCATION =&gt; true,\n    CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,\n    CURLOPT_CUSTOMREQUEST =&gt; &#039;GET&#039;,\n));\n\n$data = curl_exec($curl);\ncurl_close($curl);\n\ntry {\n    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);\n    var_dump($data);\n} catch (Exception $e) {\n    echo &#039;Error. &#039;.$e-&gt;getMessage();\n}<\/code><\/pre>\n                        <div class=\"api-key__register\">(<a href=\"\/register\">Sign up<\/a> for free to get an API token)<\/div>\n                                    <\/div>\n                                                                            <div class=\"api-key__panel\" data-panel=\"python\">\n                                                                    <pre class=\"api-key__code\"><code>import requests\n\nurl = f&#039;https:\/\/eodhd.com\/api\/macro-indicator\/FRA?<span class='white bold'>indicator<\/span>=<span class='orange bold indicator'>inflation_consumer_prices_annual<\/span>&<span class='white bold'>api_token<\/span>=<span class='orange bold api_token'>YOUR_TOKEN<\/span>&<span class='white bold'>fmt<\/span>=<span class='orange bold fmt'>json<\/span>&#039;\ndata = requests.get(url).json()\n\nprint(data)<\/code><\/pre>\n                        <div class=\"api-key__register\">(<a href=\"\/register\">Sign up<\/a> for free to get an API token)<\/div>\n                                    <\/div>\n                                                                            <div class=\"api-key__panel\" data-panel=\"r\">\n                                                                    <pre class=\"api-key__code\"><code>library(httr)\nlibrary(jsonlite)\n\nurl &lt;- &#039;https:\/\/eodhd.com\/api\/macro-indicator\/FRA?<span class='white bold'>indicator<\/span>=<span class='orange bold indicator'>inflation_consumer_prices_annual<\/span>&<span class='white bold'>api_token<\/span>=<span class='orange bold api_token'>YOUR_TOKEN<\/span>&<span class='white bold'>fmt<\/span>=<span class='orange bold fmt'>json<\/span>&#039;\nresponse &lt;- GET(url)\n\nif (http_type(response) == &quot;application\/json&quot;) {\n    content &lt;- content(response, &quot;text&quot;, encoding = &quot;UTF-8&quot;)\n    cat(content)\n} else {\n    cat(&quot;Error while receiving data\\n&quot;)\n}<\/code><\/pre>\n                        <div class=\"api-key__register\">(<a href=\"\/register\">Sign up<\/a> for free to get an API token)<\/div>\n                                    <\/div>\n                                                                            <div class=\"api-key__panel\" data-panel=\"chatgpt\">\n                                            <div class=\"api-key__chatgpt\">\n                            New to coding? Our ChatGPT assistant can generate code in any language tailored to our API.\n                            Simply describe how you want to use our data, and get a working piece of code.\n                            Don&rsquo;t forget to replace the API token with your own.<br><br>\n                            <a href=\"\/lp\/eodhd-chatgpt\" target=\"_blank\">Try it now (it's free)!<\/a><br><br>\n                            <a href=\"https:\/\/www.youtube.com\/watch?v=QVWiLukag7o\" rel=\"nofollow\" target=\"_blank\">\n                                How to use it (YouTube)\n                            <\/a>\n                        <\/div>\n                                    <\/div>\n                                    <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-response-format\">Response Format<\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">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:<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code lang=\"json\" class=\"language-json\">[\n  {\n    \"CountryCode\": \"FRA\",\n    \"CountryName\": \"France\",\n    \"Indicator\": \"Inflation, consumer prices (annual %)\",\n    \"Date\": \"2024-12-31\",\n    \"Period\": \"Annual\",\n    \"Value\": 1.999\n  },\n  {\n    \"CountryCode\": \"FRA\",\n    \"CountryName\": \"France\",\n    \"Indicator\": \"Inflation, consumer prices (annual %)\",\n    \"Date\": \"2023-12-31\",\n    \"Period\": \"Annual\",\n    \"Value\": 4.9296\n  }\n]<\/code><\/pre>\n<\/div>\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Field<\/th><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>CountryCode<\/td><td>string<\/td><td>ISO 3166-1 alpha-3 country code (always returned in upper case, regardless of the case used in the request)<\/td><\/tr><tr><td>CountryName<\/td><td>string<\/td><td>Country name in English, as published by the World Bank<\/td><\/tr><tr><td>Indicator<\/td><td>string<\/td><td>Human-readable indicator name (e.g. &#8220;GDP (current US$)&#8221;). Matches the World Bank WDI indicator name verbatim<\/td><\/tr><tr><td>Date<\/td><td>string (date)<\/td><td>End-of-period date in YYYY-MM-DD format. Always 12-31 for annual data<\/td><\/tr><tr><td>Period<\/td><td>string<\/td><td>Reporting period. Currently always &#8220;Annual&#8221; \u2014 no quarterly or monthly series are exposed<\/td><\/tr><tr><td>Value<\/td><td>number or null<\/td><td>Indicator value. Units depend on the indicator and are reflected in the Indicator name (US$, %, count, etc.)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">An empty array <strong>[]<\/strong> 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 \u2014 check that the country actually has data before treating an empty array as &#8220;no observations&#8221;.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-response-codes\">Response Codes<\/h2>\n\n\n\n<figure class=\"docs-content__table-wrap wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Code<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td>200<\/td><td>Success. The response body is a JSON array (possibly empty) or a CSV document<\/td><\/tr><tr><td>401<\/td><td>Missing or invalid api_token<\/td><\/tr><tr><td>403<\/td><td>Plan does not include access to the Macro Indicators API<\/td><\/tr><tr><td>404<\/td><td>Indicator name is not recognised. The error message &#8220;Indicator or Country are Not Found.&#8221; is returned as plain text<\/td><\/tr><tr><td>429<\/td><td>Rate limit exceeded<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-known-limitations\">Known Limitations<\/h2>\n\n\n\n<ul class=\"docs-content__list wp-block-list\">\n<li><strong>Annual frequency only.<\/strong> All series are published at annual cadence. For quarterly or monthly macro releases (GDP nowcasts, CPI flash, central bank decisions), use the <a href=\"https:\/\/eodhd.com\/financial-apis\/economic-events-data-api\/\">Economic Events Data API<\/a> instead.<\/li>\n\n\n\n<li><strong>Refresh cadence depends on the source.<\/strong> 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.<\/li>\n\n\n\n<li><strong>Country coverage is uneven across indicators.<\/strong> 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.<\/li>\n\n\n\n<li><strong>Historical-only indicators.<\/strong> 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.<\/li>\n\n\n\n<li><strong>Data quality flags.<\/strong> 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.<\/li>\n\n\n\n<li><strong>Unknown country codes return an empty array, not a 404.<\/strong> 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.<\/li>\n\n\n\n<li><strong>CSV output truncates decimals.<\/strong> The fmt=csv option emits integer-only values for the Value column. Use fmt=json (the default) if you need full precision.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"docs-content__text has-text-align-center wp-block-paragraph\"><a class=\"btn btn--orange\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Sign up &amp; Get Data<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The EODHD Macro Indicators API exposes 39 macroeconomic time series per country \u2014 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[119],"tags":[],"class_list":["post-2022","post","type-post","status-publish","format-standard","hentry","category-alternative-data-financial-api"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.6 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country | EODHD APIs Documentation<\/title>\n<meta name=\"description\" content=\"Our Macroeconomics Data API includes national and global economies. The data for values such as GDP, unemployment rates, intflation and other\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country\" \/>\n<meta property=\"og:description\" content=\"Our Macroeconomics Data API includes national and global economies. The data for values such as GDP, unemployment rates, intflation and other\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\" \/>\n<meta property=\"og:site_name\" content=\"Stock Price Data, Financial and Stock Market API\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-24T16:02:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-27T09:34:43+00:00\" \/>\n<meta name=\"author\" content=\"EOD Historical Data Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"EOD Historical Data Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\"},\"author\":{\"name\":\"EOD Historical Data Support\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415\"},\"headline\":\"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country\",\"datePublished\":\"2020-11-24T16:02:26+00:00\",\"dateModified\":\"2026-05-27T09:34:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\"},\"wordCount\":1409,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\"},\"articleSection\":[\"4. Alternative &amp; Derived Data\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\",\"name\":\"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country | EODHD APIs Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#website\"},\"datePublished\":\"2020-11-24T16:02:26+00:00\",\"dateModified\":\"2026-05-27T09:34:43+00:00\",\"description\":\"Our Macroeconomics Data API includes national and global economies. The data for values such as GDP, unemployment rates, intflation and other\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-apis\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/\",\"name\":\"Historical Stock Prices and Fundamental Financial Data APIs | EODHD\",\"description\":\"End Of Day (EOD), Fundamental and Real-time\/Live Data Market API\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-apis\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415\",\"name\":\"EOD Historical Data Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g\",\"caption\":\"EOD Historical Data Support\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country | EODHD APIs Documentation","description":"Our Macroeconomics Data API includes national and global economies. The data for values such as GDP, unemployment rates, intflation and other","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api","og_locale":"en_US","og_type":"article","og_title":"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country","og_description":"Our Macroeconomics Data API includes national and global economies. The data for values such as GDP, unemployment rates, intflation and other","og_url":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api","og_site_name":"Stock Price Data, Financial and Stock Market API","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2020-11-24T16:02:26+00:00","article_modified_time":"2026-05-27T09:34:43+00:00","author":"EOD Historical Data Support","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"EOD Historical Data Support","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api"},"author":{"name":"EOD Historical Data Support","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415"},"headline":"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country","datePublished":"2020-11-24T16:02:26+00:00","dateModified":"2026-05-27T09:34:43+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api"},"wordCount":1409,"publisher":{"@id":"https:\/\/eodhd.com\/financial-apis\/#organization"},"articleSection":["4. Alternative &amp; Derived Data"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api","url":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api","name":"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country | EODHD APIs Documentation","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/#website"},"datePublished":"2020-11-24T16:02:26+00:00","dateModified":"2026-05-27T09:34:43+00:00","description":"Our Macroeconomics Data API includes national and global economies. The data for values such as GDP, unemployment rates, intflation and other","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-apis"},{"@type":"ListItem","position":2,"name":"Macroeconomic Indicators API: GDP, Inflation &amp; Demographics by Country"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-apis\/#website","url":"https:\/\/eodhd.com\/financial-apis\/","name":"Historical Stock Prices and Fundamental Financial Data APIs | EODHD","description":"End Of Day (EOD), Fundamental and Real-time\/Live Data Market API","publisher":{"@id":"https:\/\/eodhd.com\/financial-apis\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-apis\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-apis\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-apis\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415","name":"EOD Historical Data Support","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g","caption":"EOD Historical Data Support"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8NjB1-wC","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/2022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/comments?post=2022"}],"version-history":[{"count":24,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/2022\/revisions"}],"predecessor-version":[{"id":7935,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/2022\/revisions\/7935"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/media?parent=2022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/categories?post=2022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/tags?post=2022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}