API & MCP

PDF in.
Clean Markdown out.

One REST call — or a native MCP server your AI agent can use directly. Markdown, structured elements and embedding-ready chunks with source traceability. And with Doc Links, your agent can publish a PDF as a tracked link and follow who reads it.

Get your free API key

Free tier · no credit card · anonymous trial without a key

REST in one call

POST a PDF URL, get the canonical ExtractedDocument back — synchronously. Doc Links have REST endpoints too (/api/v1/links) — each tool below shows its REST mirror. OpenAPI spec (JSON)

curl -X POST https://doc.page/api/v1/extract \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer dk_live_..." \
  -d '{
    "url": "https://example.com/report.pdf",
    "outputs": ["markdown", "elements", "chunks"]
  }'
{
  "schemaVersion": "1.0",
  "source": { "engine": "server-pdfjs", "pages": 12 },
  "markdown": "# Title\n...",
  "elements": [{ "id": "el_0001", "type": "heading", "page": 1, "text": "Title" }],
  "chunks":   [{ "id": "ch_0001", "text": "...", "tokens": 486, "page": 1,
                 "section": "Introduction", "elementIds": ["el_0002"] }]
}

Native MCP server

Point your agent at the endpoint and it can read PDFs — and publish tracked Doc Links — by itself. Works with Claude Code, Claude Desktop, Cursor and any MCP client.

claude mcp add --transport http docpage https://doc.page/api/mcp
{
  "mcpServers": {
    "docpage": {
      "type": "http",
      "url": "https://doc.page/api/mcp",
      "headers": { "Authorization": "Bearer dk_live_..." }
    }
  }
}

Tools

  • extract_pdf — Full extraction: Markdown + structured elements, optional chunks. mode "hybrid" adds reconstructed tables and bounding boxes. REST: POST /api/v1/extract
  • get_chunks — Semantic chunks sized to your token budget, each with page, section heading and source element ids.
  • list_tables — Every table in the PDF as structured rows and columns, each with page and bounding box for verifiable citations.
  • create_doc_link API key — Publish a PDF as a tracked doc.page link (expiry, open notifications). The link shows up in your library like any Doc Link. REST: POST /api/v1/links
  • list_doc_links API key — List the account's Doc Links with their state and total views — how an agent finds links it created in earlier sessions. REST: GET /api/v1/links
  • get_doc_link_stats API key — Reading analytics for one link: visits, captured emails, countries, visitor companies and per-page reading time. REST: GET /api/v1/links/:id
  • revoke_doc_link API key — Disable a link so it stops serving. The document and its stats stay in the library; free-plan slots are freed. REST: DELETE /api/v1/links/:id
  • classify_document coming soon — Route documents without full extraction: type (invoice, contract, CV…), language, native text vs. scan, OCR need.

What you get back

Every response is the same canonical object, whatever the engine:

Two engines, one schema: the default "fast" engine is prose-focused (no tables/bbox); "hybrid" runs a heavier semantic engine that reconstructs tables and bounding boxes. If hybrid is temporarily unavailable, responses fall back to fast with an explicit warning.

Built for real-world documents

Where it shines

  • Business reports and financial statements with regular, ruled tables
  • Invoices, delivery notes and order forms — line items out as structured rows
  • Contracts, policies and legal prose with clean heading hierarchy
  • Technical manuals and documentation, straight into RAG pipelines
  • Books, articles and long-form prose for summaries or audio

Where to be careful

  • Borderless academic tables with math notation may come back as text, not structured rows — the content is never lost, but check confidence.tables
  • Dense tables with merged multi-row cells can lose some alignment
  • Scanned PDFs (no text layer) are not supported yet — OCR is on the roadmap

Limits & plans

No keyFree keyPremium
Pages / month50010,000
Requests / minute1060
Extractions / day25 per IPby quotaby quota
Max PDF size25 MB25 MB25 MB

Create and manage keys in your account settings ("API keys" tab). A page is counted per page of the processed PDF.

Free key

$0

500 pages every month. No credit card.

Create your free key

Premium

$4.99 per month

10,000 pages every month — plus everything Premium unlocks in Doc Links.

Go Premium — $4.99/mo

Credit packs

$5 / $30

One-time payment. Credits never expire and are used once your monthly quota runs out.

Errors

Frequently asked questions

Do you store the PDFs I send?

Extraction tools: no — the document is fetched, processed in memory and discarded; only aggregate usage counters (pages, requests) are stored for metering. The one exception is create_doc_link, whose whole point is hosting: that PDF is stored in your library until you revoke or delete the link.

Is there really a free tier?

Yes, two: without any key you get a small daily allowance per IP to try it, and a free API key gives you 500 pages per month.

Does it handle scanned PDFs (OCR)?

Not yet. The current engine extracts the text layer of digital PDFs. OCR is planned as part of the hybrid mode.

Does it reconstruct tables?

Yes — use mode "hybrid" or the list_tables tool. A heavier semantic engine reconstructs each table as structured rows and columns, with its page and bounding box so you can cite the exact source. The default "fast" engine remains prose-only.

Why an MCP server?

So AI agents can use doc.page without any integration code: connect the endpoint once and the agent extracts PDFs or pulls RAG chunks in natural language.

Can my agent share documents and track readers?

Yes. With a free API key it can call create_doc_link to publish a PDF as a tracked doc.page link (up to 3 active links on the free plan), list_doc_links to recover them in later sessions, get_doc_link_stats for visits, captured emails and per-page reading time, and revoke_doc_link to disable a link. Every link also shows up in your web library.