aPapyr Python SDK
Extract structured data from invoices, receipts, and documents. Send a PDF or image, get clean JSON back.
Install
pip install apapyr
Quick Start
from apapyr import aPapyr
client = aPapyr("sk_live_your_key")
# Extract data from an invoice
result = client.extract("invoice.pdf")
print(result.get_field("vendor_name")) # "Acme Corp"
print(result.get_field("total")) # 1250.00
print(result.get_field("due_date")) # "2026-04-15"
print(result.confidence) # 0.97
# Get all fields as a flat dictionary
print(result.to_flat_dict())
# {"document_type": "invoice", "vendor_name": "Acme Corp", "total": 1250.00, ...}
# Check confidence for a specific field
print(result.get_field_confidence("total")) # 0.98
Document Types
| Type | Key Fields |
|---|---|
invoice |
vendor, total, tax, due_date, line_items |
receipt |
merchant, total, tax, tip, payment_method |
w2 |
employer, wages, federal_tax, state_tax |
bank_statement |
bank, balances, transactions |
contract |
parties, dates, value, obligations |
auto |
automatically detects type (default) |
AI Agent Support
aPapyr works natively with AI agents via MCP:
# Add to Claude Code
claude mcp add apapyr -- npx @apapyr/mcp-server
Then just ask: "Extract the data from invoice.pdf"
Environment Variable
export APAPYR_API_KEY=sk_live_your_key
client = aPapyr() # reads from env
Links
Metadata
Release files for apapyr 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apapyr-1.0.0.tar.gz | 4.4 kB | Without provenance | Details for apapyr-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apapyr-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for apapyr-1.0.0-py3-none-any.whl |
Total release size: 11.0 kB
Release files / apapyr-1.0.0.tar.gz
| Download URL | apapyr-1.0.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2a9e02069223f40c348996e4869feda0bc20b218240f1832419d5176aa42e5d
|
|
BLAKE2b-256 checksum How to use checksums |
f93a28f14c32eb129faf5aeef2b49022aceee3e3a566b30835801d8e0ec4f57a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.6
|
Release files / apapyr-1.0.0-py3-none-any.whl
| Download URL | apapyr-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68bcac8a2181eb72907596383acc3c37d4f2f0ee8260dfe6f20f6f6d69227ff3
|
|
BLAKE2b-256 checksum How to use checksums |
5ce3dc85f3c16a0251f1fe07143badf1fc7c524ae7a4e5bbc3e7fd48e8537eb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.6
|
Security for apapyr 1.0.0
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.