FRED · Series observations
fred/series/observationsGet market and financial data with FRED · Series observations from Alexandria through one Spiral API key. The only capability in this provider that returns numbers; everything else exists to find the id it takes. Two independent time axes: observation_start/observation_end bound when the economy did the thing, realtime_start/realtime_end bound when FRED knew it. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.001746 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
series_id required | text | — | The series to read, for example GNPCA or UNRATE. Find one with |
limit | number … to 100000 | 100000 | Observations to return. |
units | one of lin, chg, ch1, pch, pc1, pca, cch, cca, log | lin | Value transformation: lin levels, chg change, ch1 change from a year ago, pch percent change, pc1 percent change from a year ago, pca compounded annual rate of change, cch continuously compounded rate of change, cca continuously compounded annual rate of change, log natural log. |
offset | number | 0 | Observations to skip. |
frequency | one of d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem | — | Aggregate down to a lower frequency. Asking for a frequency higher than the series' native one is an error rather than a no-op, and asking for the native one does nothing. Omit for no aggregation. |
sort_order | one of asc, desc | asc | Sort by observation date. |
output_type | one of 1, 2, 3, 4 | 1 | 1 observations by real-time period, 2 all observations by vintage date, 3 new and revised observations only, 4 initial release only. The fields described below are the shape of output_type 1; 2 and 3 replace the record entirely with one column per vintage date. |
realtime_end | text | — | End of the real-time period, YYYY-MM-DD. Defaults to today. |
vintage_dates | text | — | Comma-separated YYYY-MM-DD dates to read the data as it stood on, instead of a real-time period. Capped server-side by output type - roughly 2000 dates for json, far fewer for output_type 2 on a daily series. |
realtime_start | text | — | Start of the real-time period, YYYY-MM-DD. Defaults to today, meaning the current vintage. |
observation_end | text | 9999-12-31 | Latest observation date to return, YYYY-MM-DD. |
observation_start | text | 1776-07-04 | Earliest observation date to return, YYYY-MM-DD. When the economy did the thing - not to be confused with |
aggregation_method | one of avg, sum, eop | avg | How |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "fred/series/observations",
"input": {
"series_id": "<series_id>"
}
}'Frequently asked questions
How much does FRED · Series observations cost?
$0.001746 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use FRED · Series observations through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "fred/series/observations"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use FRED · Series observations?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use FRED · Series observations?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.