Skip to main content
GET
/
v1
/
search
/
spans
Free-text semantic search over span embeddings (server-side embed)
curl --request GET \
  --url https://api.trulayer.ai/v1/search/spans \
  --header 'Authorization: Bearer <token>'
{
  "results": [
    {
      "span_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "similarity": 123,
      "span_name": "<string>",
      "span_type": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "next_cursor": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

SDK API key (tl_...) or Clerk session JWT

Query Parameters

q
string
required

Free-form text to embed and search.

Minimum string length: 1
project_id
string<uuid>
required
from
string<date-time>

RFC3339 lower bound on span created_at.

to
string<date-time>

RFC3339 upper bound on span created_at.

limit
integer
default:20
Required range: 1 <= x <= 100
cursor
string

Opaque cursor returned by a previous response.

Response

Search results

results
object[]
required
next_cursor
string

Opaque cursor for the next page, omitted on the last page.