List Indicators and Countries

It provides a list of available indicators (such as economic indicators or financial metrics) and the countries for which data is available.

List indicators

Using Requests:

import requests api_key = 'YOUR_API_KEY' url = f'https://api.tradingeconomics.com/indicators?c={api_key}' data = requests.get(url).json() print(data)

Or using our package:

import tradingeconomics as te te.login('your_api_key') te.getIndicatorData()

Using Requests:

const axios = require('axios'); (async () => { const api_key = 'YOUR_API_KEY' const response = await axios.get(`https://api.tradingeconomics.com/indicators?c=${api_key}`) console.log(response.data) })()

Or using our package:

const te = require('tradingeconomics'); te.login('your_api_key'); data = te.getIndicatorData().then(function(data){ console.log(data) });

Using Requests:

using (var httpClient = new HttpClient()) { using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/indicators?c=your_api_key")) { request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1"); var response = await httpClient.SendAsync(request); if (response.IsSuccessStatusCode) { var content = await response.Content.ReadAsStringAsync(); Console.WriteLine(content); } } }

Add the flag calendar=1 to show only indicators available on calendar:

import requests api_key = 'YOUR_API_KEY' url = f'https://api.tradingeconomics.com/indicators?c={api_key}&calendar=1' data = requests.get(url).json() print(data)
const axios = require('axios'); (async () => { const api_key = 'YOUR_API_KEY' const response = await axios.get(`https://api.tradingeconomics.com/indicators?c=${api_key}&calendar=1`) console.log(response.data) })()
using (var httpClient = new HttpClient()) { using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/indicators?c=your_api_key&calendar=1")) { request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1"); var response = await httpClient.SendAsync(request); if (response.IsSuccessStatusCode) { var content = await response.Content.ReadAsStringAsync(); Console.WriteLine(content); } } }

The response data format can be configured by appending the &f= parameter to the URL request.

/indicators

CategoryCategoryGroup
1 Year MLF RateMoney
14-Day Reverse Repo RateMoney
15 Year Mortgage RateHousing

/indicators?f=json

[{"Category":"1 Year MLF Rate","CategoryGroup":"Money"},{"Category":"14-Day Reverse Repo Rate","CategoryGroup":"Money"},{"Category":"15 Year Mortgage Rate","CategoryGroup":"Housing"}]

/indicators?f=csv

Category,CategoryGroup 1 Year MLF Rate,Money 14-Day Reverse Repo Rate,Money 15 Year Mortgage Rate,Housing

/indicators?f=xml

<ArrayOfIndicator xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models"> <Indicator> <Category>1 Year MLF Rate</Category> <CategoryGroup>Money</CategoryGroup> </Indicator> <Indicator> <Category>14-Day Reverse Repo Rate</Category> <CategoryGroup>Money</CategoryGroup> </Indicator> <Indicator> <Category>15 Year Mortgage Rate</Category> <CategoryGroup>Housing</CategoryGroup> </Indicator> </ArrayOfIndicator>

List countries

Using Requests:

import requests api_key = 'YOUR_API_KEY' url = f'https://api.tradingeconomics.com/country?c={api_key}' data = requests.get(url).json() print(data)

Or using our package:

te.getAllCountries()

Using Requests:

const axios = require('axios'); (async () => { const api_key = 'YOUR_API_KEY' const response = await axios.get(`https://api.tradingeconomics.com/country?c=${api_key}`) console.log(response.data) })()

Or using our package:

data = te.getAllCountries().then(function(data){ console.log(data) });

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/country?c=your_api_key");

/country

CountryContinentGroupISO3ISO2
AfghanistanAsiaAsiaAFGAF
AlbaniaEuropeEuropeALBAL
AlgeriaAfrica“North Africa, OPEC”DZADZ

/country?f=json

[{"Country":"Afghanistan","Continent":"Asia","Group":"Asia","ISO3":"AFG","ISO2":"AF"},{"Country":"Albania","Continent":"Europe","Group":"Europe","ISO3":"ALB","ISO2":"AL"},{"Country":"Algeria","Continent":"Africa","Group":"North Africa, OPEC","ISO3":"DZA","ISO2":"DZ"}]

/country?f=csv

Country,Continent,Group,ISO3,ISO2 Afghanistan,Asia,Asia,AFG,AF Albania,Europe,Europe,ALB,AL Algeria,Africa,"North Africa, OPEC",DZA,DZ

/country?f=xml

<ArrayOfCountryData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models"> <CountryData> <Continent>Asia</Continent> <Country>Afghanistan</Country> <Group>Asia</Group> <ISO2>AF</ISO2> <ISO3>AFG</ISO3> </CountryData> <CountryData> <Continent>Europe</Continent> <Country>Albania</Country> <Group>Europe</Group> <ISO2>AL</ISO2> <ISO3>ALB</ISO3> </CountryData> <CountryData> <Continent>Africa</Continent> <Country>Algeria</Country> <Group>North Africa, OPEC</Group> <ISO2>DZ</ISO2> <ISO3>DZA</ISO3> </CountryData> </ArrayOfCountryData>

Response fields

Fields available in ‘List indicators’

FieldTypeDescriptionExample
CategorystringCategory name“Auto Exports”,
CategoryGroupstringCategory group name“Trade”

Fields available in ‘List Countries’

FieldTypeDescriptionExample
CountrystringCountry name“Algeria”
ContinentstringContinent name from the country“Africa”
GroupstringGroup name from the country“North Africa, OPEC”
ISO3stringCountry ISO3 code“DZA”
ISO2stringCountry ISO2 code“DZ”