Run a SQL search
curl --request POST \
--url https://api.withsplendor.com/v1/sql/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"cursor": "<string>",
"dataset_scope": "selected",
"datasets": [
"<string>"
],
"limit": 100,
"sql": "<string>",
"view_id": "<string>"
}
'import requests
url = "https://api.withsplendor.com/v1/sql/search"
payload = {
"cursor": "<string>",
"dataset_scope": "selected",
"datasets": ["<string>"],
"limit": 100,
"sql": "<string>",
"view_id": "<string>"
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cursor: '<string>',
dataset_scope: 'selected',
datasets: ['<string>'],
limit: 100,
sql: '<string>',
view_id: '<string>'
})
};
fetch('https://api.withsplendor.com/v1/sql/search', 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.withsplendor.com/v1/sql/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cursor' => '<string>',
'dataset_scope' => 'selected',
'datasets' => [
'<string>'
],
'limit' => 100,
'sql' => '<string>',
'view_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withsplendor.com/v1/sql/search"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"<string>\"\n ],\n \"limit\": 100,\n \"sql\": \"<string>\",\n \"view_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withsplendor.com/v1/sql/search")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cursor\": \"<string>\",\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"<string>\"\n ],\n \"limit\": 100,\n \"sql\": \"<string>\",\n \"view_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/sql/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cursor\": \"<string>\",\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"<string>\"\n ],\n \"limit\": 100,\n \"sql\": \"<string>\",\n \"view_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"aggregations": {},
"datasets": [
"app-logs"
],
"has_more": true,
"limit": 20,
"mode": "text",
"next_cursor": "eyJvZmZzZXQiOjIwfQ",
"query": {
"text": "timeout"
},
"results": [
{
"body": "connection timeout after 30s",
"created_at": "2026-01-15T09:30:00Z",
"id": "rec_01H8Z3K9QK",
"metadata": {
"service": "checkout"
},
"provenance": {
"dataset_id": "app-logs",
"line": 4821,
"source_bucket": "acme-logs",
"source_etag": "\"9b2cf5e1\"",
"source_key": "2026/01/15/app-0001.jsonl.gz",
"tenant_id": "acme",
"transform_version": "v3"
},
"score": 12.4,
"score_kind": "bm25",
"snippets": [
"connection <em>timeout</em> after 30s"
],
"title": null
}
],
"returned": 1,
"route": "hot",
"search_id": "srch_8f2c",
"total": {
"relation": "eq",
"value": 1240
},
"wall_ms": 183.4
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>"
}Search & query
Run a SQL search
Executes a SQL query against the dataset’s inferred schema and returns the shared search envelope. SQL responses add a columns list, and each result places its projected values in row. Supports cursor continuation.
POST
/
v1
/
sql
/
search
Run a SQL search
curl --request POST \
--url https://api.withsplendor.com/v1/sql/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"cursor": "<string>",
"dataset_scope": "selected",
"datasets": [
"<string>"
],
"limit": 100,
"sql": "<string>",
"view_id": "<string>"
}
'import requests
url = "https://api.withsplendor.com/v1/sql/search"
payload = {
"cursor": "<string>",
"dataset_scope": "selected",
"datasets": ["<string>"],
"limit": 100,
"sql": "<string>",
"view_id": "<string>"
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cursor: '<string>',
dataset_scope: 'selected',
datasets: ['<string>'],
limit: 100,
sql: '<string>',
view_id: '<string>'
})
};
fetch('https://api.withsplendor.com/v1/sql/search', 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.withsplendor.com/v1/sql/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cursor' => '<string>',
'dataset_scope' => 'selected',
'datasets' => [
'<string>'
],
'limit' => 100,
'sql' => '<string>',
'view_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withsplendor.com/v1/sql/search"
payload := strings.NewReader("{\n \"cursor\": \"<string>\",\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"<string>\"\n ],\n \"limit\": 100,\n \"sql\": \"<string>\",\n \"view_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withsplendor.com/v1/sql/search")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cursor\": \"<string>\",\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"<string>\"\n ],\n \"limit\": 100,\n \"sql\": \"<string>\",\n \"view_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/sql/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cursor\": \"<string>\",\n \"dataset_scope\": \"selected\",\n \"datasets\": [\n \"<string>\"\n ],\n \"limit\": 100,\n \"sql\": \"<string>\",\n \"view_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"aggregations": {},
"datasets": [
"app-logs"
],
"has_more": true,
"limit": 20,
"mode": "text",
"next_cursor": "eyJvZmZzZXQiOjIwfQ",
"query": {
"text": "timeout"
},
"results": [
{
"body": "connection timeout after 30s",
"created_at": "2026-01-15T09:30:00Z",
"id": "rec_01H8Z3K9QK",
"metadata": {
"service": "checkout"
},
"provenance": {
"dataset_id": "app-logs",
"line": 4821,
"source_bucket": "acme-logs",
"source_etag": "\"9b2cf5e1\"",
"source_key": "2026/01/15/app-0001.jsonl.gz",
"tenant_id": "acme",
"transform_version": "v3"
},
"score": 12.4,
"score_kind": "bm25",
"snippets": [
"connection <em>timeout</em> after 30s"
],
"title": null
}
],
"returned": 1,
"route": "hot",
"search_id": "srch_8f2c",
"total": {
"relation": "eq",
"value": 1240
},
"wall_ms": 183.4
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>"
}Authorizations
API token issued from the Splendor console.
Headers
Selects the tenant (workspace) the request acts within.
Body
application/json
Response
Successful Response
The response is of type object.
⌘I