Skip to main content
CodivDocs

Search pages

Full-text + semantic hybrid search across all pages in a project. Returns the top results ranked by relevance.

POST/projects/{id}/pages/search

Authorization

Requires: BearerAuth

Path parameters

idstring (uuid)pathrequired

Request body

modeenum (keyword, semantic, hybrid)body
Search mode — keyword (tsvector), semantic (pgvector), or hybrid RRF fusion
options:keywordsemantichybrid
limitintegerbody
querystringbodyrequired
Search query — supports Google-style syntax via websearch_to_tsquery

Response

200Search results ordered by rank

resultsobject[]
Search pages
curl --request POST \
  --url 'https://api.codivdocs.com/v1/projects/{id}/pages/search' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "mode": "hybrid",
  "limit": 10,
  "query": "<string>"
}'
{
  "results": [
    {
      "path": "<string>",
      "rank": 0,
      "title": "<string>",
      "snippet": "<string>"
    }
  ]
}