Document parsing API: PDFs, scans, tables, charts and forms to Markdown
Webcite's document parsing API reads a PDF, scan, slide deck or spreadsheet page by page and returns Markdown, with tables, charts and form fields kept in place and every element carrying its position on the page. The read below is a saved response for a public IRS form.
Last updated
A saved read of a public form
Form W-9, page 1, from the IRS, read on 24 November 2026. The page was classified as a form and came back as 45 elements, each with a bounding box in page coordinates from 0 to 1. The read cost 0.4966 credits. Three elements are shown; nothing else is changed.
{
"format": "pdf",
"state": "complete",
"units": [
{
"kind": "page",
"index": 1,
"reader": {
"page_type": "form"
},
"extraction_method": "ocr",
"elements": [
{
"type": "text",
"markdown": "Form **W-9** \n(Rev. March 2024) \nDepartment of the Treasury \nInternal Revenue Service",
"bbox": [
0.05872457486494331,
0.0448175558839257,
0.19542535848792816,
0.10306223020890928
]
},
{
"type": "title",
"markdown": "# Request for Taxpayer Identification Number and Certification",
"bbox": [
0.30102168495309733,
0.04781959115681964,
0.6993639285090649,
0.08171085992110318
]
},
{
"type": "text",
"markdown": "**Go to *www.irs.gov/FormW9* for instructions and the latest information.**",
"bbox": [
0.2808420826304612,
0.09019152900609942,
0.7189029945298423,
0.10099802622217478
]
}
]
}
],
"usage": {
"credits": 0.4966,
"pages": 1,
"page_charges": [
{
"page": 1,
"page_type": "form",
"credits": 0.4966
}
]
}
}A table keeps its structure
A summary table from the Bureau of Labor Statistics release for October 2026, read on 24 November 2026 for 0.3981 credits. Merged header cells come back as rowspan and colspan in an HTML table inside the Markdown. The first rows:
**HOUSEHOLD DATA**
# Summary table A. Household data, seasonally adjusted
[Numbers in thousands]
<table><thead><tr><th rowspan="2">Category</th><th rowspan="2">Oct. 2025</th><th rowspan="2">Aug. 2026</th><th rowspan="2">Sept. 2026</th><th rowspan="2">Oct. 2026</th><th>Change from:</th></tr><tr><th>Sept. 2026- Oct. 2026</th></tr></thead><tbody><tr><th colspan="6">Employment status</th></tr><tr><td>Civilian noninstitutional population<sup>1</sup></td><td>–</td><td>275,415</td><td>275,554</td><td>275,682</td><td>128</td></tr><tr><td>Civilian labor force</td><td>–</td><td>169,777</td><td>170,262</td><td>170,683</td><td>421</td></tr><tr><td>Participation rate</td><td>–</td><td>61.6</td><td>61.8</td><td>61.9</td><td>0.1</td></tr>Benchmark result
In its own full run, Webcite scored 91.74 overall on ParseBench 2, the public document parsing benchmark. How the runs were made.
What it reads
- PDF, JPEG and PNG pages are read with layout elements: typed blocks such as titles, text, tables and pictures, each with a bounding box.
- Spreadsheets, DOCX, PPTX, HTML and text files are read from the file itself and cost 0 credits.
- Files up to 100 MB. Extraction counts at half of your plan's request limits: 25 a minute and 250 a day on Free.
- A page that cannot be read is not charged, and one page is never charged more than 10 credits.
Two modes: lite and standard
| Mode | Typical credits a page | Use it for |
|---|---|---|
| Lite | 0.05 to 0.23 | High-volume plain documents |
| Standard | About 0.74 | Complex tables, handwriting and scans, where it is more accurate |
Extraction is charged at cost, at $0.04 a credit. From 1 December 2026 the average standard page costs about 1.27 credits. What a document costs lists each page type, and the best document parsing APIs compares providers.
Make the first call
Upload the file, then extract it with the returned data.asset_id. Extraction returns when every page is read, so allow a long timeout.
curl --fail-with-body -X POST https://api.webcite.co/api/v1/upload \
-H "x-api-key: $WEBCITE_API_KEY" \
-F "file=@./report.pdf"
curl --fail-with-body --max-time 900 -X POST https://api.webcite.co/api/v1/extract \
-H "x-api-key: $WEBCITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"asset_id":"YOUR_ASSET_ID","mode":"standard"}'import { readFile } from "node:fs/promises";
const API = "https://api.webcite.co/api/v1";
const headers = { "x-api-key": process.env.WEBCITE_API_KEY! };
const form = new FormData();
form.append("file", new Blob([await readFile("report.pdf")]), "report.pdf");
const upload = await fetch(`${API}/upload`, { method: "POST", headers, body: form });
if (!upload.ok) throw new Error(await upload.text());
const { data } = await upload.json();
const extract = await fetch(`${API}/extract`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({ asset_id: data.asset_id, mode: "standard" }),
signal: AbortSignal.timeout(900_000),
});
if (!extract.ok) throw new Error(await extract.text());
const doc = await extract.json();
console.log(doc.state, doc.usage.credits, doc.markdown.slice(0, 500));The extraction quickstart has the same calls in Python, and the extract endpoint reference lists every field of the response. A new account starts on the Free plan with 100 credits.
Use the TypeScript SDK
The TypeScript SDK wraps the same calls: npm install webcite installs it, and npx webcite runs its command line tool. It reads the key from WEBCITE_API_KEY.
The same two calls read the saved IRS form. The last block is the recorded output, printed from the same saved response.
npm install webciteimport { readFile } from "node:fs/promises";
import { Webcite } from "webcite";
const client = new Webcite();
const bytes = new Uint8Array(await readFile("irs-form-w9-page-1.pdf"));
const { data } = await client.upload(bytes, { filename: "irs-form-w9-page-1.pdf" });
const doc = await client.extract({ asset_id: data.asset_id, mode: "standard" });
console.log(doc.state, doc.usage?.credits);
console.log(doc.markdown?.split("\n")[0]);complete 0.4966
Form **W-9**After the read: check and cite
- Anchored chunks split the read into chunks that keep their page, sheet or section location, for retrieval.
- Fact-check API: check a claim from the document against sources and get a verdict with quotes.
- Citation API: bind each answer to the exact quote, page or spreadsheet cell.
- Analyze document figures: extract the numbers, then recompute and compare them.
Inside your own boundary
For documents that cannot leave your environment, Webcite runs self-managed in your own cloud tenant, with model calls kept inside it. Enterprise deployments.
Create a free account