Skip to main content
When you have a provider slug and a series ID, you can fetch the series. To find IDs, search or browse the provider. Send your Alphacast API key with Basic Auth. If the provider needs its own key, save it first.

Fetch a series with GET

You can send provider parameters in the query string.
string
required
Provider slug.
string
required
Series ID. The format depends on the provider. Some IDs contain /. Keep those slashes in the URL.

Fetch a series with POST

Use this form to send provider parameters in a JSON body.
object
Provider parameters. See the parameters field of GET /providers/{slug}.
FRED parameters include units, frequency, observation_start, and observation_end. Parameters differ for each provider. Other examples:
Without your own BLS key, you are limited to 25 requests per day. You can save a key.

Response

string
The requested ID.
string
Series name.
object
Provider details, such as frequency or units. It includes total_observations.
object[]
Observations. They usually have date and value.
string[]
Extra key columns in each observation, if any.
The example is shortened. Large series can produce large responses. Use the provider’s date parameters to narrow the request.

Error responses

These errors use an error field.

FRED shortcut endpoints

If you work only with FRED, you can also use two shorter endpoints. Send your Alphacast API key with Basic Auth. These endpoints do not use your saved FRED key.

Search FRED

Returns an object with a results array of up to 10 matching FRED series. Each result has the fields that FRED provides, such as id, title, frequency, and units.

Download a FRED series

string
required
FRED series code, such as UNRATE or CPIAUCSL.
string
default:"csv"
csv, json, xlsx, or tsv. JSON has a schema and a data array.
integer
Return only the last N observations.
string
First date, as YYYY-MM-DD.
string
Last date, as YYYY-MM-DD. The default is today.
The data has a Date column and a column named after the series. Put the URL in single quotes so your shell does not expand $format and $top.