# PDF Inspector > Hosted API and MCP server that runs Firecrawl's fast open-source pdf-inspector library for you: any PDF to clean, LLM-ready Markdown (headings, lists, tables, multi-column reading order). Pages with real text are extracted in milliseconds; scanned pages are OCR'd automatically. Zero data retention. Usable without a key. Independent service, not affiliated with Firecrawl. Getting access (no human needed): - No key: one test call per day per IP, up to 10 text pages, no OCR. There is no free tier. - Fastest path for agents: `GET https://api.pdfinspector.com/md/` returns plain Markdown (text/markdown). Works with any web-fetch tool. - For real use: `POST https://api.pdfinspector.com/v1/keys` with optional JSON `{"email": "...", "name": "...", "agent": "..."}`. No auth needed. Returns `{ key, credits_remaining: 0, checkout_url }`. Store `key` as the secret `PDFINSPECTOR_API_KEY` (never in code) and give `checkout_url` to your user. The key works once they buy credits. - Check limits: `GET /v1/usage`. - Errors include `next_action` (`create_key`, `buy_credits`, `retry_after`, `fix_request`) telling you what to do next. Buying credits is always done by a human via the given link. Key facts for agents writing an integration: - Endpoint: `POST https://api.pdfinspector.com/v1/convert` - Auth header: `Authorization: Bearer `. Read the key from the env var/secret `PDFINSPECTOR_API_KEY`. - `sk_` keys are secret: call the API from a server, API route or edge function only. Never ship them to the browser. - `pk_` keys are publishable: allowed in frontend code, restricted to allowed origins. - Body: `multipart/form-data` with field `file` (the PDF), or JSON with `url` or `file_base64`. - Optional: `pages` (1-indexed, e.g. "1-3,7"), `ocr` ("auto" default | "off" | "force"), `per_page` (bool), `webhook_url`. - Response 200: `{ pdf_type, confidence, page_count, markdown, pages_ocr[], pages_needing_ocr[], pages_with_tables[], pages_with_columns[], has_encoding_issues, metadata{}, processing_time_ms, usage{pages, ocr_pages, credits_used, credits_remaining} }`. - `markdown` is the main output. Tables are Markdown tables inside it. - Response 202 (more than 50 pages or webhook_url set): `{ id, status: "processing" }`, poll `GET /v1/jobs/{id}`. - Documents with scanned pages take a few seconds: show a progress state. - It does NOT extract fields (invoice numbers, totals, names). To get fields, send `markdown` to an LLM with a prompt asking for JSON. - Classify without converting (uses no credits, fast): `POST /v1/inspect`. - Errors: `{ error: { code, message, next_action, docs } }`. Show `error.message` to the user; it explains the fix. - Limits: 50 MB, 500 pages per file. - MCP: remote Streamable HTTP server at `https://pdfinspector.com/mcp` with tools `pdf_to_markdown`, `inspect_pdf`, `get_job`, `create_api_key`, `get_usage`. Without auth it allows the daily test call; otherwise OAuth (dynamic client registration) or bearer key. ## Docs - [Full docs as plain text](https://pdfinspector.com/llms-full.txt): everything in one file, with code for Supabase/Lovable, Next.js/v0, Node and Python - [API reference](https://pdfinspector.com/docs/): parameters, response, OCR behavior, errors, limits, jobs - [OpenAPI 3.1 spec](https://pdfinspector.com/openapi.json): machine-readable API definition - [MCP server card](https://pdfinspector.com/.well-known/mcp.json): MCP endpoint, transport, auth and tools ## Integrations - [Lovable](https://pdfinspector.com/integrations/#lovable): edge function + secret, copy-paste prompt - [Bolt.new](https://pdfinspector.com/integrations/#bolt): server route or publishable key - [v0](https://pdfinspector.com/integrations/#v0): Next.js route handler - [Replit](https://pdfinspector.com/integrations/#replit): Secrets + Replit Agent prompt - [Cursor](https://pdfinspector.com/integrations/#cursor): .cursor/mcp.json - [Windsurf](https://pdfinspector.com/integrations/#windsurf): mcp_config.json - [Claude](https://pdfinspector.com/integrations/#claude): custom connector - [Claude Code](https://pdfinspector.com/integrations/#claude-code): `claude mcp add --transport http pdfinspector https://pdfinspector.com/mcp` ## Optional - [Pricing](https://pdfinspector.com/#pricing): credits, 1 page = 1 credit, 1 OCR page = 15 credits. No free tier; without a key, one test call per day. Packs: $10 = 10,000 credits (valid 12 months). Builder $12/month = 20,000 credits; Scale $49/month = 100,000 credits (monthly credits don't roll over). - [Zero data retention](https://pdfinspector.com/docs/#privacy): files and results are deleted right after processing; nothing is kept permanently or used for training - [Sign up](https://pdfinspector.com/signup): get an API key