### XML Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/related_tags.html
Example of an XML response when requesting related FRED tags.
```xml
```
--------------------------------
### XML Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/series_search_related_tags.html
This is an example of the XML response structure when requesting related FRED tags.
```xml
```
--------------------------------
### GET /fred/release/tables
Source: https://fred.stlouisfed.org/docs/api/fred/release_tables.html
Retrieves release table trees for a given release. You can specify an element_id to get a specific part of the tree or omit it to start from the root.
```APIDOC
## GET /fred/release/tables
### Description
Get release table trees for a given release. You can go directly to the tree structure by passing the appropriate element_id. You may also use a drill-down approach to start at the root (top most) element by leaving the element_id off. Note that release dates are published by data sources and do not necessarily represent when data will be available on the FRED or ALFRED websites.
### Method
GET
### Endpoint
https://api.stlouisfed.org/fred/release/tables
### Parameters
#### Query Parameters
- **api_key** (string) - Required - Your FRED API key.
- **file_type** (string) - Optional - The type of file to return. Options are 'xml' (default) or 'json'.
- **release_id** (integer) - Required - The ID of the release.
- **element_id** (integer) - Optional - The ID of the element to retrieve the tree for. If omitted, the root element is returned.
- **include_observation_values** (boolean) - Optional - Whether to include observation values. Defaults to false.
- **observation_date** (date) - Optional - The observation date to filter by.
### Request Example
#### JSON Request
```json
https://api.stlouisfed.org/fred/release/tables?release_id=53&api_key=abcdefghijklmnopqrstuvwxyz123456&element_id=12886&file_type=json
```
### Response
#### Success Response (200)
- **elements** (object) - Contains the release table tree structure.
- **name** (string) - The name of the element.
- **element_id** (integer) - The ID of the element.
- **release_id** (integer) - The ID of the release.
- **element** (array) - An array of child elements.
- **element_id** (integer) - The ID of the child element.
- **release_id** (integer) - The ID of the release.
- **series_id** (string) - The series ID associated with the element, if any.
- **parent_id** (integer) - The ID of the parent element.
- **line** (integer) - The line number of the element.
- **type** (string) - The type of the element (e.g., 'series').
- **name** (string) - The name of the child element.
- **level** (integer) - The level of the element in the tree.
- **children** (array) - An array of further nested child elements.
#### Response Example
```json
{
"elements": {
"name": "Personal consumption expenditures",
"element_id": 12886,
"release_id": 53,
"element": [
{
"element_id": 12887,
"release_id": 53,
"series_id": "DGDSRL1A225NBEA",
"parent_id": 12886,
"line": 3,
"type": "series",
"name": "Goods",
"level": 1,
"children": [
{
"element_id": 12888,
"release_id": 53,
"series_id": "DDURRL1A225NBEA",
"parent_id": 12887,
"line": 4,
"type": "series",
"name": "Durable goods",
"level": 2,
"children": []
},
{
"element_id": 12889,
"release_id": 53,
"series_id": "DNDGRL1A225NBEA",
"parent_id": 12887,
"line": 5,
"type": "series",
"name": "Nondurable goods",
"level": 2,
"children": []
}
]
},
{
"element_id": 12890,
"release_id": 53,
"series_id": "DSERRL1A225NBEA",
"parent_id": 12886,
"line": 6,
"type": "series",
"name": "Services",
"level": 1,
"children": []
}
]
}
}
```
```
--------------------------------
### XML Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/category_tags.html
The default response format for the category tags request.
```xml
```
--------------------------------
### XML Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/release_tags.html
Sample XML output returned by the fred/release/tags endpoint.
```xml
```
--------------------------------
### XML Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/category_related_tags.html
Example of an XML response when requesting related FRED tags. The response includes tag details such as name, group_id, and series_count.
```xml
```
--------------------------------
### XML Response Format
Source: https://fred.stlouisfed.org/docs/api/fred/series_categories.html
Example of the XML response structure returned by the API.
```xml
```
--------------------------------
### XML Error Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/errors.html
Example of an XML-formatted error response returned by the API when a request is invalid.
```text
https://api.stlouisfed.org/fred/series/updates
```
```xml
HTTP/1.x 400 Bad Request
Content-Type: text/xml;charset=utf-8
...
```
--------------------------------
### GET /fred/release/sources
Source: https://fred.stlouisfed.org/docs/api/fred/release_sources.html
Retrieves the sources for a specific release of economic data.
```APIDOC
## GET /fred/release/sources
### Description
Get the sources for a release of economic data.
### Method
GET
### Endpoint
https://api.stlouisfed.org/fred/release/sources
### Parameters
#### Query Parameters
- **api_key** (string) - Required - 32 character alpha-numeric lowercase string.
- **file_type** (string) - Optional - A key or file extension that indicates the type of file to send (xml or json). Default: xml.
- **release_id** (integer) - Required - The id for a release.
- **realtime_start** (string) - Optional - The start of the real-time period (YYYY-MM-DD). Default: today's date.
- **realtime_end** (string) - Optional - The end of the real-time period (YYYY-MM-DD). Default: today's date.
### Request Example
https://api.stlouisfed.org/fred/release/sources?release_id=51&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
### Response
#### Success Response (200)
- **realtime_start** (string) - The start of the real-time period.
- **realtime_end** (string) - The end of the real-time period.
- **sources** (array) - List of source objects containing id, name, and link.
#### Response Example
{
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"sources": [
{
"id": 18,
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"name": "U.S. Department of Commerce: Bureau of Economic Analysis",
"link": "http://www.bea.gov/"
}
]
}
```
--------------------------------
### GET /releases/dates
Source: https://fred.stlouisfed.org/docs/api/fred/releases_dates.html
Retrieves a list of release dates for economic data releases.
```APIDOC
## GET /releases/dates
### Description
Retrieves a list of release dates for economic data releases.
### Method
GET
### Endpoint
/releases/dates
### Parameters
#### Query Parameters
- **api_key** (string) - Required - 32 character alpha-numeric lowercase string.
- **file_type** (string) - Optional - A key or file extension that indicates the type of file to send ('xml', 'json'). Default: xml.
- **realtime_start** (string) - Optional - The start of the real-time period (YYYY-MM-DD). Default: First day of the current year.
- **realtime_end** (string) - Optional - The end of the real-time period (YYYY-MM-DD). Default: 9999-12-31.
- **limit** (integer) - Optional - The maximum number of results to return (1-1000). Default: 1000.
- **offset** (integer) - Optional - Non-negative integer. Default: 0.
- **order_by** (string) - Optional - Order results by 'release_date', 'release_id', or 'release_name'. Default: release_date.
- **sort_order** (string) - Optional - Sort results by 'asc' or 'desc'. Default: desc.
### Response
#### Success Response (200)
- **realtime_start** (string) - Start of the real-time period.
- **realtime_end** (string) - End of the real-time period.
- **order_by** (string) - Attribute used for ordering.
- **sort_order** (string) - Sort direction.
- **count** (integer) - Total number of results.
- **offset** (integer) - Current offset.
- **limit** (integer) - Limit applied.
- **release_dates** (array) - List of release date objects.
#### Response Example
{
"realtime_start": "2013-01-01",
"realtime_end": "9999-12-31",
"order_by": "release_date",
"sort_order": "desc",
"count": 1129,
"offset": 0,
"limit": 1000,
"release_dates": [
{
"release_id": 9,
"release_name": "Advance Monthly Sales for Retail and Food Services",
"date": "2013-08-13"
}
]
}
```
--------------------------------
### JSON Response Format
Source: https://fred.stlouisfed.org/docs/api/fred/series_categories.html
Example of the JSON response structure returned by the API.
```json
{
"categories": [
{
"id": 95,
"name": "Monthly Rates",
"parent_id": 15
},
{
"id": 275,
"name": "Japan",
"parent_id": 158
}
]
}
```
--------------------------------
### Get Series for a Release (XML)
Source: https://fred.stlouisfed.org/docs/api/fred/release_series.html
Use this HTTPS GET request to retrieve economic data series for a given release ID. Ensure you replace the placeholder API key with your registered key. The default response format is XML.
```http
https://api.stlouisfed.org/fred/release/series?release_id=51&api_key=abcdefghijklmnopqrstuvwxyz123456
```
--------------------------------
### JSON Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/category_related_tags.html
Example of a JSON response when requesting related FRED tags. The response structure is an object containing tag information, suitable for programmatic parsing.
```json
{
"realtime_start": "2013-08-13",
"realtime_end": "2013-08-13",
"order_by": "series_count",
"sort_order": "desc",
"count": 7,
"offset": 0,
"limit": 1000,
"tags": [
{
"name": "balance",
"group_id": "gen",
"notes": "",
"created": "2012-02-27 10:18:19-06",
"popularity": 65,
"series_count": 4
},
{
"name": "bea",
"group_id": "src",
"notes": "U.S. Department of Commerce: Bureau of Economic Analysis",
"created": "2012-02-27 10:18:19-06",
"popularity": 87,
"series_count": 4
},
{
"name": "nation",
"group_id": "geot",
"notes": "Country Level",
"created": "2012-02-27 10:18:19-06",
"popularity": 100,
"series_count": 4
},
{
"name": "usa",
"group_id": "geo",
"notes": "United States of America",
"created": "2012-02-27 10:18:19-06",
"popularity": 100,
"series_count": 4
},
{
"name": "goods",
"group_id": "gen",
"notes": "",
"created": "2012-02-27 10:18:19-06",
"popularity": 73,
"series_count": 2
},
{
"name": "nsa",
"group_id": "seas",
"notes": "Not seasonally adjusted",
"created": "2012-02-27 10:18:19-06",
"popularity": 96,
"series_count": 2
},
{
"name": "sa",
"group_id": "seas",
"notes": "Seasonally adjusted",
"created": "2012-02-27 10:18:19-06",
"popularity": 94,
"series_count": 2
}
]
}
```
--------------------------------
### GET /releases
Source: https://fred.stlouisfed.org/docs/api/fred/releases.html
Retrieves a list of economic data releases from the FRED database.
```APIDOC
## GET /releases
### Description
Retrieves a list of economic data releases.
### Method
GET
### Endpoint
/releases
### Parameters
#### Query Parameters
- **api_key** (string) - Required - 32 character alpha-numeric lowercase string.
- **file_type** (string) - Optional - 'xml' or 'json'. Default: xml.
- **realtime_start** (string) - Optional - YYYY-MM-DD formatted string. Default: today's date.
- **realtime_end** (string) - Optional - YYYY-MM-DD formatted string. Default: today's date.
- **limit** (integer) - Optional - Maximum number of results (1-1000). Default: 1000.
- **offset** (integer) - Optional - Non-negative integer. Default: 0.
- **order_by** (string) - Optional - 'release_id', 'name', 'press_release', 'realtime_start', 'realtime_end'. Default: release_id.
- **sort_order** (string) - Optional - 'asc' or 'desc'. Default: asc.
```
--------------------------------
### GET /fred/series/release
Source: https://fred.stlouisfed.org/docs/api/fred/series_release.html
Retrieves the release information for a specific economic data series.
```APIDOC
## GET /fred/series/release
### Description
Get the release for an economic data series.
### Method
GET
### Endpoint
https://api.stlouisfed.org/fred/series/release
### Parameters
#### Query Parameters
- **api_key** (string) - Required - 32 character alpha-numeric lowercase string.
- **file_type** (string) - Optional - A key or file extension that indicates the type of file to send ('xml' or 'json'). Default: xml.
- **series_id** (string) - Required - The id for a series.
- **realtime_start** (string) - Optional - The start of the real-time period (YYYY-MM-DD). Default: today's date.
- **realtime_end** (string) - Optional - The end of the real-time period (YYYY-MM-DD). Default: today's date.
### Request Example
https://api.stlouisfed.org/fred/series/release?series_id=IRA&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
### Response
#### Success Response (200)
- **realtime_start** (string) - The start of the real-time period.
- **realtime_end** (string) - The end of the real-time period.
- **releases** (array) - List of release objects.
#### Response Example
{
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"releases": [
{
"id": 21,
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"name": "H.6 Money Stock Measures",
"press_release": true,
"link": "http://www.federalreserve.gov/releases/h6/"
}
]
}
```
--------------------------------
### Release Sources Response (XML)
Source: https://fred.stlouisfed.org/docs/api/fred/release_sources.html
Example XML response showing source details including ID, name, and optional link for a release.
```xml
```
--------------------------------
### Release Sources Response (JSON)
Source: https://fred.stlouisfed.org/docs/api/fred/release_sources.html
Example JSON response containing source information for a release, including ID, name, and optional link.
```json
{
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"sources": [
{
"id": 18,
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"name": "U.S. Department of Commerce: Bureau of Economic Analysis",
"link": "http://www.bea.gov/"
},
{
"id": 19,
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"name": "U.S. Department of Commerce: Census Bureau",
"link": "http://www.census.gov/"
}
]
}
```
--------------------------------
### FRED API Search Request
Source: https://fred.stlouisfed.org/docs/api/fred/series_search.html
Example of an HTTPS GET request to search for series using the FRED API with JSON output format.
```http
https://api.stlouisfed.org/fred/series/search?search_text=monetary+service+index&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
```
--------------------------------
### Retrieve Category Series via HTTPS GET
Source: https://fred.stlouisfed.org/docs/api/fred/category_series.html
Example request to fetch series associated with a specific category ID using JSON format.
```http
https://api.stlouisfed.org/fred/category/series?category_id=125&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
```
--------------------------------
### Retrieve release dates in XML format
Source: https://fred.stlouisfed.org/docs/api/fred/releases_dates.html
Default format for the API request. Requires a valid API key.
```http
https://api.stlouisfed.org/fred/releases/dates?api_key=abcdefghijklmnopqrstuvwxyz123456
```
```xml
2013-08-132013-08-132013-08-132013-08-132013-08-132013-08-122013-08-122013-08-122013-08-122013-08-092013-08-092013-08-092013-08-092013-08-092013-08-092013-08-092013-08-082013-08-082013-08-082013-08-08
...
```
--------------------------------
### JSON Error Response Example
Source: https://fred.stlouisfed.org/docs/api/fred/errors.html
Example of a JSON-formatted error response returned by the API when a request is invalid.
```text
https://api.stlouisfed.org/fred/series/updates?file_type=json
```
```json
HTTP/1.x 400 Bad Request
Content-Type: text/xml;charset=utf-8
...
{
"error_code": 400,
"error_message": "Bad Request. The value for variable api_key is not registered. Read https://fred.stlouisfed.org/docs/api/api_key.html for more information."
}
```
--------------------------------
### GET /fred/release/tags
Source: https://fred.stlouisfed.org/docs/api/fred/release_tags.html
Get the FRED tags for a release. Optionally, filter results by tag name, tag group, or search. Series are assigned tags and releases. Indirectly through series, it is possible to get the tags for a release. See the related request fred/release/related_tags.
```APIDOC
## GET /fred/release/tags
### Description
Get the FRED tags for a release. Optionally, filter results by tag name, tag group, or search. Series are assigned tags and releases. Indirectly through series, it is possible to get the tags for a release. See the related request fred/release/related_tags.
### Method
GET
### Endpoint
https://api.stlouisfed.org/fred/release/tags
### Parameters
#### Query Parameters
- **api_key** (string) - Required - Your FRED API key.
- **file_type** (string) - Optional - The type of file to return (xml or json). Defaults to xml.
- **release_id** (integer) - Required - The ID of the FRED release.
- **realtime_start** (date) - Optional - The start of the real-time period.
- **realtime_end** (date) - Optional - The end of the real-time period.
- **tag_names** (string) - Optional - Comma-separated list of tag names to filter by.
- **tag_group_id** (string) - Optional - The ID of the tag group to filter by.
- **search_text** (string) - Optional - Filter results by search text.
- **limit** (integer) - Optional - The number of results to return.
- **offset** (integer) - Optional - The starting offset.
- **order_by** (string) - Optional - How to order the results (e.g., 'series_count', 'name', 'id').
- **sort_order** (string) - Optional - The sort order ('asc' or 'desc').
### Request Example
#### JSON
```json
https://api.stlouisfed.org/fred/release/tags?release_id=86&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
```
### Response
#### Success Response (200)
- **tags** (object) - Contains tag information.
- **name** (string) - The name of the tag.
- **group_id** (string) - The ID of the tag group.
- **notes** (string) - Notes about the tag.
- **created** (date) - The date the tag was created.
- **popularity** (integer) - The popularity of the tag.
- **series_count** (integer) - The number of series associated with the tag.
#### Response Example
```json
{
"tags": [
{
"name": "commercial paper",
"group_id": "gen",
"notes": "",
"created": "2012-03-19 10:40:59-05",
"popularity": 55,
"series_count": 18
},
{
"name": "frb",
"group_id": "src",
"notes": "Board of Governors of the Federal Reserve System",
"created": "2012-02-27 10:18:19-06",
"popularity": 90,
"series_count": 18
}
],
"realtime_start": "2013-08-14",
"realtime_end": "2013-08-14",
"order_by": "series_count",
"sort_order": "desc",
"count": 13,
"offset": 0,
"limit": 1000
}
```
```
--------------------------------
### Get Release Sources (XML)
Source: https://fred.stlouisfed.org/docs/api/fred/release_sources.html
Use this endpoint to retrieve sources for a given release ID in XML format. Ensure you replace the placeholder API key with your registered key.
```http
https://api.stlouisfed.org/fred/release/sources?release_id=51&api_key=abcdefghijklmnopqrstuvwxyz123456
```
--------------------------------
### Get Release Sources (JSON)
Source: https://fred.stlouisfed.org/docs/api/fred/release_sources.html
Retrieve sources for a specific release ID in JSON format by setting the file_type parameter. An API key is required.
```http
https://api.stlouisfed.org/fred/release/sources?release_id=51&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
```
--------------------------------
### Retrieve release dates in JSON format
Source: https://fred.stlouisfed.org/docs/api/fred/releases_dates.html
Request the response in JSON format by setting the file_type parameter to 'json'.
```http
https://api.stlouisfed.org/fred/releases/dates?api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
```
--------------------------------
### GET /fred/release/series
Source: https://fred.stlouisfed.org/docs/api/fred/release_series.html
Retrieves the series associated with a specific release.
```APIDOC
## GET /fred/release/series
### Description
Retrieves the series associated with a specific release.
### Method
GET
### Endpoint
https://api.stlouisfed.org/fred/release/series
### Parameters
#### Query Parameters
- **release_id** (string) - Required - The ID of the release.
- **api_key** (string) - Required - Your FRED API key.
- **file_type** (string) - Optional - The format of the response (e.g., json).
### Request Example
https://api.stlouisfed.org/fred/release/series?release_id=51&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
```
--------------------------------
### Get Release Dates (XML)
Source: https://fred.stlouisfed.org/docs/api/fred/release_dates.html
Use this request to retrieve release dates in XML format. Ensure you replace the placeholder API key with your registered key.
```http
https://api.stlouisfed.org/fred/release/dates?release_id=82&api_key=abcdefghijklmnopqrstuvwxyz123456
```
```xml
1997-02-101998-02-101999-02-042000-02-102001-01-162002-02-062003-02-072004-02-092005-02-172006-02-132007-02-162008-02-112009-03-032010-02-112011-02-232012-10-242013-04-10
```
--------------------------------
### GET /fred/category/series
Source: https://fred.stlouisfed.org/docs/api/fred/category_series.html
Retrieves the series associated with a specific category ID.
```APIDOC
## GET /fred/category/series
### Description
Retrieves the series associated with a specific category ID.
### Method
GET
### Endpoint
https://api.stlouisfed.org/fred/category/series
### Parameters
#### Query Parameters
- **category_id** (string) - Required - The category ID to retrieve series for.
- **api_key** (string) - Required - Your FRED API key.
- **file_type** (string) - Optional - The format of the response (e.g., json).
### Request Example
https://api.stlouisfed.org/fred/category/series?category_id=125&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
```
--------------------------------
### Release Date Query Parameters
Source: https://fred.stlouisfed.org/docs/api/fred/release_dates.html
Parameters used to control the output of release date endpoints.
```APIDOC
## Query Parameters
### offset
- **Type**: non-negative integer
- **Required**: Optional
- **Default**: 0
- **Description**: The starting index for the returned results.
### sort_order
- **Type**: string ('asc', 'desc')
- **Required**: Optional
- **Default**: asc
- **Description**: Sort results in ascending or descending release date order.
### include_release_dates_with_no_data
- **Type**: string ('true', 'false')
- **Required**: Optional
- **Default**: false
- **Description**: Determines whether release dates with no data available are returned. Setting to 'false' excludes release dates that do not have data, including future release dates.
```