FRED Federal Reserve Economic Data Scraper avatar

FRED Federal Reserve Economic Data Scraper

Pricing

from $1.50 / 1,000 results

Go to Apify Store
FRED Federal Reserve Economic Data Scraper

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.

Pricing

from $1.50 / 1,000 results

Rating

0.0

(0)

Developer

cloud9

cloud9

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 hours ago

Last modified

Categories

Share

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.

ParameterTypeRequiredDefaultDescription
modestringNo"getObservations"Operation mode: search series, get observations, or get series metadata Allowed: searchSeries, getObservations, getSeriesInfo.
apiKeystringNoFRED API key (free from api.stlouisfed.org/api_key_registration.html)
querystringNo"GDP"Search text for series search (used in searchSeries mode)
seriesIdstringNo"GDP"FRED series ID (e.g., GDP, UNRATE, CPIAUCSL) — required for getObservations and getSeriesInfo modes
maxResultsintegerNo100Maximum 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):

FieldType
datestring — observation date (getObservations mode)
valuestring — observation value (getObservations mode)
idstring — series ID (searchSeries / getSeriesInfo modes)
titlestring — series title (searchSeries / getSeriesInfo modes)
frequencystring — e.g. Quarterly, Monthly
unitsstring — e.g. Billions of Dollars
seasonal_adjustmentstring
last_updatedstring
realtime_startstring
realtime_endstring

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 ApifyClient
client = 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 APIPOST 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.
  • maxResults caps 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