Skip to main content
GET
/
v1
/
projects
/
{projectId}
/
knowledgebases
/
{knowledgebaseId}
/
query
Query Chunks
curl --request GET \
  --url https://api.pathors.com/v1/projects/{projectId}/knowledgebases/{knowledgebaseId}/query \
  --header 'Authorization: <authorization>'
{
  "id": "<string>",
  "content": "<string>",
  "contentLength": 123,
  "isEnabled": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.pathors.com/llms.txt

Use this file to discover all available pages before exploring further.

Request

GET https://api.pathors.com/v1/projects/{projectId}/knowledgebases/{knowledgebaseId}/query

Path Parameters

projectId
string
required
The project ID
knowledgebaseId
string
required
The knowledgebase ID to query

Headers

Authorization
string
required
Bearer token using your developer key

Query Parameters

q
string
required
The search query
topK
number
Maximum number of results to return. Defaults to 5.
scoreThreshold
number
Minimum relevance score (0–1) for chunks to be included. Defaults to 0.3.

Response

Returns an array of chunks ordered by relevance.
id
string
Unique identifier for the chunk
content
string
Chunk text content
contentLength
number
Length of the chunk content in characters
isEnabled
boolean
Whether the chunk participates in search

Example

curl "https://api.pathors.com/v1/projects/{projectId}/knowledgebases/kb_abc123/query?q=search_term&topK=5&scoreThreshold=0.3" \
  -H "Authorization: Bearer dk_your_key"
[
  {
    "id": "chunk_abc123",
    "content": "The product features include real-time analytics...",
    "contentLength": 82,
    "isEnabled": true
  }
]