Clone a website section
clone_sectionExtract a section from any webpage into a standalone snippet: cleaned HTML, scoped CSS, assets, and screenshot. Rewrites asset URLs for portability.
Instructions
Return a self-contained copy of one section: cleaned HTML (scripts/handlers stripped, inline SVG preserved), scoped CSS matching that subtree plus the @keyframes/@font-face it depends on, its assets, and a screenshot. With outputDir the assets are downloaded and URLs rewritten to relative paths, yielding a snippet that renders standalone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http:// or https:// URL to clone from. | |
| selector | Yes | CSS selector for the section to clone. | |
| maxAssets | No | Maximum assets to download when outputDir is set. | |
| outputDir | No | Absolute directory to download the section's assets into (URLs are rewritten to relative paths). | |
| timeoutMs | No | Navigation timeout in milliseconds. | |
| userAgent | No | Optional browser user-agent override. | |
| waitUntil | No | Page lifecycle event to await before extraction. | domcontentloaded |
| autoScroll | No | Scroll through the page before extraction to trigger lazy-rendered content. | |
| maxScrolls | No | Maximum viewport-sized scroll steps when autoScroll is enabled. | |
| viewportWidth | No | Browser viewport width in CSS pixels. | |
| viewportHeight | No | Browser viewport height in CSS pixels. | |
| maxBytesPerAsset | No | Skip assets larger than this. | |
| includeScreenshot | No | Include a screenshot of the cloned section. | |
| allowPrivateNetwork | No | Allow localhost and private-network URLs. Enable only for trusted sites. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |