Skip to main content
Once you have found a series ID — through browsing, searching, or the popular series list — you can fetch its data in two steps: a lightweight preview that returns the most recent data points, followed by a full historical fetch. For FRED series, a dedicated shortcut endpoint is also available that bypasses the provider slug workflow.

Authentication

All endpoints use HTTP Basic Auth. Pass your Alphacast API key as the username with an empty password.
For providers that require an upstream API key (such as FRED or INEGI), save your key via PUT /user-keys/{slug} first. Alphacast applies it automatically on every series request.

Provider series endpoints

GET /providers//series/

Returns a preview of the series: the last ~24 data points, the series label, and metadata. The response always includes "is_preview": true to signal that the data is truncated. Use this endpoint to confirm you have the right series before fetching the full history. Path parameters
string
required
Provider slug. Examples: fred, bls, worldbank, bcra, banxico.
string
required
The series identifier as recognized by the upstream provider. Format varies by provider — for example, UNRATE for FRED, CUUR0000SA0 for BLS, or NY.GDP.PCAP.CD for World Bank.Some providers — notably SDMX-style sources (UNICEF, ECB, INSEE, BOI, FAOSTAT, Norges Bank) — use hierarchical IDs that contain forward slashes, such as IMF/IFS/Q.US.NGDP_XDC. Alphacast accepts these in the URL as-is; you do not need to URL-encode the / characters.
Response fields
string
required
The series identifier that was requested.
string
required
Descriptive name of the series as provided by the upstream source. Example: "Unemployment Rate".
object
required
Provider-specific metadata about the series. Contents vary by provider but may include frequency, units, seasonal adjustment, source, and notes.
object[]
required
Array of data points, most recent ~24 observations. Each item has:
boolean
required
Always true for this endpoint. Indicates the data array is truncated to the most recent observations.
boolean
Present when the provider requires an upstream API key. Always true in that case.
boolean
Present when api_key_required is true. Whether you have a stored key for this provider.
string
Present when api_key_required is true. Instructions for obtaining and saving an API key.
Example response
Handling api_key_required When a provider needs an upstream key and you have not stored one, the preview still returns recent data where possible, but includes the key status fields:
Store your key with PUT /user-keys/fred to remove the restriction.

POST /providers//series//data

Returns the full historical time series. This endpoint accepts provider-specific parameters in the request body to control units, frequency, date ranges, and other transformations. Path parameters
string
required
Provider slug.
string
required
Series identifier.
Request body
object
default:"{}"
Provider-specific parameters. The available keys depend on the provider — consult the parameters array in GET /providers/{slug} for valid options.Common examples:
Response fields The response has the same structure as the preview endpoint, with one difference:
boolean
required
Always false. The data array contains the complete historical series.
string
required
The requested series ID.
string
required
Descriptive name of the series.
object
required
Provider-specific metadata.
object[]
required
Complete array of all available observations, each with date (string, YYYY-MM-DD) and value (number or null).
Example response

Complete workflow example

The following example shows the full sequence: match a provider, search for a series, preview it, then fetch the complete history.
1

Find the right provider

2

Search for a series within the provider

Note the id from the results — for example, FEDFUNDS.
3

Preview the series

Check that label and metadata match what you expect. Confirm is_preview: true.
4

Fetch the full history

The response contains the complete monthly series with is_preview: false.

FRED direct endpoints

These endpoints provide a streamlined interface to FRED without the provider slug workflow. They are useful when you already know your FRED symbol.

GET /fred/search/

Searches FRED for series matching the query string and returns matching symbols and descriptions. Path parameters
string
required
Search term to look up in FRED. URL-encode spaces as %20 or +.
Response

GET /fred//data

Fetches time-series data for a FRED symbol directly. Returns data as CSV by default; use $format=json for a JSON response. Path parameters
string
required
FRED series symbol. Examples: GDP, UNRATE, CPIAUCSL, FEDFUNDS, DGS10.
Query parameters
string
default:"csv"
Output format. Accepted values: json, csv, xlsx, tsv.
number
Limit the number of rows returned. Omit to return all available data.
string
Start date filter in YYYY-MM-DD format.
string
End date filter in YYYY-MM-DD format.

Error responses

All endpoints return a JSON error object with an error field when a request fails.