Snapshot

Trading Economics API provides Indicators data using a few and simple parameters. Trading Economics National Statistical database includes more than 15,000 dataseries that come directly from official sources like central banks, national statistical agencies. It is a comprehensive database covering the most important macroeconomic data for each country, from GDP growth rates to tax rates and population.

List indicators and countries

List all indicators

/indicators

te.getIndicatorData(output_type='df')
data = te.getIndicatorData().then(function(data){
  console.log(data)  
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/indicators?c=guest:guest");

List all available countries

/country

te.getAllCountries(output_type='df')
data = te.getAllCountries().then(function(data){
  console.log(data)       
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/country?c=guest:guest");

By country

Get data by specific country or countries

/country/{country}

te.getIndicatorData(country='mexico', output_type='df')
data = te.getIndicatorData(country = 'mexico').then(function(data){
  console.log(data)       
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/country/mexico?c=guest:guest");

/country/{countries}

te.getIndicatorData(country=['mexico', 'sweden'], output_type='df')
data = te.getIndicatorData(country = ['mexico', 'sweden']).then(function(data){
  console.log(data)       
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/country/mexico,sweden?c=guest:guest");

By country and group

Get data by specific country and group

/country/{country}?c=guest:guest&group={group}

te.getIndicatorByCategoryGroup(country='mexico', category_group='gdp', output_type='df')
data = te.getIndicatorData(country = 'mexico', group = 'gdp' ).then(function(data){
  console.log(data)       
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/country/mexico?c=guest:guest&group=gdp");

Countries by indicator

Get data for all countries for specific indicator

/country/all/{indicator}

te.getIndicatorData(indicators='gdp', output_type='df')
data = te.getIndicatorData(indicator = 'gdp').then(function(data){
  console.log(data)       
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/country/all/gdp?c=guest:guest");

By ticker

Get data by specific ticker

/country/ticker/{ticker}

te.getIndicatorByTicker(ticker='usurtot', output_type='df')
data = te.getIndicatorData(ticker = 'usurtot').then(function(data){
  console.log(data)       
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/country/ticker/usurtot?c=guest:guest");

Response fields

FieldTypeDescriptionExample
CountrystringCountry name“Algeria”
CategorystringCategory name“Auto Exports”,
TitlestringCombination of country/category“Mexico Auto Exports”
LatestValueDatestringDate of the last released value“2023-03-31T00:00:00”
LatestValuenumberLast released value272.69
SourcestringSource of the data“Instituto Nacional de Estadística y Geografía (INEGI)”
SourceURLstringURL link of the source“https://www.inegi.org.mx/”
UnitstringUnit of the value“Thousand Units”
URLstringHyperlink at Trading Economics“/mexico/auto-exports”
CategoryGroupstringCategory group name“Trade”
AdjustmentstringData description, for example: base period, price adjustment, seasonality“Current USD
FrequencystringFrequency of the indicator“Monthly”
HistoricalDataSymbolstringUnique symbol used by Trading Economics“MEXICOAUTEXP”
CreateDatestringTime when an indicator was inserted“2019-07-23T12:20:00”
FirstValueDatestringDate of the first value in the historical series“1988-01-31T00:00:00”
PreviousValuenumberPreviously released value230.48
PreviousValueDatestringDate of the previously released value“2023-02-28T00:00:00”

Fields available in ‘List all indicators’

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

Fields available in ‘List all available 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”