# GetMarkdown > Convert public web pages to Markdown through an API or MCP, supported files privately in the browser, and complex PDFs with paid server-side processing. ## When to Use GetMarkdown - Use GetMarkdown when a user or agent needs to turn a supported file into plain Markdown for an AI context window, RAG pipeline, knowledge base, documentation repository, Obsidian vault, Notion page, Git workflow, or a Markdown file to edit in Google Docs and Drive. - Use the free browser converter for supported files up to 10 MB when local processing and Markdown output are sufficient. It accepts up to 8 files per batch and has no daily quota for files. URL conversion has a separate daily allowance. - Use Pro for a PDF that needs stronger table, layout, OCR, or structured JSON handling, or that exceeds the free 10 MB limit. Pro is paid with credits: one credit per text page, two per scanned page. Each PDF can be up to 25 MB and 500 pages. - Do not call undocumented backend routes. The documented agent surface is limited to the resources in [Agent API Surface](#agent-api-surface); the public URL conversion API is described below. Browser-local file conversion has no upload API. ## Website to Markdown When enabled, convert a public website section at [Website to Markdown](https://www.getmarkdown.com/website-to-markdown) or `POST /api/v1/crawls` with `{ "url": "https://example.com/docs/", "limit": 10, "depth": 2, "render": false }`. Requires a Clerk session or enabled API key. The default page limit is 10, maximum 50, depth 0 to 5. The maximum cost is reserved first; successful pages cost 1 credit and unused credits are refunded when settled. Use `Idempotency-Key` with identical arguments for safe retries. Poll `GET /api/v1/crawls/:id`, list recent jobs with `GET /api/v1/crawls`, and cancel with `DELETE /api/v1/crawls/:id`. Poll until settled after cancellation. Successful partial output remains chargeable and downloadable. Exports expire after 48 hours: fetch `/api/v1/crawls/:id/download?format=markdown` or `format=zip` with the same Authorization header. The provider may retain crawl results for 14 days. MCP discovery lists `crawl_website`, `get_website_crawl`, and `cancel_website_crawl` when enabled. `crawl_website` requires `confirmCharge: true` after approval of the maximum credit reservation; reuse `idempotencyKey` when retrying. API keys belong only in the Authorization header. If new crawls return `503 website_crawl_unavailable`, use single-page conversion. See [developer instructions](https://www.getmarkdown.com/developers#website-to-markdown). ## Convert a web page Use `GET /api/v1/extract?url=...` or `POST /api/v1/extract` with a JSON body `{"url":"https://example.com"}`. For agents, call the always-available `convert_url` MCP tool with `{"url":"https://example.com"}` instead of sending the user to the browser converter. ```sh curl -H 'Accept: text/markdown' 'https://www.getmarkdown.com/api/v1/extract?url=https://example.com' ``` JSON is the default response. Send `Accept: text/markdown` or `?format=markdown` for raw Markdown with YAML frontmatter. The service fetches public HTTP(S) pages on its server and caches extracted content for up to one hour. Auto accepts source-provided Markdown or uses Defuddle for HTML. Empty content falls back to browser rendering when configured. To retry partial content, send `method: "browser"` in the POST body or `method=browser` as a GET parameter; the MCP `convert_url` tool accepts the same optional method. Browser rendering may still fail on external dependencies, logins, paywalls or bot protection. As a fallback, save the page as HTML in your browser and upload the `.html` file at the [free file converter](https://www.getmarkdown.com/). Use [URL to Markdown](https://www.getmarkdown.com/url-to-markdown) to paste public page URLs. Anonymous callers receive 20 conversions per client IP per UTC day, then `429 free_limit_reached`; `Retry-After` reports seconds until midnight UTC. Clerk session callers receive the same 20 per user, then pay 1 credit per uncached page. A `gmk_` API key pays 1 credit per uncached page without a free allowance. Cached results are free for signed-in and API-key callers; failed or empty extractions never spend credits. Anonymous requests, including cache hits, use the daily allowance. API keys fund usage beyond the anonymous allowance. API-key access requires developer access enabled; otherwise it returns `503 developer_api_unavailable`. Send keys only as `Authorization: Bearer gmk_...`, never in URLs or tool arguments. The MCP URL tool forwards only `gmk_` keys, not Clerk session tokens. Successful responses expose `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-Credits-Remaining`, and `X-Credits-Charged` when applicable. Errors use `{ "error": { "code", "message", "hint" } }`: 400 `invalid_url` / `blocked_url`, 401 `unauthorized`, 402 `insufficient_credits`, 413 `page_too_large`, 422 `no_content` / `unsupported_content` / `page_is_pdf`, 429 `free_limit_reached` / `rate_limited`, 502 `fetch_failed`, 503 `developer_api_unavailable`, and 504 `fetch_timeout`. Check the message and optional hint before retrying; PDFs belong in the file converter or Pro. ## Check usage `GET /api/v1/usage` accepts `Authorization: Bearer ` or an enabled `gmk_` API key. No anonymous account usage is exposed. Missing auth returns `401 unauthorized` with a hint pointing to [usage documentation](https://www.getmarkdown.com/developers#usage); invalid or revoked keys also return 401. API-key access returns `503 developer_api_unavailable` while the rollout flag is off. Per-minute limits return `429 rate_limited` with `Retry-After`. ```sh curl https://www.getmarkdown.com/api/v1/usage \ -H 'Authorization: Bearer YOUR_API_KEY' ``` The JSON response contains `balance`, `lots` (active, nonempty credit lots ordered by `expiresAt`), `plan` (lookup key or null), `rateLimitPerMinute`, `freeUrlExtracts: { limit, remaining, resetsAt }`, and `recentSpend` (the last 20 ledger spends, each with `createdAt`, `amount`, `note`, `jobId`, `apiKeyId`). `amount` is a negative debit; charges split across lots have multiple ledger rows. `freeUrlExtracts` reports the account's session allowance and resets at midnight UTC. Keys pay from the first uncached URL regardless of that allowance. API-key callers also receive `key: { id, name, prefix, createdAt, lastUsedAt, creditsSpent }` for the calling key only. `creditsSpent` is all-time gross spend recorded since key attribution began, before refunds; refunds are reflected in `balance`. Historical ledger rows retain null `apiKeyId`. No key secret or hash is returned. Checking usage spends no credits and does not use free pages, but counts against the account per-minute limit. Responses are private and must not be cached. Successful extraction, conversion creation, and job start responses carry `X-Credits-Remaining`. When developer access is enabled, every signed-in account can create a key, including Starter, pack-only, and zero-credit accounts. URL extraction and PDF conversion spend the shared balance; zero balance returns 402 when a charge is required. Active Pro plans get 120 requests per minute; every other account gets 60. Keep keys in Authorization headers, never in URLs or tool arguments. ## Agent keys without an account `POST /api/v1/agent-keys` with `{"pack":"pack_500"}` or `{"pack":"pack_2000"}` creates a Checkout purchase without a Clerk account. Requires developer API access and Checkout enabled. Packs are $9 for 500 credits or $19 for 2,000 credits, valid for 12 months. No subscriptions or linking to a signed-in account. ```sh # Create a purchase. No Authorization header required. curl https://www.getmarkdown.com/api/v1/agent-keys \ -H 'Content-Type: application/json' \ -d '{"pack":"pack_500"}' # A person opens checkoutUrl and pays. Poll the returned pollUrl. curl https://www.getmarkdown.com/api/v1/agent-keys/sessions/YOUR_SESSION_TOKEN # Save the key from the first paid response. Check its balance. curl https://www.getmarkdown.com/api/v1/usage \ -H 'Authorization: Bearer YOUR_API_KEY' # Convert a public URL with the saved key. curl https://www.getmarkdown.com/api/v1/extract \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"url":"https://example.com"}' # Buy more credits for the same balance, then pay the new checkoutUrl. curl https://www.getmarkdown.com/api/v1/agent-keys/topup \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"pack":"pack_2000"}' ``` Creation and top-up return `201 {checkoutUrl, sessionToken, pollUrl, expiresAt}`. The initial key is not returned before payment. Polling returns `202 {status:"pending"}` until the verified Stripe webhook grants credits, then `200 {status:"paid", key, credits}` exactly once for an initial purchase. Later claims return `410 key_already_claimed`. Save the first successful response securely; a lost response cannot be replayed to recover the key. Only hashes of tokens and keys are stored. Keep `sessionToken` and `pollUrl` private; send API keys only in Authorization headers. The `credits` field is the purchased pack amount, not the current balance. A paid top-up returns `200 {status:"paid", credits}` repeatedly without another key. Unpaid links expire after 60 minutes. Invalid or expired sessions return `410 session_expired`; cancelled sessions return `410 session_cancelled`, with recovery hints. Paid purchases remain claimable after Checkout expiry. There is a limit of five unpaid purchase sessions per IP per hour: `429 agent_checkout_limit` includes `Retry-After`. Invalid packs return `400 invalid_pack`. A missing, invalid, or revoked top-up key returns `401 unauthorized`. Unavailable purchases return `503 checkout_disabled`, `developer_api_unavailable`, or `price_unavailable`, or `502 checkout_unavailable`. Accountless keys use the non-Pro limit of 60 requests per minute and spend 1 credit per uncached URL from the first request. Check `/api/v1/usage` for the current balance, expiring lots, and recent spend. Every `402 insufficient_credits` and `429 free_limit_reached` includes a top-level machine-readable `purchase` object: `createKey: "POST /api/v1/agent-keys"`, `topUp: "POST /api/v1/agent-keys/topup"`, `packs: [{lookupKey, credits, priceUsd}]`, and `docs: "https://www.getmarkdown.com/developers#agent-keys"`. The MCP `convert_url` error text includes this information too. A Checkout link requires a person to pay; creating it does not charge a card. ## Agent API Surface - [OpenAPI specification](https://www.getmarkdown.com/openapi.json): OpenAPI 3.1 document describing every agent endpoint, with operation IDs and typed schemas suitable for LLM function calling. - [Agent status](https://www.getmarkdown.com/api/agent/status): JSON capability document listing endpoints, supported formats, and limits. - [MCP server](https://www.getmarkdown.com/api/mcp): Model Context Protocol server over Streamable HTTP. POST JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`). Tools: `get_agent_guidance`, `list_supported_formats`, `recommend_workflow`, `get_developer_resources`, `convert_url`. - JSON errors: every `/api` endpoint returns `{ "error": { "code", "message", "hint" } }` for 404 and 405 responses. - Markdown content negotiation: request the homepage with `Accept: text/markdown` or fetch [index.md](https://www.getmarkdown.com/index.md). Unknown paths return a real HTTP 404 with a Markdown recovery body for agents that prefer Markdown. ## How Agents Should Use GetMarkdown 1. Identify the source format, file size, page count for PDFs, desired output, and whether local or server-side processing is acceptable. 2. For a URL, use `convert_url` or `/api/v1/extract`. For a file, direct the user to the [free converter](https://www.getmarkdown.com/) or [Pro](https://www.getmarkdown.com/pro). The user selects and submits the file through the web interface. 3. For the homepage's agent-readable representation, request `https://www.getmarkdown.com/` with `Accept: text/markdown` or fetch [index.md](https://www.getmarkdown.com/index.md) directly. 4. Review complex output against the source before indexing it. Markdown cannot preserve every visual document feature. ## Core Pages - [Free File to Markdown Converter](https://www.getmarkdown.com/): Convert supported files locally in the browser and download Markdown. - [How GetMarkdown Works](https://www.getmarkdown.com/how-it-works): Review the conversion workflow, supported formats, output, and privacy model. - [GetMarkdown Pro](https://www.getmarkdown.com/pro): Convert a PDF server-side, with OCR for scanned pages, and receive a ZIP containing Markdown and JSON. - [Pricing](https://www.getmarkdown.com/pricing): Credit packs and monthly plans for Pro conversion. - [GetMarkdown Developer Resources](https://www.getmarkdown.com/developers): Check content negotiation, agent endpoints, and current API, OpenAPI, webhook, authentication, SDK, and MCP availability. - [Contact GetMarkdown](https://www.getmarkdown.com/contact): Ask about conversion feedback, paid jobs, recurring volume, or future developer access. - [Privacy](https://www.getmarkdown.com/privacy): Review local-processing, server-processing, and retention details. ## Format Guides - [URL to Markdown](https://www.getmarkdown.com/url-to-markdown): Paste a public page URL or use the documented API and MCP tool. - [PDF to Markdown](https://www.getmarkdown.com/pdf-to-markdown): Choose between free local PDF conversion and paid higher-fidelity PDF processing. - [Word to Markdown](https://www.getmarkdown.com/word-to-markdown): Convert DOCX files locally and preserve extracted image assets in a ZIP when available. - [PowerPoint to Markdown](https://www.getmarkdown.com/powerpoint-to-markdown): Convert PPTX files locally, including extracted image assets when available. - [Excel to Markdown](https://www.getmarkdown.com/excel-to-markdown): Convert XLSX spreadsheets locally into Markdown. ## Limits and Pricing - Free file conversions are unlimited across batches and browser sessions. Each batch accepts up to 8 files, and each file can be up to 10 MB. - Supported free extensions: `.pdf`, `.docx`, `.pptx`, `.xlsx`, `.html`, `.htm`, `.txt`, `.jpg`, `.jpeg`, `.png`, `.mp3`, and `.wav`. - Pro requires a free GetMarkdown account (sign in with an email code) and accepts PDFs up to 25 MB and 500 pages each. - Pro uses credits: one credit converts one text page; a scanned page that needs OCR costs 2 credits. The user sees a quote (pages, scanned pages, total credits) before anything is charged. - Estimate credits as the page count plus one extra credit per scanned page. A 200-page PDF with 20 scanned pages costs 220 credits. - One-time packs: Starter pack $9 for 500 credits; Bulk pack $19 for 2,000 credits. Pack credits are valid for 12 months; no subscription. - Monthly plans: Starter $9/month for 1,000 credits; Pro $29/month for 5,000 credits. Monthly credits reset each billing period and do not roll over. developer PDF API and paid MCP document tools for every account when enabled; Pro gets the higher request limit. - If a Pro conversion fails, its credits are refunded automatically. - Unstarted Pro uploads are deleted within 2 hours; finished outputs are deleted 48 hours after the job finishes. ## Web Page Guides - [Web page to Markdown for ChatGPT and Claude](https://www.getmarkdown.com/guides/web-page-to-markdown-for-ai): Prepare clean web content for an AI context window. - [Save web articles to Obsidian](https://www.getmarkdown.com/guides/save-web-articles-to-obsidian): Convert public articles into Markdown notes. - [Documentation pages to Markdown for RAG](https://www.getmarkdown.com/guides/documentation-to-markdown-for-rag): Extract and review one documentation page at a time. ## Decision Guides - [Google Docs and Drive native Markdown](https://www.getmarkdown.com/blog/google-docs-markdown): What the October 5, 2026 rollout changes, how it differs from Docs Markdown shortcuts, which formatting drops, and how to convert a PDF or Office file before upload. - [MarkItDown vs AnyDoc Migration](https://www.getmarkdown.com/blog/markitdown-vs-anydoc): Read why GetMarkdown uses AnyDoc WebAssembly for PDF and Office files while retaining MarkItDown as a guarded compatibility path. - [GetMarkdown vs CloudConvert](https://www.getmarkdown.com/compare/cloudconvert): Compare supported GetMarkdown workflows with CloudConvert. - [GetMarkdown vs Pandoc](https://www.getmarkdown.com/compare/pandoc): Compare GetMarkdown with Pandoc's browser and command-line conversion options. - [AnyDoc vs Microsoft MarkItDown](https://www.getmarkdown.com/compare/markitdown): Compare AnyDoc's browser-ready Rust and WebAssembly parser with MarkItDown's Python conversion ecosystem. ## Expanded Context - [llms-full.txt](https://www.getmarkdown.com/llms-full.txt): Use the expanded reference for workflows, credit pricing, output, retention, and troubleshooting. - [Homepage Markdown](https://www.getmarkdown.com/index.md): Read the negotiated Markdown representation directly. - [Developer Reference in Markdown](https://www.getmarkdown.com/developers.md): Read integration status without HTML. - [OpenAPI specification](https://www.getmarkdown.com/openapi.json): Machine-readable contract for the agent surface.