FRED Federal Reserve Economic Data Scraper
Pricing
from $1.50 / 1,000 results
FRED Federal Reserve Economic Data Scraper
Extract US economic data from FRED. Access 800,000+ time series - GDP, unemployment, CPI, interest rates. Search series, get historical observations, or retrieve series metadata. Free API key from fred.stlouisfed.org required.
Extract US economic data from FRED. Access 800,000+ time series - GDP, unemployment, CPI, interest rates. Search series, get historical observations, or retrieve series metadata. Free API key from fred.stlouisfed.org required.
Use cases
- Pull GDP, CPI, or unemployment series into a macro dashboard
- Backtest a model against historical US economic indicators
- Automate monthly economic reporting
- Discover the right FRED series ID by keyword search
- Correlate business metrics with macro conditions
Input
You need your own free FRED key. Get one at https://fred.stlouisfed.org/docs/api/api_key.html — it takes a minute and costs nothing. Without it the Actor cannot fetch data.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mode | string | No | "getObservations" | Operation mode: search series, get observations, or get series metadata Allowed: searchSeries, getObservations, getSeriesInfo. |
apiKey | string | No | — | FRED API key (free from api.stlouisfed.org/api_key_registration.html) |
query | string | No | "GDP" | Search text for series search (used in searchSeries mode) |
seriesId | string | No | "GDP" | FRED series ID (e.g., GDP, UNRATE, CPIAUCSL) — required for getObservations and getSeriesInfo modes |
maxResults | integer | No | 100 | Maximum number of results to return (1–100000) |
Example input
{"mode": "getObservations","query": "GDP","seriesId": "GDP","maxResults": 10,"apiKey": "YOUR_API_KEY"}
Output
Each dataset item has the following shape (fields vary by mode):
| Field | Type |
|---|---|
date | string — observation date (getObservations mode) |
value | string — observation value (getObservations mode) |
id | string — series ID (searchSeries / getSeriesInfo modes) |
title | string — series title (searchSeries / getSeriesInfo modes) |
frequency | string — e.g. Quarterly, Monthly |
units | string — e.g. Billions of Dollars |
seasonal_adjustment | string |
last_updated | string |
realtime_start | string |
realtime_end | string |
Results are exportable from Apify Console or the API as JSON, CSV, Excel, or XML.
How to run it
In Apify Console — open the Actor, fill in the input form, click Start, then download the results from the Dataset tab.
With the JavaScript client
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('cloud9_ai/fred-scraper').call({"mode": "getObservations","query": "GDP","seriesId": "GDP","maxResults": 10,"apiKey": "YOUR_API_KEY"});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
With the Python client
from apify_client import ApifyClientclient = ApifyClient('YOUR_APIFY_TOKEN')run = client.actor('cloud9_ai/fred-scraper').call(run_input={"mode": "getObservations","query": "GDP","seriesId": "GDP","maxResults": 10,"apiKey": "YOUR_API_KEY"})for item in client.dataset(run['defaultDatasetId']).iterate_items():print(item)
With the API — POST https://api.apify.com/v2/acts/cloud9_ai~fred-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN with the input JSON as the body.
Notes and limits
- Bring your own FRED key (free — https://fred.stlouisfed.org/docs/api/api_key.html). It is a secret input, so it is not written to the dataset or the log.
maxResultscaps how much a single run collects, which is also what caps the run's cost.- Requests are paced and failed requests are retried automatically, so runs stay inside the source's rate limits.
- Only publicly available data is collected. How you use the output is your responsibility, including the source's terms of use and any applicable data-protection law.
Support
Found a bug, or need a field that isn't in the output? Open an issue on the Issues tab of this Actor in Apify Console. Issues there are read and answered.
License
Apache-2.0