Skip to main content
This guide takes you through the core workflow of the REST API with curl. Replace the sample IDs with the IDs from your own responses.
API access is available on every plan. Catalog access and download volume depend on your plan. Creating datasets also requires a plan that lets you create assets. Otherwise the API returns 402. See pricing.
1

Get your API key

Open your settings. Next to API Key, click Show Key.Send the key as the HTTP Basic Auth username, with an empty password. The trailing colon tells curl that the password is empty.
2

Create a repository

Every dataset belongs to a repository.
The API returns 201:
3

Create a dataset

The API returns 201:
4

Initialize the columns

Before the first upload, tell Alphacast which column holds the date and which columns, with the date, identify each row.
You can instead send a manifest with your first upload. An upload to a new dataset with neither returns 400.
5

Upload a CSV file

Save this as gdp.csv:
Then upload it:
The API returns 201 with an upload process:
6

Wait for processing

Uploads are processed in the background. Check the process until status is Processed or Error.
If the status is Error, read statusDescription.
7

Download the data

The default format is CSV. Use -L because the API can answer with a redirect.
Choose another format with $format. Put the URL in single quotes so your shell does not expand $format.
To filter, select columns, or paginate, see Download data.

Next steps

Authentication

Send and protect your API key.

API reference

Conventions and endpoint groups.