Skip to main content

fred_get_series

Retrieve any FRED time series data by ID with support for data transformations, frequency changes, and custom date ranges.

Overview

The fred_get_series tool is your primary interface for accessing actual economic data. It supports:
  • Retrieving observations for any of the 800,000+ series
  • Applying mathematical transformations (growth rates, percent changes)
  • Converting between frequencies (daily to monthly, monthly to quarterly)
  • Custom date ranges and vintage data
  • Multiple aggregation methods

Parameters

string
required
The FRED series ID to retrieve data for.Popular IDs:
  • GDP: Gross Domestic Product
  • UNRATE: Unemployment Rate
  • CPIAUCSL: Consumer Price Index
  • DFF: Federal Funds Rate
  • SP500: S&P 500 Index
Finding IDs: Use fred_search or fred_browse to discover series IDs
string
Start date for observations in YYYY-MM-DD format.Examples:
  • 2024-01-01: Start of 2024
  • 2020-03-01: Beginning of pandemic period
  • 2008-09-01: Start of financial crisis
Default: Series start date
string
End date for observations in YYYY-MM-DD format.Examples:
  • 2024-12-31: End of 2024
  • 2023-12-31: Full year 2023
Default: Most recent available data
number
default:"100000"
Maximum number of observations to return (1-100000).Usage:
  • Small limits for recent data: 12 for last year of monthly data
  • Large limits for historical analysis
number
default:"0"
Number of observations to skip from the beginning.
string
default:"asc"
Sort order of observations by date.Options:
  • asc: Chronological order (oldest first)
  • desc: Reverse chronological (newest first)
string
default:"lin"
Data transformation to apply.Options:
  • lin: Levels (no transformation) - raw values
  • chg: Change from previous period
  • ch1: Change from year ago
  • pch: Percent change from previous period
  • pc1: Percent change from year ago
  • pca: Compounded annual rate of change
  • cch: Continuously compounded rate of change
  • cca: Continuously compounded annual rate
  • log: Natural logarithm
Common uses:
  • pc1 for year-over-year inflation
  • pch for month-over-month growth
  • log for regression analysis
string
Frequency aggregation/conversion.Main options:
  • d: Daily
  • w: Weekly
  • bw: Biweekly
  • m: Monthly
  • q: Quarterly
  • sa: Semiannual
  • a: Annual
Weekly variants:
  • wef: Week Ending Friday
  • weth: Week Ending Thursday
  • wew: Week Ending Wednesday
  • wetu: Week Ending Tuesday
  • wem: Week Ending Monday
  • wesu: Week Ending Sunday
  • wesa: Week Ending Saturday
Default: Native series frequency
string
default:"avg"
Method for aggregating to lower frequencies.Options:
  • avg: Average over period
  • sum: Sum of values in period
  • eop: End of period value
Usage examples:
  • avg for interest rates, prices
  • sum for flows like GDP, sales
  • eop for stock prices, levels
number
default:"1"
Output format type.Options:
  • 1: Time series observations
  • 2: Observations by vintage date
  • 3: Observations by release date
  • 4: Initial release only
Note: Types 2-4 for vintage analysis
string
Specific vintage date(s) in YYYY-MM-DD format.Usage:
  • Single date: 2024-01-01
  • Date range: 2024-01-01:2024-12-31
Purpose: Retrieve data as it existed on specific dates

Examples

Basic Series Retrieval

Year-over-Year Inflation

Quarterly GDP Growth

Convert Daily to Monthly

Common Use Cases

Economic Dashboard

Historical Analysis

Financial Market Indicators

Transformation Examples

Growth Rate Calculations

Returns absolute change from previous month

Frequency Conversions

Average daily values into monthly

Key Economic Indicators

Interest Rates

Market Indicators

Error Handling

Common Errors

Validation Rules

Important constraints:
  • Dates must be in YYYY-MM-DD format
  • observation_start must be ≤ observation_end
  • Some transformations require positive values
  • Not all frequency conversions are valid

Best Practices

1

Know Your Data

Check series metadata (frequency, units, seasonal adjustment) before retrieval
2

Use Appropriate Transforms

Match transformation to analysis needs (growth rates for trends, logs for regression)
3

Consider Frequency

Align data frequencies when comparing multiple series
4

Handle Missing Data

Some series have gaps; check for null values in observations
5

Plan Queries Carefully

Think through data needs to minimize redundant requests

fred_search

Find series IDs to retrieve

fred_browse

Explore available categories