Levain LabsLevain Labs
ApiWikis

Post Wiki Search

Search knowledge-base pages with the query in the request body.

Search knowledge-base pages with the query in the request body.

Same contract and response as GET /api/v1/wikis/{wiki_id}/search, for queries too long for a URL — a whole draft or source piece.

POST
/api/v1/wikis/{wiki_id}/search

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

wiki_id*Wiki Id
Formatuuid

Header Parameters

X-API-Key?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.levainlabs.com/api/v1/wikis/497f6eca-6276-4993-bfeb-53cbbbba6f08/search" \  -H "Content-Type: application/json" \  -d '{    "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": {}
    }
  ]
}