get_observations
Retrieve FRED series observations as date/value pairs with optional filters for date range, units, aggregation, sort, and limit. Also supports ALFRED vintage data for point-in-time views.
Instructions
Fetch a FRED series' observations (date/value pairs, each with its ALFRED real-time period). Supports an optional date range, a units transform, aggregation to a lower frequency, sort order, and a result limit. For point-in-time/vintage (ALFRED) data, set realtime_start/realtime_end (both together; same date = the series as known on that day) and/or vintage_dates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Latest observation date, `YYYY-MM-DD`. | |
| sort | No | Sort order by date. | |
| limit | No | Maximum number of observations to return. | |
| start | No | Earliest observation date, `YYYY-MM-DD`. | |
| units | No | Units transformation to apply. | |
| frequency | No | Frequency to aggregate observations down to. FRED can only aggregate to a frequency **coarser than** the series' native one (e.g. a monthly series to quarterly or annual, never a coarser series to a finer one); asking for a finer or invalid frequency returns a FRED 400. | |
| series_id | Yes | The FRED series id, e.g. `GNPCA` or `UNRATE`. | |
| aggregation | No | Aggregation method — how observations are combined when aggregating to `frequency`. Requires `frequency`; supplying it without `frequency` is rejected (an invalid-params error), not silently ignored. | |
| realtime_end | No | ALFRED: end of the real-time period, `YYYY-MM-DD`. Must be given together with `realtime_start`. | |
| vintage_dates | No | ALFRED: specific revision dates to fetch, each `YYYY-MM-DD`. Each date selects that vintage of the series. | |
| realtime_start | No | ALFRED: start of the real-time period, `YYYY-MM-DD` — the data as it was known then. Use the same value for `realtime_end` to snapshot the series as of one day (point-in-time). Must be given together with `realtime_end`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | The number of observations returned. | |
| series_id | Yes | The series the observations belong to. | |
| observations | Yes | The observations, in the requested sort order. |