Skip to content
Docs
Get API key
Indicators

Indicators Historical Data

The following API endpoints allow you to obtain historical data for more than 200 indicators.

The historical endpoint contains a time series with fields such as country, category, datetime, close, frequency, historicalDataSymbol, lastupdate, and observed value. It allows one to check the evolution of key indicators over time.

By country and indicator

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/historical/country/mexico/indicator/gdp?c={your_api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

Python
import tradingeconomics as te
te.login('your_api_key')
te.getHistoricalData(country='mexico', indicator='gdp')

With multi countries and indicators:

Python
te.getHistoricalData(country=['mexico', 'sweden'], indicator=['gdp','population'], 
 initDate='2015-01-01')

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

Text
https://api.tradingeconomics.com/historical/country/{country}/indicator/{indicator}?c={your_api_key}&f=json
JSON
[
  {
    "Country": "Mexico",
    "Category": "GDP",
    "DateTime": "2020-12-31T00:00:00",
    "Value": 1090.51,
    "Frequency": "Yearly",
    "HistoricalDataSymbol": "WGDPMEXI",
    "LastUpdate": "2023-06-30T15:54:00"
  },
  {
    "Country": "Mexico",
    "Category": "GDP",
    "DateTime": "2021-12-31T00:00:00",
    "Value": 1272.84,
    "Frequency": "Yearly",
    "HistoricalDataSymbol": "WGDPMEXI",
    "LastUpdate": "2022-12-30T12:46:00"
  },
  {
    "Country": "Mexico",
    "Category": "GDP",
    "DateTime": "2022-12-31T00:00:00",
    "Value": 1414.19,
    "Frequency": "Yearly",
    "HistoricalDataSymbol": "WGDPMEXI",
    "LastUpdate": "2023-06-30T15:54:00"
  }
]

By country, indicator and date

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/historical/country/mexico,sweden/indicator/gdp,population/2015-01-01/2015-12-31?c={your_api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

Python
te.getHistoricalData(country=['mexico', 'sweden'], indicator=['gdp','population'], 
 initDate='2015-01-01', endDate='2015-12-31')
Text
https://api.tradingeconomics.com/historical/country/{countries}/indicator/{indicators}/{yyyy-mm-dd}/{yyyy-mm-dd}?c={your_api_key}&f=json
JSON
[
  {
    "Country": "Mexico",
    "Category": "GDP",
    "DateTime": "2022-12-31T00:00:00",
    "Value": 1414.19,
    "Frequency": "Yearly",
    "HistoricalDataSymbol": "WGDPMEXI",
    "LastUpdate": "2023-06-30T15:54:00"
  },
  {
    "Country": "Mexico",
    "Category": "Population",
    "DateTime": "2022-12-31T00:00:00",
    "Value": 129.0,
    "Frequency": "Yearly",
    "HistoricalDataSymbol": "MEX SP.POP.TOTL",
    "LastUpdate": "2023-05-30T18:48:00"
  },
  {
    "Country": "Sweden",
    "Category": "GDP",
    "DateTime": "2022-12-31T00:00:00",
    "Value": 585.94,
    "Frequency": "Yearly",
    "HistoricalDataSymbol": "WGDPSWED",
    "LastUpdate": "2023-06-30T15:55:00"
  }
]

By ticker

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/historical/ticker/USURTOT/2015-03-01?c={your_api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

Python
te.getHistoricalByTicker(ticker = 'USURTOT', start_date = '2015-03-01')   
Text
https://api.tradingeconomics.com/historical/ticker/{ticker}/{yyyy-mm-dd}?c={your_api_key}&f=json
JSON
[
  {
    "Country": "United States",
    "Category": "Unemployment Rate",
    "DateTime": "2023-07-31T00:00:00",
    "Value": 3.5,
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "USURTOT",
    "LastUpdate": "2023-09-01T12:30:00"
  },
  {
    "Country": "United States",
    "Category": "Unemployment Rate",
    "DateTime": "2023-08-31T00:00:00",
    "Value": 3.8,
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "USURTOT",
    "LastUpdate": "2023-10-06T12:30:00"
  },
  {
    "Country": "United States",
    "Category": "Unemployment Rate",
    "DateTime": "2023-09-30T00:00:00",
    "Value": 3.8,
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "USURTOT",
    "LastUpdate": "2023-10-06T12:30:00"
  }
]
Note
Ticker symbols can be retrieved using the Snapshot or Search endpoints.

Latest historical

Historical endpoint that provides a response containing all recently updated/revised economic indicator records.

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/historical/latest?c={your_api_key}&country=brazil&date=2025-08-26'
data = requests.get(url).json()
print(data)

Or using our package:

Python
te.getHistoricalLatest(country=['United States', 'Brazil'], date='2025-08-26')
Text
https://api.tradingeconomics.com/historical/latest?c={your_api_key}&f=json
JSON
[
  {
    "Country": "Greece",
    "Category": "Car Registrations",
    "DateTime": "2025-02-28T00:00:00",
    "Value": 9818.0,
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "GREECECARREG",
    "LastUpdate": "2025-03-13T14:49:00"
  },
  {
    "Country": "Italy",
    "Category": "Part Time Employment",
    "DateTime": "2024-12-31T00:00:00",
    "Value": 3296.0,
    "Frequency": "Quarterly",
    "HistoricalDataSymbol": "ITALYPARTIMEMP",
    "LastUpdate": "2025-03-13T14:47:00"
  },
  {
    "Country": "Italy",
    "Category": "Full Time Employment",
    "DateTime": "2024-12-31T00:00:00",
    "Value": 15666.0,
    "Frequency": "Quarterly",
    "HistoricalDataSymbol": "ITALYFULTIMEMP",
    "LastUpdate": "2025-03-13T14:46:00"
  }
]

Latest updates

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/historical/updates?c={your_api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

Python
te.getHistoricalUpdates()
Text
https://api.tradingeconomics.com/historical/updates?c={your_api_key}&f=json
JSON
[
  {
    "Country": "Austria",
    "Category": "Capital Flows",
    "HistoricalDataSymbol": "AUSTRIACAPFLO",
    "LastUpdate": "2023-10-09T16:39:00"
  },
  {
    "Country": "Tanzania",
    "Category": "Inflation Rate",
    "HistoricalDataSymbol": "TANZANIAIR",
    "LastUpdate": "2023-10-09T16:28:00"
  },
  {
    "Country": "Uganda",
    "Category": "Deposit Interest Rate",
    "HistoricalDataSymbol": "UGAFRINRDPST",
    "LastUpdate": "2023-10-09T16:06:00"
  }
]

Response fields

FieldTypeDescriptionExample
CountrystringName of the country associated with the indicator.“Mexico”
CategorystringEconomic indicator name or category.“GDP”
Date TimestringDate of the reported value, in UTC format.“2021-12-31T00:00:00”
ClosenumberValue of the indicator at the specified date.*1272.8400
FrequencystringFrequency of the data series.“Yearly”
HistoricalDataSymbolstringUnique identifier used internally by Trading Economics to represent the series.“WGDPMEXI”
LastUpdatestringTimestamp of the most recent update to the data (insert or change), in UTC.“2022-12-30T12:46:00”

Fields in ‘Latest updates’

FieldTypeDescriptionExample
CountrystringName of the country associated with the indicator.“Mexico”
CategorystringEconomic indicator name or category.“GDP”
HistoricalDataSymbolstringUnique identifier used internally by Trading Economics to represent the series.“WGDPMEXI”
LastUpdatestringTimestamp of the most recent update to the data (insert or change), in UTC.“2022-12-30T12:46:00”

*Python package response field returns Value instead of ‘Close’.