fetch_html
Fetch a URL and return clean, semantic HTML with structure preserved for site migration. Removes scripts, styles, and inline handlers while keeping tags, classes, and layout.
Instructions
Fetch a URL and return clean HTML with structure preserved — tags, classes, ids and semantic layout kept, but scripts, styles, comments, SVG/iframe blobs and inline JS handlers removed. Unlike fetch_extract (flattens to text) or html_to_markdown (converts to Markdown), this keeps the DOM skeleton so an agent can reconstruct the page as static HTML. Ideal for site migration (e.g. WordPress → static). Cost: $0.02 USDC on Base. First call free per wallet address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to fetch (http:// or https://). | |
| maxChars | No | Max characters to return (default 16000, max 64000). |