Search documents
search_documentsSearch Paperless-ngx documents by full-text query or metadata filters. Returns compact summaries (id, title, tags, dates) to locate documents without flooding context.
Instructions
Find documents by full-text search, metadata filters, or both. This is the main entry point for every 'which documents ...' question. Returns a compact summary per document (id, title, IDs of correspondent/type/tags, dates) — NOT the OCR text, which would flood the context. Use get_document_content for the text of a specific document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| query | No | Full-text search across document content and metadata. Supports the Paperless query syntax, e.g. 'invoice AND 2024', 'correspondent:telekom', 'created:[2024-01-01 TO 2024-12-31]'. Prefer this for 'find documents about X' questions. | |
| ordering | No | Sort field, '-' prefixed for descending. Common: -created, -added, title, archive_serial_number. | -created |
| is_tagged | No | false returns documents with no tags at all — the untriaged pile. | |
| owner__id | No | Only documents owned by this user ID. | |
| page_size | No | Default 25. | |
| is_in_inbox | No | true returns documents still carrying an inbox tag. The usual starting point for triage. | |
| more_like_id | No | Return documents similar to this document ID. Ignores the other filters. | |
| tags__id__in | No | Only documents carrying AT LEAST ONE of these tag IDs. | |
| extra_filters | No | Any additional Django-style filter the documents endpoint accepts, e.g. {'content__icontains': 'kündigung', 'created__year': 2024, 'mime_type': 'application/pdf'}. Use this for filters not listed above. | |
| tags__id__all | No | Only documents carrying ALL of these tag IDs. | |
| tags__id__none | No | Exclude documents carrying any of these tag IDs. | |
| content_preview | No | Include this many characters of OCR text per document. 0 disables it. Keep small. | |
| added__date__gte | No | Added to Paperless on or after this date (YYYY-MM-DD). | |
| added__date__lte | No | Added to Paperless on or before this date (YYYY-MM-DD). | |
| storage_path__id | No | Exact storage path ID. | |
| title__icontains | No | Case-insensitive substring match on the title only. Cheaper and stricter than query. | |
| correspondent__id | No | Exact correspondent ID. | |
| document_type__id | No | Exact document type ID. | |
| created__date__gte | No | Created on or after this date (YYYY-MM-DD). | |
| created__date__lte | No | Created on or before this date (YYYY-MM-DD). | |
| custom_field_query | No | JSON-encoded custom field filter, e.g. '["due","range",["2024-08-01","2024-09-01"]]' or '["customer","icontains","acme"]'. See the Paperless API docs for the operator list. | |
| archive_serial_number | No | Exact archive serial number. |