Get economic data series (FRED)
macro_get_seriesRetrieve US and global economic time series from FRED: interest rates, inflation, GDP, employment, and more. Align up to five series by date and apply transforms like year-over-year percent change.
Instructions
Get US and global economic time series from FRED (Federal Reserve Bank of St. Louis, 800,000+ series): interest rates, inflation, GDP, jobs, money supply, credit spreads, FX, commodities, recession indicators. Pass 1-5 series IDs to line them up by date. Common IDs: DGS10 / DGS2 (Treasury yields), T10Y2Y (yield curve), FEDFUNDS, CPIAUCSL / CPILFESL (CPI / core), PCEPILFE (core PCE), UNRATE, PAYEMS, GDPC1 (real GDP), A191RL1Q225SBEA (GDP growth), M2SL, BAMLH0A0HYM2 (high-yield spread), VIXCLS, DCOILWTICO (oil), DEXUSEU / DEXMXUS (FX), USREC. Use transform 'pct_change_yoy' for inflation rates from price indexes, and frequency to aggregate daily data (e.g. monthly averages). Find other IDs with macro_search_series.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | Last observation date. Default: latest (YYYY-MM-DD). | |
| frequency | No | Aggregate to a lower frequency: 'weekly', 'monthly', 'quarterly', 'annual'. | |
| transform | No | 'level' (default), 'change', 'change_yoy', 'pct_change', 'pct_change_yoy', 'pct_change_annualized' or 'log'. | level |
| max_points | No | Rows in the table (default 30, evenly sampled; the latest value is always included). | |
| series_ids | Yes | FRED series IDs, e.g. ['DGS10','DGS2'] or ['CPIAUCSL']. | |
| start_date | No | First observation date. Default: 10 years ago (YYYY-MM-DD). | |
| aggregation | No | How to aggregate when `frequency` is set: average (default), sum or end of period. | avg |
| response_format | No | Output format: 'markdown' (readable, default) or 'json' (structured). | markdown |