Fetch historical observations (data points) for one or more FRED® series.
The obs command retrieves time-series data from the FRED API (or local cache via –from) and outputs it in a consistent, pipeline-friendly format. It supports date filtering, unit transformations, frequency aggregation, batching, and multiple output formats.
USAGE
reserve obs [subcommand]
Available Subcommands:
| get | Fetch observations for one or more series |
| latest | Show the most recent observation for one or more series |
reserve obs [subcommand] –help (for more details about a specific subcommand)
GET
reserve obs get <series1, series2>
Retrieve one or more series.
Usage:
reserve obs latest <SERIES_ID…>
Usage Examples
## Fetch a single series:
reserve obs get GDP
## Fetch multiple series:
reserve obs get GDP CPIAUCSL UNRATE
## Filter by date range:
reserve obs get CPIAUCSL --start 2020-01-01 --end 2024-12-31
## Retrieve from local cache
reserve obs get CPIAUCSL --from cache --format jsonl
## Limit observations:
reserve obs get GDP --limit 10
## Percent change from year ago:
reserve obs get UNRATE --units pc1
## Natural log:
reserve obs get GDP --units log
## Convert monthly to quarterly (average):
reserve obs get CPIAUCSL --freq quarterly --agg avg
## Convert to annual (end of period):
reserve obs get CPIAUCSL --freq annual --agg eop
## Write to CSV:
reserve obs get GDP CPIAUCSL --format csv --out data.csv
## JSONL (pipeline friendly):
reserve obs get GDP --format jsonl
## Markdown table:
reserve obs get GDP --format md
# Write to CSV
reserve obs get GDP CPIAUCSL --format csv --out data.csvLATEST
reserve obs latest
Show the most recent observation for one or more series.
Usage:
reserve obs latest <SERIES_ID…>
$ reserve obs latest GDP
$ reserve obs latest GDP CPIAUCSL UNRATESee Global Flags for additional options.