Skip to main content
POST
/
v1
/
search
Run a search
curl --request POST \
  --url https://api.withsplendor.com/v1/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
  --data '
{
  "aggregations": [],
  "collapse": null,
  "content_filter": "text",
  "cursor": null,
  "dataset_scope": "selected",
  "datasets": [
    "app-logs"
  ],
  "limit": 20,
  "max_expansion_terms": 10,
  "q": null,
  "semantic": false,
  "semantic_min_score": null,
  "text": "timeout",
  "time": null,
  "where": []
}
'
{
  "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
}

Authorizations

Authorization
string
header
required

API token issued from the Splendor console.

Headers

x-splendor-tenant-id
string
required

Selects the tenant (workspace) the request acts within.

Body

application/json
aggregations
AggregationRequest · object[]
collapse
enum<string> | null

Override how lexical hits map to results. 'document' returns the best-ranked record per document (use to force a document listing from a filter-only browse); 'record' returns every matching record (use with a document filter to enumerate each instance of a term within one document). Defaults to document collapse for ranked text and record semantics for filter-only browses. Not valid with semantic search, which always returns document-level results.

Available options:
document,
record
content_filter
enum<string>
default:text

For semantic search, which modalities to retrieve: 'text' (default) searches text/document embeddings; 'images' searches image embeddings via SigLIP; 'all' searches both and merges the results.

Available options:
all,
text,
images
cursor
string | null
Minimum string length: 1
dataset_scope
enum<string>
default:selected
Available options:
selected,
all
datasets
string[]
limit
integer
default:20
Required range: 0 <= x <= 1000
max_expansion_terms
integer
default:10
Required range: 1 <= x <= 50
q
string | null
semantic
boolean
default:false
semantic_min_score
number | null
text
string | null
time
TimeRange · object
where
StructuredFilter · object[]

Response

Successful Response

The response is of type object.