Skip to main content
GET
/
v1
/
datasets
/
{table}
/
schema
Get schema
curl --request GET \
  --url https://api.trydatadriver.com/v1/datasets/{table}/schema
import requests

url = "https://api.trydatadriver.com/v1/datasets/{table}/schema"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.trydatadriver.com/v1/datasets/{table}/schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trydatadriver.com/v1/datasets/{table}/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.trydatadriver.com/v1/datasets/{table}/schema"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.trydatadriver.com/v1/datasets/{table}/schema")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.trydatadriver.com/v1/datasets/{table}/schema")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body

When you’d use this

Before searching or exporting. The schema tells you what fields exist (e.g. first_name, state, age) and how you can filter each one. This is also how you build dynamic filter UIs.

Path parameters

NameTypeDescription
tablestring (required)The table name from GET /v1/datasets — usually leads.

Request

curl https://api.trydatadriver.com/v1/datasets/leads/schema \
  -H "Authorization: Bearer dd_a3f9b2c1d4e5f6g7h8i9j0"

Response

{
  "table": "leads",
  "version": "2026.05.09",
  "columns": [
    {
      "name": "first_name",
      "type": "text",
      "nullable": true,
      "operators": ["eq", "in", "ilike", "is_null"]
    },
    {
      "name": "state",
      "type": "text",
      "nullable": true,
      "operators": ["eq", "in", "not_in"],
      "enum": ["AL","AK","AZ","AR","CA"]
    },
    {
      "name": "age",
      "type": "int",
      "nullable": true,
      "operators": ["eq","gt","gte","lt","lte","between"]
    },
    {
      "name": "income_range",
      "type": "enum_text",
      "nullable": true,
      "operators": ["eq","in","gte","lte"],
      "ordered_values": [
        "less than $20,000",
        "$20,000 to $44,999",
        "$45,000 to $59,999",
        "$60,000 to $74,999"
      ]
    }
  ]
}

Field reference

FieldMeaning
nameThe column name. Use this in your filter object as the key.
typeData type: text, int, timestamptz, uuid, bool, enum_text.
nullabletrue = the column can be empty for some rows.
operatorsWhich filter operators work on this column. See Filter operators.
enumOptional. For columns with a fixed set of valid values.
ordered_valuesOptional. For columns where order matters but values are text.
Pro move. Cache the schema response by version. When the version changes, refresh — it means we added or modified columns.
PII columns. If you don’t have the pii_restricted scope on your key, columns marked as restricted (like personal_email, phone) won’t appear in the schema at all.