📂

Dataset Schema

Retrieve the inferred schema and column metadata for a previously uploaded dataset.

GET /v1/datasets/{dataset_id}/schema
curl -X GET "https://analytics.toolkitapi.io/v1/datasets/dset_abc123/schema" \
  -H "X-API-Key: YOUR_API_KEY"
import httpx

resp = httpx.get(
    "https://analytics.toolkitapi.io/v1/datasets/dset_abc123/schema",
)
print(resp.json())
const resp = await fetch("https://analytics.toolkitapi.io/v1/datasets/dset_abc123/schema", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "dataset_id": "dset_abc123",
  "row_count": 1500,
  "columns": [
    {
      "name": "order_date",
      "dtype": "datetime64[ns]",
      "sample_values": ["2024-01-15", "2024-02-03", "2024-03-22"],
      "null_count": 0,
      "unique_count": 312
    },
    {
      "name": "revenue",
      "dtype": "float64",
      "sample_values": [149.99, 299.50, 89.00],
      "null_count": 3,
      "unique_count": 874
    },
    {
      "name": "region",
      "dtype": "object",
      "sample_values": ["North", "South", "East"],
      "null_count": 0,
      "unique_count": 4
    }
  ]
}

Description

Retrieve the inferred schema and column metadata for a previously uploaded dataset.

How to Use

1

1. Call `POST /v1/analyze` with your data source and receive a `dataset_id` in the response. 2. Use that `dataset_id` as the path parameter: `GET /v1/datasets/{dataset_id}/schema`. 3. Inspect the returned `columns` array to understand each field's name, inferred type, and data quality metrics. 4. Use column names and types to craft accurate queries with `POST /v1/query/{query_id}` or chart definitions with `POST /v1/visualize`.

About This Tool

The Dataset Schema endpoint returns the inferred column structure of a dataset you have previously uploaded via the `/v1/analyze` endpoint. Use it to inspect column names, data types, null counts, unique value counts, and representative sample values before writing queries or building visualisations.

This is especially useful when you upload data programmatically and need to confirm how the engine has interpreted each column's type before proceeding to the query or visualize steps.

Why Use This Tool

Start using Dataset Schema now

Get your free API key and make your first request in under a minute.