Get schema details
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/data/query/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/data/query/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cdp.coinbase.com/platform/v2/data/query/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.cdp.coinbase.com/platform/v2/data/query/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.cdp.coinbase.com/platform/v2/data/query/schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.cdp.coinbase.com/platform/v2/data/query/schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/data/query/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tables": [
{
"database": "base",
"table": "events",
"columns": [
{
"name": "event_signature",
"type": "String",
"nullable": false,
"description": "The signature of the decoded event log.",
"indexOrder": 0
}
]
}
]
}{
"errorType": "unauthorized",
"errorMessage": "The request is not properly authenticated."
}{
"errorType": "internal_server_error",
"errorMessage": "An internal server error occurred. Please try again later."
}SQL API
Get schema details
Retrieve the schema information for the available tables in the SQL API’s indexed data.
This includes table names, column definitions, data types, and indexed fields.
GET
/
v2
/
data
/
query
/
schema
Get schema details
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/data/query/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/data/query/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cdp.coinbase.com/platform/v2/data/query/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.cdp.coinbase.com/platform/v2/data/query/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.cdp.coinbase.com/platform/v2/data/query/schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.cdp.coinbase.com/platform/v2/data/query/schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/data/query/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tables": [
{
"database": "base",
"table": "events",
"columns": [
{
"name": "event_signature",
"type": "String",
"nullable": false,
"description": "The signature of the decoded event log.",
"indexOrder": 0
}
]
}
]
}{
"errorType": "unauthorized",
"errorMessage": "The request is not properly authenticated."
}{
"errorType": "internal_server_error",
"errorMessage": "An internal server error occurred. Please try again later."
}Authorizations
A JWT signed using your CDP API Key Secret, encoded in base64. Refer to the Generate Bearer Token section of our Authentication docs for information on how to generate your Bearer Token.
Query Parameters
The name of the database to query. Defaults to "base" when not specified.
Available options:
base, base_sepolia, solana, hyperevm Get the schema for a specific table.
Response
Schema information retrieved successfully.
Schema information for available blockchain data tables.
List of available tables.
Show child attributes
Show child attributes
Example:
[
{
"database": "base",
"table": "events",
"columns": [
{
"name": "event_signature",
"type": "String",
"nullable": false,
"description": "The signature of the decoded event log.",
"indexOrder": 0
}
]
}
]
Was this page helpful?
⌘I