Skip to content

New: deep research, balance and auto-reload tools in the keyless MCP server. Install in one line

Reader /r/

Any public URL as Markdown in one GET. Add ?q= to keep only the chunks relevant to a question.

GET/r/{url}

Try it

Credits: 1

Any public URL as Markdown (text/markdown). Add ?q= to prune the page to the chunks relevant to a question.

Parameters

NameInTypeRequiredDescription
urlpathstringyesFull http(s) URL. GitHub blob URLs are read as raw files, arXiv PDFs as their HTML versions.
qquerystringnoQuestion or topic to prune to.

Example request

curl -si "https://api.contextfetch.dev/r/https://docs.python.org/3/library/asyncio-task.html?q=task+groups" \  -H "Authorization: Bearer YOUR_API_KEY"

Example response

HTTP/2 200
content-type: text/markdown; charset=utf-8
x-token-savings: 91.0
x-raw-tokens: 18240
x-output-tokens: 1650

## Task Groups
...

Response headers

HeaderMeaning
X-Token-SavingsPercent saved: Markdown vs raw HTML, or pruned vs full Markdown when q is given.
X-Raw-TokensTokens before, ceil(chars / 4).
X-Output-TokensTokens returned.
X-Credits-RemainingOn every billable response: free requests left today for keyless calls, credits left for a paid key.

Errors

StatusBodyWhen
400{"error": "url_not_allowed"}The URL is not public http(s): private, loopback, link-local and similar addresses are rejected, also after redirects.
401{"error": "invalid_api_key"}The key is unknown.
402{"error": "insufficient_credits" | "keyless_limit", "message": "...", "checkout_url": "...", "pricing": {...}, "packs": [...], "action": {"type": "payment_link", "url": "https://api.contextfetch.dev/buy/instant", "prompt_to_user": "..."}}Out of credits, or the keyless allowance is used up. Also sends X-Payment-URL.
502{"error": "fetch_failed", "message": "..."}The target page could not be fetched.