The fetch command retrieves data from FRED® and, when used with –store, persists both observations and metadata to RESERVE’s local cache. This enables fast, repeatable access to economic data without repeated API calls, making it ideal for building reliable, offline-friendly workflows.
Examples:
- series — fetch one or more time series
- query — search and fetch results in one step
- category — fetch category data
USAGE
reserve fetch [subcommand]
Available Subcommands:
| series | Fetch one or more series and optionally store locally |
| query | Search and fetch series by keyword |
| category | Fetch category data |
reserve fetch [subcommand] –help (for more details about a specific subcommand)
SERIES
Fetch one or more series from FRED.
Optionally persist results to the local cache for reuse.
Usage: reserve fetch series <SERIES_ID…> [–store]
# Fetch a single series
reserve fetch series CPIAUCSL
# Fetch multiple series
reserve fetch series CPIAUCSL UNRATE GDP
# Fetch observations with a data range
reserve fetch series CPIAUCSL --with-obs --start 2020-01-01
# Fetch meta-data and observations
reserve fetch series CPIAUCSL --with-meta --with-obs
# Fetch and store locally
reserve fetch series CPIAUCSL --store
# Export to CSV
reserve fetch series CPIAUCSL --with-obs --format csv --out data.csvQUERY
Search and fetch series in a single step.
Useful when the series ID is not known in advance.
Usage: reserve fetch query “” [–limit N]
# Search and fetch a series
reserve fetch query “inflation”
# Limit results
reserve fetch query “inflation” –limit 10
CATEGORY
Fetch data for a specific category.
Usage: reserve fetch category <CATEGORY_ID>
# Fetch a category
reserve fetch category 125WORKFLOW
# Search for a topic
reserve search “inflation”
# Fetch a series and store locally
reserve fetch series CPIAUCSL --store
# Retrieve from local store for analysis
reserve obs get CPIAUCSL --from cache --format jsonl
See Global Flags for additional global options available for this command.