Get the child categories for a specified parent category.
This request can return either XML or JSON by setting the file_type parameter to xml or json. Note that the default value of file_type is xml. The API key 'abcdefghijklmnopqrstuvwxyz123456' is for demonstration purposes only. Use a registered API key instead.
For category_id 13 (U.S. Trade & International Transactions):
https://api.stlouisfed.org/fred/category/children?category_id=13&api_key=abcdefghijklmnopqrstuvwxyz123456
<?xml version="1.0" encoding="utf-8" ?> <categories> <category id="16" name="Exports" parent_id="13"/> <category id="17" name="Imports" parent_id="13"/> <category id="3000" name="Income Payments & Receipts" parent_id="13"/> <category id="125" name="Trade Balance" parent_id="13"/> <category id="127" name="U.S. International Finance" parent_id="13"/> </categories>
The category tag's notes attribute is optional.
https://api.stlouisfed.org/fred/category/children?category_id=13&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
{ "categories": [ { "id": 16, "name": "Exports", "parent_id": 13 }, { "id": 17, "name": "Imports", "parent_id": 13 }, { "id": 3000, "name": "Income Payments & Receipts", "parent_id": 13 }, { "id": 125, "name": "Trade Balance", "parent_id": 13 }, { "id": 127, "name": "U.S. International Finance", "parent_id": 13 } ] }
Read API Keys for more information.
A key or file extension that indicates the type of file to send.
xml = Extensible Markup Language. The HTTP Content-Type is text/xml.
json = JavaScript Object Notation. The HTTP Content-Type is application/json.
The id for a category.
The start of the real-time period. For more information, see Real-Time Periods.
The end of the real-time period. For more information, see Real-Time Periods.