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
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
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
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");
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
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
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
Field | Type | Description | Example |
---|---|---|---|
Country | string | Country name | “Algeria” |
Category | string | Category name | “Auto Exports”, |
Title | string | Combination of country/category | “Mexico Auto Exports” |
LatestValueDate | string | Date of the last released value | “2023-03-31T00:00:00” |
LatestValue | number | Last released value | 272.69 |
Source | string | Source of the data | “Instituto Nacional de Estadística y Geografía (INEGI)” |
SourceURL | string | URL link of the source | “https://www.inegi.org.mx/” |
Unit | string | Unit of the value | “Thousand Units” |
URL | string | Hyperlink at Trading Economics | “/mexico/auto-exports” |
CategoryGroup | string | Category group name | “Trade” |
Adjustment | string | Data description, for example: base period, price adjustment, seasonality | “Current USD |
Frequency | string | Frequency of the indicator | “Monthly” |
HistoricalDataSymbol | string | Unique symbol used by Trading Economics | “MEXICOAUTEXP” |
CreateDate | string | Time when an indicator was inserted | “2019-07-23T12:20:00” |
FirstValueDate | string | Date of the first value in the historical series | “1988-01-31T00:00:00” |
PreviousValue | number | Previously released value | 230.48 |
PreviousValueDate | string | Date of the previously released value | “2023-02-28T00:00:00” |
Fields available in ‘List all indicators’
Field | Type | Description | Example |
---|---|---|---|
Category | string | Category name | “Auto Exports”, |
CategoryGroup | string | Category group name | “Trade” |
Fields available in ‘List all available countries’
Field | Type | Description | Example |
---|---|---|---|
Country | string | Country name | “Algeria” |
Continent | string | Continent name from the country | “Africa” |
Group | string | Group name from the country | “North Africa, OPEC” |
ISO3 | string | Country ISO3 code | “DZA” |
ISO2 | string | Country ISO2 code | “DZ” |