Scrape URL to markdown
scrape_url_to_markdownWebpage to Markdown: convert any URL to clean Markdown. Convert a webpage URL to clean, LLM-ready Markdown for RAG and agents. Scrape URL to markdown / web scraping to markdown — public webpage to clean Markdown (headings, lists, links, tables, code) plus text and SHA-256. Same engine and prices as web/read with format=markdown by default: $0.003 per URL Base ($0.006 Algorand); batch of 2-10 urls $0.003/URL; render=true for JavaScript pages $0.01/URL. Failed reads not settled. Price (USDC): Base single $0.003, batch_per_url $0.003, render_per_url $0.01, safe_per_url $0.001; Algorand single $0.006, batch_per_url $0.006, render_per_url $0.02, safe_per_url $0.002. Paid per call with x402 v2 (params._meta["x402/payment"]).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public HTTP/HTTPS URL; ports 80/443 and public IPv4 resolution only. Use url or urls, not both. | |
| safe | No | Add a prompt-injection scan of each page (safety: verdict clean/suspicious/injection, score, flagged excerpts). +$0.001 per URL on Base (+$0.002 Algorand). | |
| urls | No | Batch of up to 10 public URLs. 2-10 URLs are priced $0.003 each on Base ($0.006 Algorand). Charged in full if at least one URL succeeds; per-URL errors are returned inline. | |
| format | No | markdown adds markdown + markdown_sha256 (text is still returned) | markdown |
| render | No | Execute JavaScript in headless Chromium before extraction. $0.01 per URL on Base ($0.02 Algorand). Images, media and fonts are not loaded. | |
| selector | No | Optional CSS selector (e.g. "main", "#pricing", "article .changelog"). Only the first matching element is extracted; no match returns 422 SELECTOR_NOT_FOUND and nothing is settled. HTML only. | |
| max_chars | No | Maximum returned characters per URL (applies to text and markdown separately) |