Levain LabsLevain Labs
ApiWikis

Similar Wiki Pages

Find the pages most similar to one page.

Find the pages most similar to one page.

Ranks the semantic index by closeness to the page's own stored embedding, so nothing is embedded per call. Filters narrow the candidates — the closest posts on one platform, say — and the warning field explains an empty result the index could not rank.

GET
/api/v1/wikis/{wiki_id}/search/similar

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

wiki_id*Wiki Id
Formatuuid

Query Parameters

path*Path

Path of the page to find neighbours of.

Length1 <= length
k?K

Maximum number of results.

Default10
Range1 <= value <= 100
filter?array<string>|

Frontmatter 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

X-API-Key?string|null

Response Body

application/json

application/json

curl -X GET "https://api.levainlabs.com/api/v1/wikis/497f6eca-6276-4993-bfeb-53cbbbba6f08/search/similar?path=string"
{
  "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": {}
    }
  ]
}