get_category#
- FredAPI.get_category(category_id)[source]#
Get a FRED Category
Retrieve information about a specific category from the FRED API.
- Parameters:
category_id (int) – The ID of the category to retrieve.
- Returns:
If multiples categories are returned.
- Return type:
List[Category]
- Raises:
ValueError – If the response from the FRED API indicates an error.
Example
>>> import fedfred as fd >>> fred = fd.FredAPI('your_api_key') >>> category = fred.get_category(125) >>> print(category[0].name) 'Trade Balance'
- FRED API Documentation: