Skip to content
Back to skills

paperless-ngx

ASecurity

Search and retrieve documents from a Paperless-ngx archive via REST API. Use when the user wants to find, read, or update documents stored in Paperless-ngx (for example: search by keyword or tag, fetch document content, or update document metadata).

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 26, 2026
databasespythonbashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add ragnvald/paperskill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of paperless-ngx?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for paperless-ngx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ragnvald-paperless-ngx/badge)](https://www.skillsdirectory.com/skills/ragnvald-paperless-ngx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: paperless-ngx
description: "Search and retrieve documents from a Paperless-ngx archive via REST API. Use when the user wants to find, read, or update documents stored in Paperless-ngx (for example: search by keyword or tag, fetch document content, or update document metadata)."
---

# Paperless-ngx

## Overview
Use this skill to query a Paperless-ngx instance and retrieve or update documents via its REST API using the bundled scripts.

## Prerequisites
- Set `PAPERLESS_URL` and `PAPERLESS_TOKEN` environment variables.
- Install Python 3.10+ and `requests`.

## Quick Start
```bash
python scripts/search.py --query "tax form" --limit 5
python scripts/fetch.py --id 123 --text
python scripts/update_meta.py --id 123 --add-tag important
```

## Tasks

### Search documents
Run `scripts/search.py` to find documents by keyword, tag, type, correspondent, or date.
`--query` performs server-side full-text search in Paperless-ngx (includes OCR/content when the server index has it). This skill never downloads document content for searching.

Filters:
- `--query` full-text search string (server-side; matches OCR/content when indexed)
- `--tag` tag name (repeatable)
- `--type` document type name
- `--correspondent` correspondent name
- `--after` created after (YYYY-MM-DD)
- `--before` created before (YYYY-MM-DD)
- `--limit` max results (default 10)
- `--json` output as JSON

Example:
```bash
python scripts/search.py --query "invoice" --tag receipts --after 2024-01-01 --limit 20
```

### Fetch documents
Run `scripts/fetch.py` to download files or print OCR/text content.

Options:
- `--id` document ID (required)
- `--out` output file path or directory
- `--text` print the document `content` field instead of downloading

Example:
```bash
python scripts/fetch.py --id 123 --out ./downloads/
```

### Update metadata
Run `scripts/update_meta.py` to change tags, title, or correspondent.

Options:
- `--add-tag` tag name to add (repeatable)
- `--remove-tag` tag name to remove (repeatable)
- `--title` new title
- `--correspondent` new correspondent name

Example:
```bash
python scripts/update_meta.py --id 123 --add-tag important --remove-tag inbox
```

## Output
- Search output is a table by default with columns `id`, `title`, `created`, `correspondent`, `tags`, `document_type`.
- Use `--json` for machine-readable search results.

## Notes
- Authentication uses `Authorization: Token {PAPERLESS_TOKEN}`.
- Pagination is handled automatically.
- If text output is missing, OCR may still be processing. Reprocess in Paperless-ngx and retry.
- Search uses Paperless-ngx server-side full-text search via the `query` parameter; no document contents are downloaded for searching.
- Full-text results depend on the server index (OCR/content availability is determined by Paperless-ngx settings and processing status).

## Resources
- `scripts/search.py` searches documents with optional filters.
- `scripts/fetch.py` downloads documents or prints text content.
- `scripts/update_meta.py` updates document metadata.

Files in this skill

  • SKILL.md3 KB
  • config.example.env32 B
  • scripts/fetch.py4.9 KB
  • scripts/search.py11.3 KB
  • scripts/update_meta.py6.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.