Skip to content
Docs
Get API key
Indicators

Indicators Peers and Components

Use the following API endpoints to obtain peers for related indicators and countries.

Peers describe the relationships between different economic indicator series. A peer can be a component of an aggregate indicator (e.g., Core Inflation Rate is a component of CPI), a related series in the same domain, or a parent/derivative measure. Use these endpoints to discover how indicators connect to each other for a given country and category, or by ticker.

By country and category

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/peers/CPI%20YOY?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.getPeers(ticker='CPI YOY')

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

Text
https://api.tradingeconomics.com/peers/(ticker)?c={your_api_key}&f=json
JSON
[
  {
    "Ticker": "CPI YOY",
    "Peer": "UNITEDSTACONPRIINDCP",
    "Relationship": 0,
    "Country": "United States",
    "Category": "Consumer Price Index CPI",
    "Title": "United States Consumer Price Index (CPI)",
    "LatestValueDate": "2023-08-31T00:00:00",
    "LatestValue": 307.03,
    "Source": "U.S. Bureau of Labor Statistics",
    "SourceURL": "http://www.bls.gov",
    "Unit": "points",
    "URL": "/united-states/consumer-price-index-cpi",
    "CategoryGroup": "Prices",
    "Adjustment": "1982-1984=100, NSA",
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "UNITEDSTACONPRIINDCP",
    "CreateDate": "2014-06-11T09:44:00",
    "FirstValueDate": "1950-01-31T00:00:00",
    "PreviousValue": 305.69,
    "PreviousValueDate": "2023-07-31T00:00:00"
  },
  {
    "Ticker": "CPI YOY",
    "Peer": "UNITEDSTACORCONPRI",
    "Relationship": 0,
    "Country": "United States",
    "Category": "Core Consumer Prices",
    "Title": "United States Core Consumer Prices",
    "LatestValueDate": "2023-08-31T00:00:00",
    "LatestValue": 309.66,
    "Source": "U.S. Bureau of Labor Statistics",
    "SourceURL": "http://www.bls.gov",
    "Unit": "points",
    "URL": "/united-states/core-consumer-prices",
    "CategoryGroup": "Prices",
    "Adjustment": "1982-1984=100, SA",
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "UNITEDSTACORCONPRI",
    "CreateDate": "2013-06-18T16:46:00",
    "FirstValueDate": "1957-01-31T00:00:00",
    "PreviousValue": 308.80,
    "PreviousValueDate": "2023-07-31T00:00:00"
  },
  {
    "Ticker": "CPI YOY",
    "Peer": "USACORECPIRATE",
    "Relationship": 1,
    "Country": "United States",
    "Category": "Core Inflation Rate",
    "Title": "United States Core Inflation Rate",
    "LatestValueDate": "2023-08-31T00:00:00",
    "LatestValue": 4.30,
    "Source": "U.S. Bureau of Labor Statistics",
    "SourceURL": "https://www.bls.gov",
    "Unit": "percent",
    "URL": "/united-states/core-inflation-rate",
    "CategoryGroup": "Prices",
    "Adjustment": "1982-1984=100, NSA",
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "USACORECPIRATE",
    "CreateDate": "2012-10-02T14:16:00",
    "FirstValueDate": "1957-02-28T00:00:00",
    "PreviousValue": 4.70,
    "PreviousValueDate": "2023-07-31T00:00:00"
  }
]
Text
https://api.tradingeconomics.com/peers/country/(country)/(category)?c={your_api_key}&f=json
JSON
[
  {
    "Ticker": "MEXFRINRDPST",
    "Peer": "MEXFRINRDPST",
    "Relationship": -1,
    "Country": "Mexico",
    "Category": "Deposit Interest Rate",
    "Title": "Deposit Interest Rate in Mexico",
    "LatestValueDate": "2023-07-31T00:00:00",
    "LatestValue": 4.95,
    "Source": "IMF",
    "SourceURL": "https://www.imf.org",
    "Unit": "percent",
    "URL": "/mexico/deposit-interest-rate",
    "CategoryGroup": "inflation rate",
    "Adjustment": "",
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "MEXFRINRDPST",
    "CreateDate": "2015-12-03T14:37:00",
    "FirstValueDate": "1976-01-31T00:00:00",
    "PreviousValue": 4.63,
    "PreviousValueDate": "2023-06-30T00:00:00"
  },
  {
    "Ticker": "MEXICOBANBALSHE",
    "Peer": "MEXICOBANBALSHE",
    "Relationship": -1,
    "Country": "Mexico",
    "Category": "Banks Balance Sheet",
    "Title": "Mexico Banks Balance Sheet",
    "LatestValueDate": "2023-08-31T00:00:00",
    "LatestValue": 10702998.84,
    "Source": "Banco de México",
    "SourceURL": "http://www.banxico.org.mx",
    "Unit": "MXN Million",
    "URL": "/mexico/banks-balance-sheet",
    "CategoryGroup": "inflation rate",
    "Adjustment": "NSA",
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "MEXICOBANBALSHE",
    "CreateDate": "2014-09-08T15:29:00",
    "FirstValueDate": "2000-12-31T00:00:00",
    "PreviousValue": 10608854.67,
    "PreviousValueDate": "2023-07-31T00:00:00"
  },
  {
    "Ticker": "MEXICOBANBALSHE",
    "Peer": "MEXICOCENBANBALSHE",
    "Relationship": 0,
    "Country": "Mexico",
    "Category": "Central Bank Balance Sheet",
    "Title": "Mexico Central Bank Balance Sheet",
    "LatestValueDate": "2023-09-30T00:00:00",
    "LatestValue": 4204904816.00,
    "Source": "Banco de México",
    "SourceURL": "https://www.banxico.org.mx/",
    "Unit": "MXN Thousand",
    "URL": "/mexico/central-bank-balance-sheet",
    "CategoryGroup": "inflation rate",
    "Adjustment": "NSA",
    "Frequency": "Monthly",
    "HistoricalDataSymbol": "MEXICOCENBANBALSHE",
    "CreateDate": "2014-08-14T17:50:00",
    "FirstValueDate": "1985-12-31T00:00:00",
    "PreviousValue": 4001809952.00,
    "PreviousValueDate": "2023-08-31T00:00:00"
  }
]

