Skip to Content

Search documents or pages

POST
/v1/documents/search

Search retained documents, or supply filters.document_id to find pages within one document. Use filters.external_id and filters.external_group_id to narrow the search. Every result must match all supplied filters. Exact identifier matches appear first and include identifier.field and identifier.value. Identifier and filename matches have a null page. Search returns a limited set of matches; use GET /v1/documents for a complete paginated list by external ID. Search in your own words, or use quoted phrases, uppercase OR, and exclusions for word matching. Search must be enabled for the workspace. API keys require the results:read scope.

Authorization

Bearer
headerAuthorizationBearer <token>

Send your API key in the Authorization header: Bearer <api_key>.

Request Body

application/json
  1. body
query*string

Text or a whole external identifier to find. Supports quoted phrases, uppercase OR, exclusions, and signed amounts.

Length1 <= length <= 500
filters?

Restrict eligible documents before search. All supplied filters combine with AND.

limit?integer

Maximum number of ranked hits to return.

Range0 < value <= 10
Default5

Response Body

Ranked documents or pages

application/json
  1. response
hits*array<>
Itemsitems <= 10
Example Response
{  "hits": [    {      "document": {        "id": "doc_01j00000000000000000000000",        "filename": "statement.pdf",        "status": "completed",        "progress": {          "pages_total": 1,          "pages_completed": 1        },        "detail": null,        "confidence_score": 95,        "classification": null,        "thumbnail": null,        "webhook": null,        "created_at": "2026-09-18T12:00:00Z",        "completed_at": "2026-09-18T12:02:00Z"      },      "page": {        "page_number": 1,        "excerpt": "Closing balance: $1,250.00"      },      "identifier": null    }  ]}