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
Provider slug. Examples:
fred, bls, worldbank, bcra, banxico.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.The series identifier that was requested.
Descriptive name of the series as provided by the upstream source. Example:
"Unemployment Rate".Provider-specific metadata about the series. Contents vary by provider but may include frequency, units, seasonal adjustment, source, and notes.
Array of data points, most recent ~24 observations. Each item has:
Always
true for this endpoint. Indicates the data array is truncated to the most recent observations.Present when the provider requires an upstream API key. Always
true in that case.Present when
api_key_required is true. Whether you have a stored key for this provider.Present when
api_key_required is true. Instructions for obtaining and saving an API key.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 parametersProvider slug.
Series identifier.
Provider-specific parameters. The available keys depend on the provider — consult the
parameters array in GET /providers/{slug} for valid options.Common examples:| Provider | Parameter key | Example value |
|---|---|---|
| FRED | units | "pc1" (% change from year ago) |
| FRED | frequency | "q" (quarterly) |
| BLS | startyear | 2010 |
| BLS | endyear | 2024 |
| World Bank | country | "BR" |
| World Bank | date_range | "2000:2024" |
Always
false. The data array contains the complete historical series.The requested series ID.
Descriptive name of the series.
Provider-specific metadata.
Complete array of all available observations, each with
date (string, YYYY-MM-DD) and value (number or null).Complete workflow example
The following example shows the full sequence: match a provider, search for a series, preview it, then fetch the complete history.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 parametersSearch term to look up in FRED. URL-encode spaces as
%20 or +.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
FRED series symbol. Examples:
GDP, UNRATE, CPIAUCSL, FEDFUNDS, DGS10.Output format. Accepted values:
json, csv, xlsx, tsv.Limit the number of rows returned. Omit to return all available data.
Start date filter in
YYYY-MM-DD format.End date filter in
YYYY-MM-DD format.Error responses
All endpoints return a JSON error object with anerror field when a request fails.
| Status | Meaning |
|---|---|
400 | The provider does not support the requested operation (e.g., browse on a non-hierarchical provider). |
404 | Provider slug or series ID not found. |
501 | The connector does not implement this operation. |
502 | The upstream provider returned an error. Check the error message for details. |