ReferenceDocumentsSearch

    List and search documents

    Paginated documents you can read, with optional full-text search (snippets with highlighted matches), summary filters and sorting. Authorization is applied…

    GET
    /documents/search

    Paginated documents you can read, with optional full-text search (snippets with highlighted matches), summary filters and sorting. Authorization is applied before results, counts and snippets.

    Authorization

    bearerAuth
    AuthorizationBearer <token>

    In: header

    Query Parameters

    q?string

    Full-text search over the document text and its summary. Words, prefixes, DNI/NIE and references; case and accents ignored; no typo tolerance. A document matches on any word; documents matching more words rank first.

    Lengthlength <= 400
    templateId?string
    templateVersionId?string
    summaryStates?string

    Comma-separated summary states: ready, stale, pending, running, failed, not_extracted, no_schema.

    filters?string

    JSON array of {key, op, value} on top-level summary keys of templateId (ops: eq, contains, gt, gte, lt, lte, empty, notEmpty). Requires templateId.

    sort?string

    relevance (default with q), updatedAt (default), createdAt, title or summary..

    direction?string

    Value in

    • "asc"
    • "desc"
    view?string

    user (default): documents you own or that are shared with you. admin: every document of the organization (organization admins only).

    Value in

    • "user"
    • "admin"
    limit?string
    offset?string

    Response Body

    application/json

    application/json

    application/json

    application/json

    application/json

    curl -X GET "https://example.com/documents/search"
    {  "items": [    {      "apiKeyId": "string",      "createdAt": "string",      "creatorUserId": "string",      "id": "string",      "search": {        "matchedTerms": 0,        "snippets": [          [            {              "match": true,              "text": "string"            }          ]        ]      },      "status": "string",      "summary": {        "data": {          "property1": null,          "property2": null        },        "error": "string",        "extractedAt": "string",        "state": "string",        "status": "string"      },      "templateId": "string",      "templateTitle": "string",      "templateVersion": 0,      "templateVersionId": "string",      "title": "string",      "updatedAt": "string"    }  ],  "limit": 0,  "offset": 0,  "total": 0}