"---\nname: web-to-markdown-x402\ndescription: Extract clean markdown, metadata, and links from any web page using the x402 pay-per-call API. USDC micropayments on Base, no API keys.\n---\n\n# Web to Markdown API\n\nUse this skill when you need clean, readable content from a web page (for RAG,\nresearch, summarization) or page metadata/links. Payment is automatic via x402:\nyou send a request, the server returns HTTP 402 with payment requirements, you\nsign a USDC payment, and retry. No signup, no API key.\n\n## Endpoints\n\n| Endpoint | Price | What it returns |\n| --- | --- | --- |\n| GET /extract?url=U | $0.002 | Clean markdown: title, content, content_length |\n| GET /meta?url=U | $0.002 | title, description, canonical, og, twitter |\n| GET /links?url=U | $0.002 | All links: href, text, type (internal/external) |\n| GET /images?url=U | $0.002 | All images: src, alt, width, height, type |\n| GET /redirect?url=U | $0.002 | URL redirect chain: final URL, status codes, hops |\n| GET /headings?url=U | $0.002 | Heading structure: h1-h6 tree, flat list + nested |\n| GET /pdf?url=U | $0.002 | PDF text extraction: title, content, pages |\n| GET /struct?url=U | $0.002 | JSON-LD, schema.org microdata, RDFa links |\n| POST /batch {\"urls\":[...]} | $0.005 | Up to 10 URLs extracted to markdown |\n\n## Base URLs\n\n- ScoutGate proxy (Base mainnet, recommended for agents):\n  https://x402-scoutgate.onrender.com/api/feb84339 (extract)\n  https://x402-scoutgate.onrender.com/api/351e5037 (meta)\n  https://x402-scoutgate.onrender.com/api/fac88667 (links)\n  https://x402-scoutgate.onrender.com/api/3e6f712b (struct)\n  https://x402-scoutgate.onrender.com/api/0f254ecc (batch, POST)\n  https://x402-scoutgate.onrender.com/api/29a3d126 (images)\n  https://x402-scoutgate.onrender.com/api/d921e21d (redirect)  \n  https://x402-scoutgate.onrender.com/api/97950507 (headings)\n- Direct: https://zero-internationally-santa-optimize.trycloudflare.com\n\n## Image extraction\n\n- GET /images?url=<url> extracts all images (src, alt text, width, height, type) from a web page.\n- Includes <img> tags, <picture> <source> elements, and Open Graph images.\n- Deduplicates by URL, returns absolute URLs. $0.002.\n\n## PDF extraction\n\n- GET /pdf?url=<pdf-url> extracts full text from PDF files (research papers, reports, whitepapers).\n- Returns: title (from PDF metadata), content, content_length, pages. $0.002.\n\n## Example flow (Python with x402)\n\n```python\nimport httpx\nfrom x402 import x402Client\nfrom x402.mechanisms.evm.exact import ExactEvmScheme\n\nclient = x402Client()\nclient.register(\"eip155:*\", ExactEvmScheme(signer=account))\n\nresp = httpx.get(\"https://x402-scoutgate.onrender.com/api/feb84339\",\n                 params={\"url\": \"https://example.com\"})\n# resp.status_code == 402 -> pay and retry with your x402 client\n```\n\n## Guidance\n\n- Use /extract for RAG/reading; /meta for link previews/SEO checks; /links for crawling.\n- Use /images to find all images on a page for knowledge base enrichment or media analysis.\n- Use /pdf for PDF files (papers, reports) — returns full extracted text.\n- Use /batch when extracting multiple pages to save 50%.\n- Errors: 402 = payment required (normal first response); 502 = upstream fetch failed.\n"