Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

FRED (Federal Reserve Economic Data) is an online database of economic data provided by the Federal Reserve Bank of St. Louis. Its API is an HTTPS web service for retrieving selected data from FRED and its archival counterpart, ALFRED, in structured formats. Use API version 1 for targeted, series-level requests; use version 2 when you need observations in bulk across a release. Both require an API key, and historical values may differ from today’s data because economic series can be revised.

What FRED and the FRED API are

FRED is a database of economic data maintained by the Federal Reserve Bank of St. Louis. ALFRED—the Archival Federal Reserve Economic Data database—preserves historical data vintages. The FRED API overview describes querying both databases to retrieve data according to source, release, category, series, and other preferences.

The API uses a request-and-response model: a program sends an HTTPS request to a documented endpoint, supplies authentication and query options, then parses the structured response. It is not tied to a particular programming language; a language that can make HTTPS requests and parse the returned formats can use it.

Choose API v1 or v2 based on the retrieval task

Version Best suited to Retrieval scope Relevant handling
v1 Finding a series, inspecting its metadata, or retrieving selected series data Incremental, series-level requests Includes endpoints for search, series metadata and observations, releases, categories, tags, and vintage dates. Observation responses can be XML, JSON, Excel, or zipped CSV.
v2 Collecting observations across a release Bulk retrieval for all series in a release, including the entire history Responses may require cursor pagination. Per-series update timestamps help identify data updated during retrieval.

These versions serve different jobs rather than representing a simple old-versus-new choice. The official endpoint documentation lists their capabilities and current parameters.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Get an API key and authenticate correctly

FRED API requests require a key. Sign in to a FRED account to obtain or manage one. Authentication differs between versions, so put the key where the documentation for your chosen version requires it.

  • v1: Pass the 32-character lowercase alphanumeric key as the api_key query parameter. The API key instructions recommend a distinct key for each application; people using an application are expected to use their own key.
  • v2: Send the key in the HTTP authorization header using the Bearer form, as shown in the v2 documentation. Its example key is for demonstration only.

Keep real keys out of public code, shared examples, and client-side applications where they can be exposed. Store them securely and follow the current instructions for the API version you use.

Retrieve observations for a series with v1

A common v1 task is requesting observations for a known series. The request needs the series identifier and API key; optional parameters can narrow the date range or select a vintage date. XML is the documented default, and file_type can select JSON, Excel, or zipped CSV instead. Check the series observations endpoint documentation for current parameters and response details.

For example, the request structure is:

https://api.stlouisfed.org/fred/series/observations?series_id=SERIES_ID&api_key=YOUR_API_KEY&file_type=json

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Replace SERIES_ID and YOUR_API_KEY with the actual series identifier and your own key. Add documented date or vintage parameters only when needed.

Retrieve a release in bulk with v2

Use v2 when your program needs observations for all series in a release rather than separate, targeted series requests. The endpoint can return a large result in pages. Follow the returned next_cursor to request each subsequent page; continue until the response indicates there are no more pages. The v2 documentation describes the release-observations request and its pagination.

Release data can be updating while you retrieve it. One request may include some series that have already been updated and others that have not. Check each series’ last_updated timestamp. If an update occurred during the retrieval, the documentation recommends reprocessing all requests for that release so the collected data reflects a consistent update state.

Use vintage dates when revisions matter

Economic observations can be revised after their initial release. A current request may therefore return values that differ from those available at an earlier point in time. With v1, use a documented vintage-date option to examine values as of a historical date; this is useful for revision analysis or for reproducing what was known at a particular time. The observations endpoint documentation explains its date and vintage options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
The Psychology of Money: Timeless lessons on wealth, greed, and happiness
  • Ideal for Gifting
  • Ideal for a bookworm
  • Compact for travelling

When comparing historical values, identify the series and the vintage date used. A historical vintage represents the data available as of that date, not necessarily the value shown in a current, unqualified series download.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check reuse terms and attribution before publishing data

Access through FRED does not necessarily grant permission to republish or commercially reuse every series. Some series may be owned by third parties. The FRED API terms make users responsible for complying with the data owner’s restrictions and say to contact the owner for permission before using third-party-owned data for anything beyond personal use. Check the notes and terms attached to each series before reuse.

Applications built for other users must prominently display this notice: “This product uses the FRED® API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.” The terms also require a link to the API terms and a statement that application users agree to those terms. Do not imply that the Federal Reserve Bank of St. Louis endorses or certifies your application.

Quick Recap

SaleBestseller No. 5
The Psychology of Money: Timeless lessons on wealth, greed, and happiness
The Psychology of Money: Timeless lessons on wealth, greed, and happiness
Ideal for Gifting; Ideal for a bookworm; Compact for travelling
$10.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.