Historical

World Bank Historical data is also provided by the API using a series code as a parameter.

By series code

Get historical data by specific series code

/worldbank/historical?c=guest:guest&s=(series_code)

import tradingeconomics as te
te.login('your_api_key')
te.getWBHistorical(series_code = 'usa.fr.inr.rinr')
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getworldbankHistorical(series_code = 'usa.fr.inr.rinr').then(function(data){
  console.log(data)     
});
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/worldbank/historical?c=guest:guest&s=usa.fr.inr.rinr");

/worldbank/historical?c=guest:guest&s=(series_codes)

te.getWBHistorical(series_code = 'usa.fr.inr.rinr, prt.ag.con.fert.pt.zs')
data = te.getworldbankHistorical(
  series_code = 'usa.fr.inr.rinr, prt.ag.con.fert.pt.zs').then(function(data){
  console.log(data)     
});
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/worldbank/historical?c=guest:guest&s=usa.fr.inr.rinr,%20prt.ag.con.fert.pt.zs");

Response fields

FieldTypeDescriptionExample
SymbolstringUnique symbol used by Trading Economics“usa.fr.inr.rinr”
DatestringRelease time and date in UTC“1961-06-15T00:00:00”
ValuenumberReleased value3.10788