Skip to content

Search pages and rows

GET
/api/v1/search
curl --request GET \
--url 'https://app.lyra-docs.com/api/v1/search?query=example&kind=doc&limit=10' \
--header 'Authorization: Bearer <token>'

Searches the titles and text of the pages and database rows the person can see, best matches first.

query
required
string
>= 1 characters <= 200 characters

The words to look for

kind
string
Allowed values: doc database row

Only return this kind of page

limit
integer
default: 10 >= 1 <= 50

OK

Media typeapplication/json
object
results
required
Array<object>

A page or database row that matched.

object
id
required
string format: uuid
title
required
string
icon
required
Any of:

An emoji

string
<= 16 characters
kind
required
string
Allowed values: doc database row
url
required
string
breadcrumbs
required
Array<object>

A page above this one that the token can see.

object
id
required
string format: uuid
title
required
string
icon
required
Any of:

An emoji

string
<= 16 characters
kind
required
string
Allowed values: doc database row
snippet
required

Text around the match, with the matched words inside

string
updatedAt
required
string format: date-time

Example

{
"results": [
{
"id": "0193a7c2-5d41-7c3e-9a51-6f0d2b8e4a10",
"title": "Launch plan",
"icon": "🚀",
"kind": "doc",
"url": "https://app.lyra-docs.com/p/0193a7c2-5d41-7c3e-9a51-6f0d2b8e4a10",
"breadcrumbs": [],
"snippet": "We <mark>launch</mark> on the 10th",
"updatedAt": "2026-12-02T09:30:00.000Z"
}
]
}
X-RateLimit-Limit
integer

How many requests the token can send in a minute

X-RateLimit-Remaining
integer

How many it has left this minute

X-RateLimit-Reset
integer

Seconds until the count starts again

X-Request-Id
string

The id of this request. Send it to support if something goes wrong.

The request does not match the schema: a missing field, a wrong type or a value out of range.

Media typeapplication/json

What went wrong.

object
error
required
object
code
required

A stable code to check in your code, such as page_not_found

string
message
required

A sentence for people, which can change

string
issues

For invalid_request, each part of the request that was wrong

Array

Example

{
"error": {
"code": "invalid_request",
"message": "The request is not valid.",
"issues": [
{
"instancePath": "/title",
"message": "Too big: expected string to have <=500 characters"
}
]
}
}

The token is missing, wrong, revoked or expired.

Media typeapplication/json

What went wrong.

object
error
required
object
code
required

A stable code to check in your code, such as page_not_found

string
message
required

A sentence for people, which can change

string
issues

For invalid_request, each part of the request that was wrong

Array

Example

{
"error": {
"code": "unauthorized",
"message": "Please sign in."
}
}

Too many requests. Each token can send 120 requests a minute. Wait for the seconds in Retry-After.

Media typeapplication/json

What went wrong.

object
error
required
object
code
required

A stable code to check in your code, such as page_not_found

string
message
required

A sentence for people, which can change

string
issues

For invalid_request, each part of the request that was wrong

Array

Example

{
"error": {
"code": "rate_limited",
"message": "Too many requests. Try again in 21 seconds."
}
}
Retry-After
integer

Seconds to wait before sending again