get_tags#

async AsyncAPI.get_tags(realtime_start=None, realtime_end=None, tag_names=None, tag_group_id=None, search_text=None, limit=None, offset=None, order_by=None, sort_order=None)#

Get FRED tags

Retrieve FRED tags based on specified parameters.

Parameters:
  • realtime_start (str | datetime, optional) – The start of the real-time period. String format: YYYY-MM-DD.

  • realtime_end (str | datetime, optional) – The end of the real-time period. String format: YYYY-MM-DD.

  • tag_names (str | list, optional) – A semicolon-delimited list of tag names to filter results.

  • tag_group_id (str, optional) – A tag group ID to filter results.

  • search_text (str, optional) – The words to match against tag names and descriptions.

  • limit (int, optional) – The maximum number of results to return. Default is 1000.

  • offset (int, optional) – The offset for the results. Used for pagination.

  • order_by (str, optional) – Order results by values such as ‘series_count’, ‘popularity’, etc.

  • sort_order (str, optional) – Sort order of results. ‘asc’ for ascending, ‘desc’ for descending.

Returns:

If multiple tags are returned.

Return type:

List[Tag]

Raises:

ValueError – If the API request fails or returns an error.

Example

>>> import fedfred as fd
>>> import asyncio
>>> async def main():
>>>     fred = fd.FredAPI('your_api_key').Async
>>>     tags = await fred.get_tags()
>>>     for tag in tags:
>>>         print(tag.name)
>>> asyncio.run(main())
'nation'
'nsa'
'oecd'...
FRED API Documentation:

https://fred.stlouisfed.org/docs/api/fred/tags.html