Available withAll-In-One and Fundamentals Data Feed packages.
Consumption: Each request consumes 10 API calls.

Macroeconomics is a part of economics dealing with the performance, structure, behavior, and decision-making of an economy as a whole. Our Macroeconomics Indicators Data API includes regional, national, and global economies. We provide the data for more than 30 macro indicators such as GDP, unemployment rates, national income, price indices, inflation rates, consumption, international trades, and many other significant indicators. Most data is provided from December 1960.

Register & Get Data

Quick Start

The Macroeconomics Data API is a part of Fundamental API and is accessible under Fundamental subscription. Each Macroeconomics API request consumes 1 API call. To get macroeconomics indicators use the following URL:

URL
cURL
PHP
Python
R
https://eodhd.com/api/macro-indicator/COUNTRY?indicator=inflation_consumer_prices_annual&api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/macro-indicator/COUNTRY?indicator=inflation_consumer_prices_annual&api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/macro-indicator/COUNTRY?indicator=inflation_consumer_prices_annual&api_token={YOUR_API_TOKEN}&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
import requests

url = f'https://eodhd.com/api/macro-indicator/COUNTRY?indicator=inflation_consumer_prices_annual&api_token={YOUR_API_TOKEN}&fmt=json'
data = requests.get(url).json()

print(data)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/macro-indicator/COUNTRY?indicator=inflation_consumer_prices_annual&api_token={YOUR_API_TOKEN}&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
  • COUNTRY: String. REQUIRED. Defines the country for which the indicator will be shown. The country should be defined in the Alpha-3 ISO format. Possible values: USA, FRA, DEU…
  • api_token: String. REQUIRED. Your api_token to access the API. You will get it after registration.
  • indicator: String. OPTIONAL. Defines which macroeconomics data indicator will be shown. See the list of possible indicators below. The default value is ‘gdp_current_usd‘.
  • fmt: String. OPTIONAL. The output format could be ‘json’ for JSON and ‘csv’ for CSV output. The default value is ‘json’.

Here you can see the annual inflation for France in percents, the indicator is ‘inflation_consumer_prices_annual’. The full list of macroeconomic data indicators you can find below.

Inflation Consumer Prices Annual for France

List of Available Macroeconomics Indicators

  • real_interest_rate‘ – Real interest rate (%).
  • population_total‘ – Population, total.
  • population_growth_annual‘ – Population growth (annual %).
  • inflation_consumer_prices_annual‘ – Inflation, consumer prices (annual %).
  • consumer_price_index‘ – Consumer Price Index (2010 = 100).
  • gdp_current_usd‘ – GDP (current US$).
  • gdp_per_capita_usd‘ – GDP per capita (current US$).
  • gdp_growth_annual‘ – GDP growth (annual %).
  • debt_percent_gdp‘ – Debt in percent of GDP (annual %).
  • net_trades_goods_services‘ – Net trades in goods and services (current US$).
  • inflation_gdp_deflator_annual‘ – Inflation, GDP deflator (annual %).
  • agriculture_value_added_percent_gdp‘ – Agriculture, value added (% of GDP).
  • industry_value_added_percent_gdp‘ – Industry, value added (% of GDP).
  • services_value_added_percent_gdp‘ – Services, etc., value added (% of GDP).
  • exports_of_goods_services_percent_gdp‘ – Exports of goods and services (% of GDP).
  • imports_of_goods_services_percent_gdp‘ – Imports of goods and services (% of GDP).
  • gross_capital_formation_percent_gdp‘ – Gross capital formation (% of GDP).
  • net_migration‘ – Net migration (absolute value).
  • gni_usd‘ – GNI, Atlas method (current US$).
  • gni_per_capita_usd‘ – GNI per capita, Atlas method (current US$).
  • gni_ppp_usd‘ – GNI, PPP (current international $).
  • gni_per_capita_ppp_usd‘ – GNI per capita, PPP (current international $).
  • income_share_lowest_twenty‘ – Income share held by lowest 20% (in %).
  • life_expectancy‘ – Life expectancy at birth, total (years).
  • fertility_rate‘ – Fertility rate, total (births per woman).
  • prevalence_hiv_total‘ – Prevalence of HIV, total (% of population ages 15-49).
  • co2_emissions_tons_per_capita‘ – CO2 emissions (metric tons per capita).
  • surface_area_km‘ – Surface area (sq. km).
  • poverty_poverty_lines_percent_population‘ – Poverty headcount ratio at national poverty lines (% of population).
  • revenue_excluding_grants_percent_gdp‘ – Revenue, excluding grants (% of GDP).
  • cash_surplus_deficit_percent_gdp‘ – Cash surplus/deficit (% of GDP).
  • startup_procedures_register‘ – Start-up procedures to register a business (number).
  • market_cap_domestic_companies_percent_gdp‘ – Market capitalization of listed domestic companies (% of GDP).
  • mobile_subscriptions_per_hundred‘ – Mobile cellular subscriptions (per 100 people).
  • internet_users_per_hundred‘ – Internet users (per 100 people).
  • high_technology_exports_percent_total‘ – High-technology exports (% of manufactured exports).
  • merchandise_trade_percent_gdp‘ – Merchandise trade (% of GDP).
  • total_debt_service_percent_gni‘ – Total debt service (% of GNI).
  • ‘unemployment_total_percent’ – Unemployment total (% of labor force).

We also happy to add more Macro Indicators by request in case you miss any.

Register & Get Data