Skip to main content
POST
/
v1
/
knowledge
/
groups
/
{id}
/
search
search knowledge group
curl --request POST \
  --url https://api.anam.ai/v1/knowledge/groups/{id}/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "How do I reset my password?",
  "limit": 5
}
'
[
  {
    "documentId": "00000000-0000-0000-0000-000000000000",
    "filename": "getting-started.pdf",
    "content": "To reset your password, visit the account settings page and click \"Reset password\".",
    "score": 0.87,
    "chunkIndex": 3,
    "metadata": {
      "section": "Account"
    }
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Unique identifier of the knowledge group

Body

application/json

Query string to search the group's documents, plus an optional cap on how many chunks to return. Only READY documents are included in the results.

query
string
required
limit
integer
default:5
Required range: 1 <= x <= 20

Response

Successfully retrieved search results

documentId
string<uuid>

ID of the document the chunk was extracted from.

filename
string

Filename of the source document.

content
string

Text content of the matching chunk.

score
number

Similarity score for this chunk against the query, higher is more similar.

chunkIndex
integer

Zero-based index of the chunk within the source document.

metadata
object

Free-form metadata attached to the chunk at ingest time.

Last modified on April 22, 2026