{"uid":"cap_O-vGYO77-RWLXQm2w8iVj","slug":"context-relay-web-page-to-llm-ready-markdown-826f38db","name":"Context Relay – Web Page to LLM-Ready Markdown","description":"URL-to-Markdown web extraction and context compression for AI agents. Fetch a public web page and return clean, task-relevant, citation-verifiable LLM context with exact excerpts, locators, hashes, and estimated tokens saved. Use before an agent summarizes, answers questions from, or cites a long or noisy URL. Deterministic and model-free. Public HTML only; no PDFs, logins, or JavaScript-only pages.","url":"https://context-relay.contextrelay.workers.dev/api/v1/context","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":4096,"description":"Public HTTP or HTTPS page to retrieve."},"question":{"type":"string","maxLength":2000,"description":"Optional task or question used to rank relevant passages."},"max_tokens":{"type":"integer","default":4000,"maximum":12000,"minimum":250},"max_price_usd":{"type":"number","minimum":0,"description":"Abort before retrieval if the fixed service price exceeds this amount."},"freshness_seconds":{"type":"integer","default":3600,"maximum":86400,"minimum":60}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lazUeqEaDFl1Nm2Bj1Irm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a public web page URL into compact, LLM-ready Markdown with relevant passages, source excerpts, provenance hashes, and token-savings estimates.","exampleAgentPrompt":"Grab the content from https://en.wikipedia.org/wiki/Large_language_model and convert it into compact LLM-ready markdown, pulling out only the passages most relevant to how transformers work — I want to minimize tokens and get provenance info.","exampleUseCases":[{"title":"Summarize a news article efficiently","prompt":"Pull the article at https://www.bbc.com/news/technology-67890123 and convert it to clean markdown with just the relevant passages — I want to summarize it without blowing my context window."},{"title":"Cite a research blog post in an answer","prompt":"Before I answer the user's question about vector databases, fetch https://www.pinecone.io/learn/vector-database/ and turn it into LLM-ready markdown with source excerpts and locators so I can cite it accurately."},{"title":"Reduce token cost for documentation Q&A","prompt":"Convert the content at https://docs.stripe.com/payments/payment-intents into compact markdown focused on the authentication flow — include the token savings estimate so I can log it."}],"resultDescription":"Returns a compact Markdown representation of the target web page, including task-relevant passages, exact source text excerpts with locators (e.g. heading paths or paragraph IDs), a provenance hash for the source document, and an estimated count of tokens saved versus a raw HTML fetch. The output is deterministic and model-free — the same URL produces the same result.","failureModes":["URL points to a login-gated or paywalled page — returns error or empty content","URL serves a JavaScript-rendered SPA with no static HTML — not supported","URL points to a PDF or non-HTML document — not supported","URL is unreachable or returns a non-200 status — returns fetch error","Malformed or non-public URL — returns validation error","Rate limit or payment failure (x402) — returns 402 or 429 status"],"whenToPreferThis":"Choose this endpoint when you need to ingest a public web page into an LLM context efficiently and want to avoid wasting tokens on raw HTML boilerplate, navigation chrome, and ads. It is ideal for RAG pipelines, citation tasks, and summarization workflows where provenance and reproducibility matter. Prefer it over raw HTTP fetches when the page is long or noisy. Not suitable for PDFs, login-gated pages, or JavaScript-only single-page apps.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:39:14.679Z","isFirstParty":false}