Skip to main content
Returns the column definitions for a dataset as a standalone array. Use this endpoint when you only need to inspect the schema — for example, to build a $select list for the download endpoint or to validate that a column name exists before referencing it in an OData filter. The full dataset metadata (description, source, date range) is available from GET /datasets/{id} instead.

Authentication

Authenticate using HTTP Basic Auth. Pass your API key as the username and leave the password empty. You must have at least Read permission on the dataset.

Request

Method: GET URL: https://api.alphacast.io/datasets/{dataset_id}/columns

Path parameters

dataset_id
integer
required
The numeric ID of the dataset whose columns you want to retrieve.

Response

Returns an array of column definition objects. Each object has the same shape as the entries in the columns array returned by GET /datasets/{id}.
id
integer
Unique column ID. Use this value with $select to reference columns reliably across renames.
name
string
Column display name.
dataType
string
Data type of the column. One of Date, String, or Decimal.
isEntity
boolean
When true, this column is a dimension or index column (e.g., Date, Country). When false, it is a value column.

Examples

curl -u YOUR_API_KEY: https://api.alphacast.io/datasets/123/columns
[
  { "id": 1, "name": "Date", "dataType": "Date", "isEntity": true },
  { "id": 2, "name": "Country", "dataType": "String", "isEntity": true },
  { "id": 3, "name": "GDP", "dataType": "Decimal", "isEntity": false },
  { "id": 4, "name": "Population", "dataType": "Decimal", "isEntity": false }
]

Error responses

StatusCause
401 UnauthorizedNo API key provided and the dataset is not publicly accessible.
403 ForbiddenYour account does not have read access to this dataset.
404 Not FoundNo dataset exists with the given ID.
To use a column with $select on the download endpoint, prefer the numeric id over the name — IDs are stable across column renames, so download links remain valid even if the schema is reorganised.