Industry-standard OCR API to convert PDFs and images into clean Markdown — with full support for math equations, tables, and structured formatting.
- Convert PDF files to well-formatted Markdown
- Preserves LaTeX math notation (
$\delta(x)$ , integrals, etc.) - Handles tables, lists, headings, and complex layouts
- Simple REST API via Bibcit
- Chain with the MassiveMark API to further convert Markdown to HTML, DOCX, or RAG-optimized PDF
- A Bibcit API key — get one at bibcit.com
pip install requestsimport requests
pdf_file_path = "input.pdf"
with open(pdf_file_path, "rb") as f:
files = {"file": (pdf_file_path, f)}
headers = {
"Bibcit-Key": "YOUR_API_KEY",
}
response = requests.post(
"https://api.bibcit.com/api/massivepix/ftom",
headers=headers,
files=files,
)
with open("output.md", "w", encoding="utf-8") as f:
f.write(response.text)import fs from 'fs';
const formdata = new FormData();
const pdfFilePath = 'input.pdf';
const pdfContent = new Blob([fs.readFileSync(pdfFilePath)]);
formdata.append("file", pdfContent, pdfFilePath);
const response = await fetch('https://api.bibcit.com/api/massivepix/ftom', {
method: "POST",
headers: {
'Bibcit-Key': 'YOUR_API_KEY',
},
body: formdata,
});
fs.writeFileSync('output.md', await response.text());Converts a PDF or image file to Markdown.
| Parameter | Type | Location | Description |
|---|---|---|---|
| file | binary | body | The PDF/image to convert |
| Bibcit-Key | string | header | Your API key |
Response: Markdown text (text/plain)
js/
f2m.js # JavaScript example
output.md # Sample output
py/
f2m.py # Python example
output.md # Sample output
The API produces clean Markdown with LaTeX math preserved. See js/output.md or py/output.md for full examples.
MIT