Skip to content
Docs
Get API key

Search the API

The following endpoints allow you to search on the Trading Economics API.

You can search by keyword, term, or category. If you do not know which category to look for, just use the search/{term} endpoint option.

Note
The response fields returned depend on the search results.

By term

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/search/gold?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.getSearch(term  = 'gold')

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

Text
https://api.tradingeconomics.com/search/{term}?c={your_api_key}&f=json
JSON
[
  {
    "Symbol": "CHINAGOLRES"
  },
  {
    "Symbol": "EUROAREAGOLRES"
  },
  {
    "Symbol": "GERMANYGOLRES"
  },
  {
    "Symbol": "XAUUSD:CUR"
  }
]

List of categories

List all categories available for searching

Using Requests:

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

Or using our package:

Python
te.getSearch()
Text
https://api.tradingeconomics.com/search/categories?c={your_api_key}&f=json
JSON
[
  {
    "Categories": "Markets"
  },
  {
    "Categories": "Commodity"
  },
  {
    "Categories": "Currency"
  },
  {
    "Categories": "Index"
  },
  {
    "Categories": "Economic"
  },
  {
    "Categories": "Comtrade"
  },
  {
    "Categories": "Worldbank - wb"
  },
  {
    "Categories": "Federal Reserve - fred"
  }
]

By term and category

Using Requests:

Python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/search/japan?category=markets&c={your_api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

Python
te.getSearch(term  = 'japan', category = 'markets')
Text
https://api.tradingeconomics.com/search/{term}?c={your_api_key}&category={category}&f=json
JSON
[
  {
    "Symbol": "GJGB10:IND",
    "Ticker": "GJGB10",
    "Name": "Japan 10Y",
    "Country": "Japan",
    "Date": "2023-10-10T13:59:37",
    "Type": "bond",
    "decimals": null,
    "state": null,
    "Last": null,
    "Close": null,
    "CloseDate": null,
    "MarketCap": null,
    "URL": "/japan/government-bond-yield",
    "Importance": null,
    "DailyChange": null,
    "DailyPercentualChange": null,
    "WeeklyChange": null,
    "WeeklyPercentualChange": null,
    "MonthlyChange": null,
    "MonthlyPercentualChange": null,
    "YearlyChange": null,
    "YearlyPercentualChange": null,
    "YTDChange": null,
    "YTDPercentualChange": null,
    "day_high": null,
    "day_low": null
  }
]