Search pages and rows
const url = 'https://app.lyra-docs.com/api/v1/search?query=example&kind=doc&limit=10';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The words to look for
Only return this kind of page
Responses
Section titled “Responses”OK
object
A page or database row that matched.
object
Text around the match, with the matched words inside
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" } ]}Headers
Section titled “Headers”How many requests the token can send in a minute
How many it has left this minute
Seconds until the count starts again
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.
What went wrong.
object
object
A stable code to check in your code, such as page_not_found
A sentence for people, which can change
For invalid_request, each part of the request that was wrong
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.
What went wrong.
object
object
A stable code to check in your code, such as page_not_found
A sentence for people, which can change
For invalid_request, each part of the request that was wrong
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.
What went wrong.
object
object
A stable code to check in your code, such as page_not_found
A sentence for people, which can change
For invalid_request, each part of the request that was wrong
Example
{ "error": { "code": "rate_limited", "message": "Too many requests. Try again in 21 seconds." }}Headers
Section titled “Headers”Seconds to wait before sending again