fredrs
Description
The fredrs function creates an object that represents a
connection to the Federal Reserve Economic Data (FRED®) server by using a representational state transfer (REST) API. This programmatic
interface allows you to access economic time series data provided by the St. Louis Federal
Reserve that is widely used in modeling applications by central banks and educational
institutions. After you create a fredrs object, you can retrieve historical
time series, such as gross domestic product (GDP), consumer price index (CPI), and various
economic rates such as inflation, interest, and exchange rates. The API also enables you to
search for time series, retrieve metadata, and query structures such as categories, releases,
and tags.
Creation
Description
creates a connection to the FRED REST server that allows you to access data by using an
c = fredrs(APIkey)APIKey provided by the St. Louis Federal Reserve. For more
information, see the Federal Reserve
Bank of St. Louis website.
additionally sets the timeout value, the FRED base endpoint URL, the REST API call media type, and the MATLAB® HTTP library debug value for the connection to the FRED server.c = fredrs(APIkey,timeout,url,mediatype,debugmodevalue)
Input Arguments
Properties
Object Functions
Examples
Version History
Introduced in R2026a