Search a collection¶
POST /document-intelligence/v1/collections/{collection_id}/search
Find the passages in a collection that match a query. No answer is written - use chat for that.
Parameters¶
| Name | In | Required | Notes |
|---|---|---|---|
collection_id |
path | yes | - |
Request body¶
| Field | Type | Required | Notes |
|---|---|---|---|
query |
string | yes | What to look for. max 4000 characters |
top_k |
integer | no | How many passages to return, most relevant first. min 1.0; max 50.0; defaults to 5 |
min_score |
number | no | Drop passages the retriever scored below this. 0 to 1. |
filters |
object | no | Only search documents whose extracted fields match, for example {"document_type": "invoice"}. |
Example¶
curl -X POST "https://api.futuresmart.ai/document-intelligence/v1/collections/{collection_id}/search" \
-H "Authorization: Bearer $FS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"query": "<query>"
}'
Responses¶
200
| Field | Type | Required | Notes |
|---|---|---|---|
sections |
array of Section | yes | - |
Every failure, a malformed request included, comes back in the shared envelope with a stable code to branch on. See Errors.