Search documents
paperless_search_documentsFind documents in paperless-ngx by combining full-text search with structured filters like tags, correspondents, and date ranges.
Instructions
Find documents in paperless-ngx. Combine full-text search with structured filters.
query uses the full-text index and supports the advanced syntax: invoice AND (acme OR globex), type:invoice tag:unpaid, correspondent:university, created:[2005 to 2009], added:yesterday, produ*name, custom_fields.name:"Contract Number", custom_fields.value:policy, notes.note:reminder. Date keywords: today, yesterday, "previous week", "this month", "previous month", "this year", "previous year", "previous quarter". Matching is word-order-independent and accent-insensitive.
Use title_contains/content_contains instead for plain substring matching, or more_like_id to find documents similar to a known one. Tag/correspondent/type filters take ids — get them from paperless_list_objects. Returns names resolved, not raw ids.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number. | |
| query | No | Full-text query using the advanced search syntax described above. | |
| ordering | No | Sort field, `-` prefix for descending. Common values: `created`, `-created`, `added`, `-added`, `modified`, `title`, `archive_serial_number`, `correspondent__name`, `document_type__name`, `num_notes`, `page_count`. | |
| tags_all | No | Only documents carrying every one of these tag ids. | |
| tags_any | No | Only documents carrying at least one of these tag ids. | |
| is_tagged | No | true = only tagged documents, false = only untagged. | |
| mime_type | No | Substring match on mime type, e.g. `pdf`, `image/`. | |
| owner_ids | No | Restrict to documents owned by these user ids. | |
| page_size | No | Results per page (max 100). | |
| tags_none | No | Exclude documents carrying any of these tag ids. | |
| added_after | No | Inclusive lower bound on when it was added, `YYYY-MM-DD`. | |
| is_in_inbox | No | true = only documents still carrying an inbox tag. | |
| added_before | No | Inclusive upper bound on when it was added, `YYYY-MM-DD`. | |
| more_like_id | No | Return documents similar to this document id. Cannot be combined with `query`. | |
| created_after | No | Inclusive lower bound on the document date, `YYYY-MM-DD`. | |
| extra_filters | No | Escape hatch for any other documented query parameter, e.g. `{"checksum__iexact":"…"}`. | |
| snippet_chars | No | Characters of document text to include per result when there is no search highlight. | |
| created_before | No | Inclusive upper bound on the document date, `YYYY-MM-DD`. | |
| title_contains | No | Case-insensitive substring match on the title. | |
| content_contains | No | Case-insensitive substring match on the extracted text. | |
| storage_path_ids | No | Restrict to these storage path ids. | |
| correspondent_ids | No | Restrict to these correspondent ids. | |
| document_type_ids | No | Restrict to these document type ids. | |
| custom_field_query | No | JSON custom-field query, passed through verbatim. Examples: `["due","range",["2024-08-01","2024-09-01"]]`, `["customer","exact","bob"]`, `["answered","exact",true]`, `["foo","exists",false]`. Operators: exact, in, isnull, exists (all types); icontains/istartswith/iendswith (text); gt/gte/lt/lte/range (number, date); contains (document link). | |
| archive_serial_number | No | Exact archive serial number. |