Historical

By ID

Get historical data by ID

/eurostat/historical/{id}

import tradingeconomics as te
te.login('your_api_key')
te.getHistoricalEurostat(ID = '24804')
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getEurostatHistorical(id = '24804').then(function(data){
    console.log(data)     
});
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/eurostat/historical/24804?c=guest:guest");

By ID and date

Get historical data by ID and specific date

/eurostat/historical/{id}?d1={yyyy-mm-dd}

te.getHistoricalEurostat(ID = '24804', initDate = '2015-01-01')
data = te.getEurostatHistorical(id = '24804',
 start_date = '2015-01-01').then(function(data){
    console.log(data)     
});
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/eurostat/historical/24804?d1=2015-01-01&c=guest:guest");

/eurostat/historical/{id}?d1={yyyy-mm-dd}&d2={yyyy-mm-dd}

te.getHistoricalEurostat(ID = '24804', initDate = '2016-01-01',
 endDate = '2020-01-01')
data = te.getEurostatHistorical(id = '24804', start_date = '2016-01-01',
 end_date = '2020-01-01').then(function(data){
    console.log(data)     
});
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/eurostat/historical/24804?d1=2016-01-01&d2=2020-01-01&c=guest:guest");

Response fields

FieldTypeDescriptionExample
IDnumberTrading Economics unique identifier24804
DatestringRelease time and date in UTC“2020-12-31T00:00:00”
ValuenumberValue2.4000
LastUpdatestringTime when new data was inserted or changed“2021-04-20T23:16:00”