fred_get_series
Retrieve any FRED time series data by ID with support for data transformations, frequency changes, and custom date ranges.Overview
Thefred_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
The FRED series ID to retrieve data for.Popular IDs:
GDP: Gross Domestic ProductUNRATE: Unemployment RateCPIAUCSL: Consumer Price IndexDFF: Federal Funds RateSP500: S&P 500 Index
fred_search or fred_browse to discover series IDsStart date for observations in YYYY-MM-DD format.Examples:
2024-01-01: Start of 20242020-03-01: Beginning of pandemic period2008-09-01: Start of financial crisis
End date for observations in YYYY-MM-DD format.Examples:
2024-12-31: End of 20242023-12-31: Full year 2023
Maximum number of observations to return (1-100000).Usage:
- Small limits for recent data:
12for last year of monthly data - Large limits for historical analysis
Number of observations to skip from the beginning.
Sort order of observations by date.Options:
asc: Chronological order (oldest first)desc: Reverse chronological (newest first)
Data transformation to apply.Options:
lin: Levels (no transformation) - raw valueschg: Change from previous periodch1: Change from year agopch: Percent change from previous periodpc1: Percent change from year agopca: Compounded annual rate of changecch: Continuously compounded rate of changecca: Continuously compounded annual ratelog: Natural logarithm
pc1for year-over-year inflationpchfor month-over-month growthlogfor regression analysis
Frequency aggregation/conversion.Main options:
d: Dailyw: Weeklybw: Biweeklym: Monthlyq: Quarterlysa: Semiannuala: Annual
wef: Week Ending Fridayweth: Week Ending Thursdaywew: Week Ending Wednesdaywetu: Week Ending Tuesdaywem: Week Ending Mondaywesu: Week Ending Sundaywesa: Week Ending Saturday
Method for aggregating to lower frequencies.Options:
avg: Average over periodsum: Sum of values in periodeop: End of period value
avgfor interest rates, pricessumfor flows like GDP, saleseopfor stock prices, levels
Output format type.Options:
1: Time series observations2: Observations by vintage date3: Observations by release date4: Initial release only
Specific vintage date(s) in YYYY-MM-DD format.Usage:
- Single date:
2024-01-01 - Date range:
2024-01-01:2024-12-31
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
- Month-over-Month
- Quarter-over-Quarter
- Year-over-Year
- Annualized Rate
Frequency Conversions
- Daily to Monthly
- Monthly to Quarterly
- Monthly to Annual
- Daily to Weekly
Popular Series Reference
Key Economic Indicators
| Series ID | Description | Frequency | Common Transform |
|---|---|---|---|
| GDP | Nominal GDP | Quarterly | units: "pch" |
| GDPC1 | Real GDP | Quarterly | units: "pca" |
| UNRATE | Unemployment Rate | Monthly | None (already %) |
| PAYEMS | Nonfarm Payrolls | Monthly | units: "chg" |
| CPIAUCSL | CPI All Urban | Monthly | units: "pc1" |
| CPILFESL | Core CPI | Monthly | units: "pc1" |
| PCEPI | PCE Price Index | Monthly | units: "pc1" |
Interest Rates
| Series ID | Description | Frequency | Notes |
|---|---|---|---|
| DFF | Fed Funds Effective | Daily | Current policy rate |
| DGS10 | 10-Year Treasury | Daily | Long-term rate |
| DGS2 | 2-Year Treasury | Daily | Short-term rate |
| TB3MS | 3-Month T-Bill | Monthly | Risk-free rate |
| MORTGAGE30US | 30-Year Mortgage | Weekly | Consumer rate |
Market Indicators
| Series ID | Description | Frequency | Transform for Returns |
|---|---|---|---|
| SP500 | S&P 500 Index | Daily | units: "pch" |
| DJIA | Dow Jones | Daily | units: "pch" |
| NASDAQCOM | NASDAQ Composite | Daily | units: "pch" |
| VIXCLS | VIX Volatility | Daily | None |
| DEXUSEU | EUR/USD Exchange | Daily | units: "pch" |
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
Invalid series ID | Series doesn’t exist | Use fred_search to find correct ID |
No data in range | Date range has no data | Check series start/end dates |
Invalid transformation | Transform not applicable | Some transforms need positive values |
Frequency conversion error | Can’t convert to requested frequency | Check if conversion makes sense |
Validation Rules
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