Skip to main content

hardparse

Turn any PDF or image into clean Markdown or LaTeX — tables as real Markdown tables, formulas as LaTeX, handwriting as readable text.

Free, keyless API. 100 requests/day per IP. Zero dependencies.

Install

pip install hardparse

Use

from hardparse import parse

md = parse("invoice.pdf")
print(md)

That's it. No key. No signup.

Want LaTeX instead?

from hardparse import parse_latex

tex = parse_latex("paper.pdf")
open("out.tex", "w").write(tex)
# $ xelatex out.tex  →  out.pdf — ready for your paper or thesis

The returned string is a compilable standalone .tex document — fontspec, amsmath, longtable already in the preamble, xelatex-ready.

More

from hardparse import parse_full

result = parse_full("scan.png")
print(result.markdown)
print(result.page_count, "pages,", result.processing_time_ms, "ms")
print("remaining today:", result.remaining)

Works with paths, bytes, or any file-like object:

parse(Path("doc.pdf"))
parse(open("doc.pdf", "rb"))
parse(b"...raw bytes...")

Rate limits

Anonymous, per-IP: 100 requests / 24h rolling window. On exceed:

from hardparse import parse, RateLimitError

try:
    md = parse("doc.pdf")
except RateLimitError as e:
    print(f"hit limit: used {e.used}/{e.limit}, retry in {e.retry_after}s")

Need more? Email hi@hardparse.com.

Self-host / custom endpoint

from hardparse import Client
client = Client(base_url="https://your-host")
md = client.parse("doc.pdf")

Or set HARDPARSE_BASE_URL.

Supported inputs

PDF, PNG, JPG, TIFF, HEIC, WEBP, BMP. 200 MB max.

Release files for hardparse 0.2.0

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

Source distribution (sdist)

Source distribution for hardparse 0.2.0
File Size Uploaded
hardparse-0.2.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hardparse 0.2.0
File Interpreter ABI Platform
hardparse-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / hardparse-0.2.0.tar.gz

Download URL hardparse-0.2.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
375f9cf469519d0541052b62f62fdc23d87875b286822b4ba403c0d96b371cd9
BLAKE2b-256 checksum
How to use checksums
0e34bdbaba21afd30414251459cea27b5700d4c7839fe3e9918977d57352e116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / hardparse-0.2.0-py3-none-any.whl

Download URL hardparse-0.2.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18cab70a67f39f9fc6adee2aac751a3d4a989a781a9ca8198498bd2fa126326f
BLAKE2b-256 checksum
How to use checksums
5c46eeaf10459d268c7a328cf758eba02025237d5d38aecba85f6e0a7de2af27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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