Skip to main content

epo-oa-cli

EPO patent prosecution history CLI — Download, parse, and analyze European Patent Office (EPO) prosecution documents for AI-assisted patent analysis.

pip install epo-oa-cli
epo-oa run EP21841218

Overview

epo-oa fetches the complete prosecution history of any EP patent from the EPO Register, extracts PDF text (with optional OCR), and generates a structured prosecution.md file ready for AI analysis (Claude, GPT-4, etc.).

epo-oa run EP21841218
  → Downloads 40 documents as ZIP
  → Extracts & parses toc.xml
  → Generates file/EP21841218/EP21841218_prosecution.md

Installation

# pip
pip install epo-oa-cli

# uv (global install — recommended)
uv tool install epo-oa-cli

# uv (add as project dependency)
uv add epo-oa-cli

# With OCR support (for image-based PDFs)
pip install "epo-oa-cli[ocr]"
uv tool install "epo-oa-cli[ocr]"

Requires Python 3.12+.


Quick Start

# 1. List all documents
epo-oa list EP21841218

# 2. Download as ZIP + extract
epo-oa download EP21841218

# 3. Parse PDFs → prosecution.md
epo-oa extract EP21841218

# 4. All-in-one
epo-oa run EP21841218

With OCR (for image-based PDFs)

EPO PDFs are full-page image scans. Run OCR first to embed text into the analysis file:

# OCR key documents only
epo-oa ocr EP21841218 --codes 1703,1224,ABEX

# OCR all documents
epo-oa ocr EP21841218

# Extract with OCR text embedded
epo-oa extract EP21841218 --with-ocr

Commands

Command Description
epo-oa list <EP> List prosecution documents from EPO Register
epo-oa download <EP> Download all documents as ZIP archive
epo-oa extract <EP> Parse PDFs → prosecution.md / prosecution.json
epo-oa ocr <EP> OCR image-based PDFs → searchable *_ocr.pdf
epo-oa run <EP> Download + extract in one step
epo-oa configure Set proxy / CA-cert options

Options

epo-oa list EP21841218 --format json          # JSON output
epo-oa download EP21841218 --force            # Re-download
epo-oa extract EP21841218 --format json       # JSON output
epo-oa extract EP21841218 --with-ocr          # Embed OCR text
epo-oa ocr EP21841218 --codes 1703,ABEX       # Selective OCR
epo-oa ocr EP21841218 --in-place              # Overwrite originals

Proxy & SSL Configuration

For corporate networks or environments that require a proxy or custom CA certificate:

epo-oa configure

This interactively prompts for:

  • HTTPS proxy URL — e.g. http://proxy.corp.example.com:8080
  • HTTP proxy URL — e.g. http://proxy.corp.example.com:8080
  • CA bundle file path — path to a custom .pem / .crt file

Settings are saved to ~/.epo-oa.toml:

[proxy]
https = "http://proxy.corp.example.com:8080"
http  = "http://proxy.corp.example.com:8080"

[ssl]
ca_bundle = "/etc/ssl/certs/corp-ca.pem"

If no config file exists, requests falls back to the standard environment variables (HTTPS_PROXY, HTTP_PROXY, REQUESTS_CA_BUNDLE).


Output: prosecution.md

The generated markdown file is structured for AI agents:

# EPO Prosecution Analysis — EP21841218

## Summary
| Item | Count |
|------|-------|
| Total documents | 40 |
| 🔴 Office Actions | 2 |
| 🔵 Amendments | 13 |
| ✅ Grant / Decision | 8 |

## Timeline
| Date | Cat | Document | File |
|------|-----|----------|------|
| 2023-10-30 | 🔍 | European Search Opinion (1703) 🖼️ | ... |
| 2024-02-15 | 🔵 | Amended Claims (CLMSABEX) 🖼️ | ... |
| 2026-02-05 | ✅ | Decision to Grant (2006A) 🖼️ | ... |

## 🔴 Office Action Documents
### European Search Opinion — 2023-10-30
**OCR Text:**
```text
D1 WO 2020/138918 A1 (SAMSUNG ELECTRONICS CO LTD)
1.1 D1 discloses an electronic device with the following features...
` `` `

Politeness & Rate Limiting

This tool accesses a public EPO server. It enforces:

  • Random delays (1.5–3.0s) between requests
  • Browser-like headers
  • ZIP archive download (minimises HTTP requests)

Please do not run this tool in tight loops or CI pipelines without appropriate throttling.


Document Categories

Icon Category Description
🔴 Office Action Examination notices, search opinions (1224, 1703, 2003–2006, etc.)
🔵 Amendment Amendments, observations, responses (CLMSABEX, DESCABEX, ABEX, etc.)
✅ Grant Grant decisions, certificates (2006A, 2066, 2047, etc.)
🔍 Search Search reports (1503, 1503SS, ISR, IPRP, etc.)
💬 Interview Interview summaries (INTERV, EXIN)
⚪ Other Receipts, administrative notices, miscellaneous

Notes for AI Agents

  • Image-only PDFs show 🖼️ — provide the path field directly to vision-capable models
  • Run epo-oa ocr + --with-ocr to embed text for language models
  • JSON output (--format json) includes full path and text fields for programmatic access
  • The prosecution.md is designed to fit within typical LLM context windows for smaller dockets

License

MIT

Metadata

Release files for epo-oa-cli 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for epo-oa-cli 0.2.4
File Size Uploaded Provenance Actions
epo_oa_cli-0.2.4.tar.gz 84.7 kB Without provenance Details for epo_oa_cli-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for epo-oa-cli 0.2.4
File Interpreter ABI Platform Actions
epo_oa_cli-0.2.4-py3-none-any.whl Python 3 none any Details for epo_oa_cli-0.2.4-py3-none-any.whl

Total release size: 105.4 kB

Release files / epo_oa_cli-0.2.4.tar.gz

Download URL epo_oa_cli-0.2.4.tar.gz
Size 84.7 kB
Tags Source
SHA-256 checksum
How to use checksums
21f08d7e94c2b9640e76a1763a24d4d81ceb22b34c250dc38e380d61c6587ec7
BLAKE2b-256 checksum
How to use checksums
f4a3ddf5a3adb7b9e2e4590a068c0913dc199d7f95035e9ae12465ac290de239
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / epo_oa_cli-0.2.4-py3-none-any.whl

Download URL epo_oa_cli-0.2.4-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d043ae0be7250250ba2b9ce6eee350e974ef1655724f1a736a92669a87a8c76
BLAKE2b-256 checksum
How to use checksums
a8844f10c8308f271bc9877ba6e006ee58240b46aa88d731ca2aac6e15376823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for epo-oa-cli 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page