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

series_id
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
observation_start
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
observation_end
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
limit
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
offset
number
default:"0"
Number of observations to skip from the beginning.
sort_order
string
default:"asc"
Sort order of observations by date.Options:
  • asc: Chronological order (oldest first)
  • desc: Reverse chronological (newest first)
units
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
frequency
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
aggregation_method
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
output_type
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
vintage_dates
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

Series IDDescriptionFrequencyCommon Transform
GDPNominal GDPQuarterlyunits: "pch"
GDPC1Real GDPQuarterlyunits: "pca"
UNRATEUnemployment RateMonthlyNone (already %)
PAYEMSNonfarm PayrollsMonthlyunits: "chg"
CPIAUCSLCPI All UrbanMonthlyunits: "pc1"
CPILFESLCore CPIMonthlyunits: "pc1"
PCEPIPCE Price IndexMonthlyunits: "pc1"

Interest Rates

Series IDDescriptionFrequencyNotes
DFFFed Funds EffectiveDailyCurrent policy rate
DGS1010-Year TreasuryDailyLong-term rate
DGS22-Year TreasuryDailyShort-term rate
TB3MS3-Month T-BillMonthlyRisk-free rate
MORTGAGE30US30-Year MortgageWeeklyConsumer rate

Market Indicators

Series IDDescriptionFrequencyTransform for Returns
SP500S&P 500 IndexDailyunits: "pch"
DJIADow JonesDailyunits: "pch"
NASDAQCOMNASDAQ CompositeDailyunits: "pch"
VIXCLSVIX VolatilityDailyNone
DEXUSEUEUR/USD ExchangeDailyunits: "pch"

Error Handling

Common Errors

ErrorCauseSolution
Invalid series IDSeries doesn’t existUse fred_search to find correct ID
No data in rangeDate range has no dataCheck series start/end dates
Invalid transformationTransform not applicableSome transforms need positive values
Frequency conversion errorCan’t convert to requested frequencyCheck if conversion makes sense

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