Archive Page
web.page.archive
Archive one public webpage into durable offline artifacts for saved-page collections. Returns best-effort self-contained HTML and ZIP snapshots with CSS/images/fonts/media/scripts rewritten or packed, plus optional PDF when a Chrome/Chromium backend is configured.
Request
curl -X POST https://data.upscrape.com/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"formats":["single_html","zip"],"include_scripts":false,"url":"https://example.com/"},"capability":"web.page.archive"}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
formats
| array<string> | optional | Archive artifact formats to return. single_html is a self-contained HTML snapshot, zip contains index.html plus local assets, and pdf requires a configured Chrome/Chromium backend. If a requested single_html artifact is too large for the worker-result budget and zip was not requested, the module may return a zip fallback. |
include_scripts
| boolean | optional | Preserve external and inline scripts. Defaults to false because archived arbitrary JavaScript should only be replayed in a sandboxed viewer. |
max_asset_bytes
| integer | optional | Requested maximum bytes to download for a single CSS/image/font/script/media asset. The module may clamp this lower to keep the worker result under platform size limits. |
max_total_asset_bytes
| integer | optional | Requested maximum bytes to download across all archived assets. The module may clamp this lower to keep the worker result under platform size limits. |
url
| string | required | Public http(s) URL to archive. |