business_knowledge

Read-only access to parsed knowledge documents. Exposes hybrid search (search) and a drill-down window (window) so an agent (PHAI or MCP) can find and explore business knowledge chunks.

get/api/projects/{project_id}/business_knowledge/documents/search/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/business_knowledge/documents/search/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Query parameters

limitinteger

Maximum number of ranked chunks to return. Defaults to 10, capped at 20.

querystring required

Natural-language search query. Runs hybrid (semantic + full-text) retrieval over all SAFE, READY knowledge chunks in this project.

rerankboolean

When true, rerank search results with a listwise LLM pass for better relevance. Defaults to false (RRF order only). Falls back to RRF order on rerank failure.

Response

chunk_idstring uuid required

Stable identifier of this chunk.

document_idstring uuid required

ID of the parent document. Pass to the document-window endpoint with around_ordinal to drill down.

ordinalinteger required

Zero-based position of this chunk within its document. Use as around_ordinal in the document-window endpoint.

source_idstring uuid required

ID of the knowledge source this chunk belongs to.

source_namestring required

Human label of the knowledge source this chunk belongs to.

source_typestring required

Source type: text, URL, or file.

document_titlestring required

Title of the document this chunk belongs to.

heading_pathstring required

Breadcrumb of section headings this chunk sits under. Empty when the document has no heading structure.

contentstring required

The chunk's text content.

is_generatedboolean required

True when this chunk comes from a generated source learned from a past support ticket.

urlstring required

Fetched page URL. Empty for text and file sources.

Changes

No recorded changes to this operation across all 1 revision of this API.