Relationship types

The Relationship field describes what the peer is relative to the queried indicator (not the opposite direction).

ValueTypeDescriptionExample
0RelatedThe peer is a related indicator in the same domain.US Unemployment Rate is related with US Non Farm Payrolls.
1ComponentThe peer is a component of the queried indicator.Private Unemployment Rate is a component of Unemployment Rate.
2ParentThe peer is a parent (broader aggregate) of the queried indicator.Unemployment Rate is a parent of Unemployment Rate among Females.
3DerivativeThe peer is a derived transformation of the queried indicator.Unemployment Rate MoM is a derivative of Unemployment Rate YoY.
4UnderlyingThe peer is the underlying base series for the queried indicator.Unemployment Rate is the underlying of Unemployment Rate MoM.

Response fields

FieldTypeDescriptionExample
TickerstringUnique ticker code used by Trading Economics to identify the indicator.“CPI YOY”
PeerstringRelated or comparable ticker code.“MEXFRINRDPST”
RelationshipnumberNumeric code indicating the peer’s relationship to the ticker (see Relationship types above).0
CountrystringName of the country associated with the indicator.“Mexico”
CategorystringName of the economic or financial category.“Deposit Interest Rate”
TitlestringReadable title combining country and category.“Deposit Interest Rate in Mexico”
LatestValueDatestringDate of the most recently released value, in UTC.“2023-01-31T00:00:00”
LatestValuenumberMost recent published value for the indicator.4.19
SourcestringOrganization or institution providing the data.“IMF”
SourceURLstringDirect URL link to the original data source (if available).“https://www.imf.org”
UnitstringUnit of measurement for the value.“percent”
URLstringHyperlink to the indicator page on Trading Economics.“/mexico/deposit-interest-rate”
CategoryGroupstringBroad classification group for the indicator.“Inflation Rate”
AdjustmentstringDescription of any adjustments.“1982-1984=100, NSA”
FrequencystringFrequency at which the data is reported.“Monthly”
HistoricalDataSymbolstringUnique identifier used by Trading Economics for the data series.“UNITEDSTACONPRIINDCP”
CreateDatestringDate and time when the indicator was added to the database.“2014-06-11T09:44:00”
FirstValueDatestringDate of the first available historical observation (ISO 8601 format).“1950-01-31T00:00:00”
PreviousValuenumberValue released prior to the latest one.300.84
PreviousValueDatestringRelease date of the previous value.“2023-02-28T00:00:00”