> ## 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.

# Query Chunks

> Semantic search over a knowledgebase

## Request

```bash theme={null}
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

```bash theme={null}
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"
```

```json theme={null}
[
  {
    "id": "chunk_abc123",
    "content": "The product features include real-time analytics...",
    "contentLength": 82,
    "isEnabled": true
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.