# Archive page (compatibility)

Compatibility alias for saved-page capture with automatic inline or hosted delivery up to 50 MB per asset and 500 MB total. Returns explicit outcome and fidelity, requested versus effective asset budgets, per-asset failures, and an embedded upscrape-manifest.json in ZIP artifacts. New integrations should use web.page.capture.

- Platform: [Universal Web](https://docs.upscrape.com/docs/platforms/web)
- Capability ID: `web.page.archive`
- Cost: 1 credit per request
- Maximum runtime: 600 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "formats": [
      "single_html",
      "zip"
    ],
    "include_scripts": false,
    "url": "https://example.com/"
  },
  "capability": "web.page.archive"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accept_statuses` | `array<integer>` | No |  |
| `allow_browser_fallback` | `boolean` | No | Default: `false`. |
| `allow_truncated` | `boolean` | No | Default: `false`. |
| `delivery` | `string` | No | auto returns small artifacts inline and switches requests above inline safety budgets to a hosted ZIP with a signed download URL. inline keeps the 3 MB per-asset and 5 MB total effective caps. hosted allows up to 50 MB per asset and 500 MB total. Allowed values: `auto`, `inline`, `hosted`. Default: `auto`. |
| `formats` | `array<string>` | No | Archive artifact formats to return. single_html is a self-contained HTML snapshot and zip contains index.html plus local assets. Oversized single_html output may fall back to zip. Allowed values: `single_html`, `zip`, `source`, `all`. |
| `include_scripts` | `boolean` | No | Preserve external and inline scripts. Defaults to false because archived arbitrary JavaScript should only be replayed in a sandboxed viewer. Default: `false`. |
| `max_asset_bytes` | `integer` | No | Requested maximum bytes to download for a single CSS/image/font/script/media asset. Inline delivery is effectively capped at 3 MB; hosted delivery supports the requested limit up to 50 MB. From 1024 to 50000000. Default: `1000000`. |
| `max_body_bytes` | `integer` | No | From 1 to 104857600. |
| `max_total_asset_bytes` | `integer` | No | Requested maximum bytes to download across all archived assets. Inline delivery is effectively capped at 5 MB total; hosted delivery supports the requested limit up to 500 MB total. From 1024 to 500000000. Default: `4000000`. |
| `max_total_bytes` | `integer` | No | From 1 to 104857600. |
| `url` | `string` | Yes | Public http(s) URL to archive. |

### Example input

```json
{
  "formats": [
    "single_html",
    "zip"
  ],
  "include_scripts": false,
  "url": "https://example.com/"
}
```

## Response

Successful output is returned in `results[0].data`.

Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This example shows one response. Values and optional fields vary with the data available.

```json
{
  "artifacts": [
    {
      "bytes": 1133,
      "content_type": "text/html; charset=utf-8",
      "data": "<!DOCTYPE html><html lang=\"en\"><head><title>Example Domain</title><link rel=\"icon\" href=\"data:,\"/><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style><meta name=\"upscrape-archive-version\" content=\"web-archive-2026-07-09-v4\"…",
      "encoding": "utf-8",
      "filename": "[redacted:token].html",
      "kind": "single_html",
      "sha256": "[redacted:token]"
    },
    {
      "bytes": 718,
      "content_type": "application/zip",
      "data": "[redacted:token]/gVYC7Mi0/[redacted:token]+e/f59vHrwz1rkjWVHFZmwG3LDF1WyQZBVzJRMljd/wDbGmR33gI5mU+[redacted:token]+AijxioPjbLwxgT6SeK5fwC7VFTf/AtKEp7sZhfH0EMCmcgeoqUUB+UNz6Is/[redacted:token]//ke93lD5QFtyYHgXzAlfk1IbRZ7j1KG58jb/iEpBm7qAmsNpO6Zsrvlq/bhai4uFWFx9e2UaruH4vaO+zG4nBP+CqguU9vzBG1L7EyqNNXQm8RgU++9sfVNENPX4wUZzsI3xG1EwstsPYyxqgg+jxl68FzWunYtQIydnyOEJumCTA/5CXrCoArUnAc4/44tBrEP1/lkdwL6bzWnO…",
      "encoding": "base64",
      "filename": "[redacted:token].zip",
      "kind": "zip",
      "sha256": "[redacted:token]"
    }
  ],
  "assets": [],
  "capture_backend": "http",
  "captured_at": "2026-08-23T23:50:07Z",
  "content_type": "text/html",
  "final_url": "https://example.com/",
  "page": {
    "canonical_url": "",
    "description": "",
    "lang": "en",
    "meta": {
      "viewport": "width=device-width, initial-scale=1"
    },
    "open_graph": {},
    "robots": "",
    "title": "Example Domain",
    "twitter": {}
  },
  "rendered": false,
  "stats": {
    "archive_usable": true,
    "archive_version": "web-archive-2026-07-09-v4",
    "artifact_budget_bytes": 8388608,
    "artifact_count": 2,
    "artifact_data_bytes": 2093,
    "artifact_omitted_count": 0,
    "asset_bytes": 0,
    "asset_count": 0,
    "capture_backend": "http",
    "durability_guarantee": "static_assets_when_available",
    "estimated_result_bytes": 4147,
    "external_embeds_frozen": false,
    "failed_asset_count": 0,
    "formats_requested": [
      "single_html",
      "zip"
    ],
    "formats_returned": [
      "single_html",
      "zip"
    ],
    "html_bytes": 559,
    "include_scripts": false,
    "interactive_guarantee": "none",
    "max_asset_bytes": 1000000,
    "max_total_asset_bytes": 4000000,
    "offline_replay_level": "best_effort",
    "rendered": false,
    "replay_recommendation": "show_archive_artifact",
    "result_target_bytes": 9437184,
    "source_blocked": false,
    "text_chars": 142,
    "work_units": 3,
    "worker_result_max_bytes": 10485760
  },
  "status_code": 200,
  "url": "https://example.com/",
  "warnings": []
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `artifacts` | `array` | 2 items |
| `artifacts` | `array` | 2 items |
| `assets` | `array` | 0 items |
| `capture_backend` | `string` | http |
| `captured_at` | `string` | 2026-08-23T23:50:07Z |
| `content_type` | `string` | text/html |
| `final_url` | `string` | https://example.com/ |
| `page` | `object` | 8 fields |
| `page.canonical_url` | `string` |  |
| `page.description` | `string` |  |
| `page.lang` | `string` | en |
| `page.meta` | `object` | 1 fields |
| `page.open_graph` | `object` | 0 fields |
| `page.robots` | `string` |  |
| `page.title` | `string` | Example Domain |
| `page.twitter` | `object` | 0 fields |
| `rendered` | `boolean` | false |
| `stats` | `object` | 28 fields |
| `stats.archive_usable` | `boolean` | true |
| `stats.archive_version` | `string` | web-archive-2026-07-09-v4 |
| `stats.artifact_budget_bytes` | `integer` | 8388608 |
| `stats.artifact_count` | `integer` | 2 |
| `stats.artifact_data_bytes` | `integer` | 2093 |
| `stats.artifact_omitted_count` | `integer` | 0 |
| `stats.asset_bytes` | `integer` | 0 |
| `stats.asset_count` | `integer` | 0 |
| `stats.capture_backend` | `string` | http |
| `stats.durability_guarantee` | `string` | static_assets_when_available |
| `stats.estimated_result_bytes` | `integer` | 4147 |
| `stats.external_embeds_frozen` | `boolean` | false |
| `stats.failed_asset_count` | `integer` | 0 |
| `stats.formats_requested` | `array` | 2 items |
| `stats.formats_returned` | `array` | 2 items |
| `stats.html_bytes` | `integer` | 559 |
| `stats.include_scripts` | `boolean` | false |
| `stats.interactive_guarantee` | `string` | none |
| `stats.max_asset_bytes` | `integer` | 1000000 |
| `stats.max_total_asset_bytes` | `integer` | 4000000 |
| `stats.offline_replay_level` | `string` | best_effort |
| `stats.rendered` | `boolean` | false |
| `stats.replay_recommendation` | `string` | show_archive_artifact |
| `stats.result_target_bytes` | `integer` | 9437184 |
| `stats.source_blocked` | `boolean` | false |
| `stats.text_chars` | `integer` | 142 |
| `stats.work_units` | `integer` | 3 |
| `stats.worker_result_max_bytes` | `integer` | 10485760 |
| `status_code` | `integer` | 200 |
| `url` | `string` | https://example.com/ |
| `warnings` | `array` | 0 items |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
