Search Wiki
Search knowledge-base pages.
Search knowledge-base pages.
Semantic mode needs the knowledge base's semantic index, which is rebuilt on
every maintainer run; pages saved or deleted through this API update it as they
land, so they are searchable right away. Until an index exists the response
falls back to keyword results and says so in warning. Filters apply in both
modes, and every hit carries the page's front matter.
Authorization
HTTPBearer In: header
Path Parameters
uuidQuery Parameters
Search query, up to 2000 characters; longer queries go through POST /api/v1/wikis/{wiki_id}/search.
1 <= length <= 2000lexical scores keyword matches (titles weighted); semantic ranks pages by meaning — better for topic-shaped queries.
"lexical""lexical" | "semantic"Maximum number of results.
201 <= value <= 100Frontmatter filter, repeatable. key=value matches a field exactly (or as a member of a list field); key>=value and key<=value are inclusive bounds, compared as numbers when both sides are numeric and as strings otherwise, which orders ISO dates — e.g. platform=linkedin and date>=2026-01-01. String bounds are exact, so date<=2026-08-01 excludes 2026-08-01T10:00:00Z; bound at the field's precision. A key takes one equality, or one bound per operator.
Header Parameters
Response Body
application/json
application/json
curl -X GET "https://api.levainlabs.com/api/v1/wikis/497f6eca-6276-4993-bfeb-53cbbbba6f08/search?q=string"{
"mode": "lexical",
"hits": [
{
"path": "string",
"title": "string",
"snippet": "string",
"score": 0,
"frontmatter": {
"property1": "string",
"property2": "string"
}
}
],
"warning": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}