Turn any PDF or image into clean Markdown or LaTeX. Free keyless API.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hardparse-0.2.0.tar.gz.
File metadata
- Download URL: hardparse-0.2.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
375f9cf469519d0541052b62f62fdc23d87875b286822b4ba403c0d96b371cd9
|
|
| MD5 |
78ba28e937401e009440c6b97539ff3f
|
|
| BLAKE2b-256 |
0e34bdbaba21afd30414251459cea27b5700d4c7839fe3e9918977d57352e116
|
File details
Details for the file hardparse-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hardparse-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18cab70a67f39f9fc6adee2aac751a3d4a989a781a9ca8198498bd2fa126326f
|
|
| MD5 |
ac1dc3a5e5b6f583497a4cc395726400
|
|
| BLAKE2b-256 |
5c46eeaf10459d268c7a328cf758eba02025237d5d38aecba85f6e0a7de2af27
|