# Capture page

Capture one public webpage or content URL with fail-closed HTTP, truncation and OCR semantics, physical-attempt evidence, and optional exact-source, single-HTML or ZIP artifacts.

- Platform: [Universal Web](https://docs.upscrape.com/docs/platforms/web)
- Capability ID: `web.page.capture`
- 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": {
    "url": "https://example.com/"
  },
  "capability": "web.page.capture"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accept_statuses` | `array<integer>` | No | Non-2xx upstream statuses the caller explicitly accepts for inspection. Their parser quality remains failed. |
| `allow_browser_fallback` | `boolean` | No | Default: `false`. |
| `allow_truncated` | `boolean` | No | Default: `false`. |
| `archive` | `object` | No | Optional offline HTML or ZIP artifacts created from the same capture. Scripts default off. |
| `archive.delivery` | `string` | No | Small archives stay inline. Requests above inline budgets or delivery=hosted are stored and returned through a signed download URL. Allowed values: `auto`, `inline`, `hosted`. Default: `auto`. |
| `archive.formats` | `array<string>` | No | Allowed values: `single_html`, `zip`, `source`. |
| `archive.include_scripts` | `boolean` | No | Default: `false`. |
| `archive.max_asset_bytes` | `integer` | No | From 1024 to 50000000. |
| `archive.max_total_asset_bytes` | `integer` | No | From 1024 to 500000000. |
| `detail` | `string` | No | How much of the artifact graph to return. summary keeps identity, trace, status, counts, and compact text. standard omits raw HTML, the per-element dump, and parsed data values. full returns the complete captured and parsed graph. Allowed values: `summary`, `standard`, `full`. Default: `full`. |
| `document` | `object` | No | Optional document processing controls. Ignored for ordinary HTML pages. |
| `document.chunk_chars` | `integer` | No | Approximate maximum characters per grounded search/AI chunk. From 500 to 20000. Default: `4000`. |
| `document.continuation_token` | `string` | No | Stable token returned by parsed.continuation. It resumes at the interrupted or next unprocessed page. |
| `document.ocr` | `string` | No | auto and always require terminal OCR closure; if no OCR processor is available the request fails instead of returning empty successful content. Allowed values: `auto`, `never`, `always`. Default: `auto`. |
| `document.outputs` | `array<string>` | No | Requested document outputs. source returns the originally captured bytes: inline through 5.5 MB, otherwise through a hash-verified durable store, and fails if neither path can deliver them. When source is omitted, remote_source is provenance only and contains no bytes. Allowed values: `structured`, `text`, `markdown`, `source`. |
| `document.page_end` | `integer` | No | Last PDF page to process. Omit to continue through the bounded document limit. From 1 to 1000000. |
| `document.page_start` | `integer` | No | First PDF page to process. Defaults to 1. From 1 to 1000000. |
| `max_body_bytes` | `integer` | No | Decoded response-body ceiling. HTML is capped at 8,000,000 bytes; file captures at 104,857,600 bytes. From 1 to 104857600. |
| `max_total_bytes` | `integer` | No | Aggregate bytes across redirect responses and the final response. From 1 to 104857600. |
| `url` | `string` | Yes | Public http(s) webpage or content URL to capture. Supported content parsers include text, Markdown, JSON, JSONL, CSV, TSV, XML, RSS, Atom, XLSX, and native-text PDF. |

### Example input

```json
{
  "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": {
    "capture_version": "universal-capture-2026-08-23-v3",
    "detail": "full"
  },
  "capture_backend": "http",
  "content_type": "text/html",
  "dom": {
    "element_count": 12,
    "html": "<!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></head><body><div><h1>Example Domain</h1><p>This domain is for use in docum…",
    "html_bytes": 559,
    "html_sha256": "[redacted:token]",
    "rendered": false,
    "source_backend": "http",
    "truncated": false
  },
  "elements": [
    {
      "attributes": {
        "lang": "en"
      },
      "id": 1,
      "is_interactive": false,
      "tag": "html",
      "text": "Example Domain 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} Example Domain This domain is for use in documentation examples without needing permission. Avoid use in operations. Learn more",
      "xpath": "/html[1]"
    },
    {
      "attributes": {},
      "id": 2,
      "is_interactive": false,
      "parent_id": 1,
      "tag": "head",
      "text": "Example Domain 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}",
      "xpath": "/html[1]/head[1]"
    },
    {
      "attributes": {},
      "direct_text": "Example Domain",
      "id": 3,
      "is_interactive": false,
      "parent_id": 2,
      "tag": "title",
      "text": "Example Domain",
      "xpath": "/html[1]/head[1]/title[1]"
    }
  ],
  "files": [],
  "final_url": "https://example.com/",
  "forms": null,
  "headers": {
    "Age": [
      "5"
    ],
    "Allow": [
      "GET, HEAD"
    ],
    "Cf-Cache-Status": [
      "HIT"
    ],
    "Cf-Ray": [
      "a2fe049289cf04ec-HKG"
    ],
    "Content-Encoding": [
      "br"
    ],
    "Content-Type": [
      "text/html"
    ],
    "Date": [
      "Sun, 23 Aug 2026 23:50:09 GMT"
    ],
    "Last-Modified": [
      "Wed, 12 Aug 2026 20:17:18 GMT"
    ],
    "Server": [
      "cloudflare"
    ]
  },
  "iframes": null,
  "images": [],
  "links": [
    {
      "text": "Learn more",
      "url": "https://iana.org/domains/example",
      "xpath": "/html[1]/body[1]/div[1]/p[2]/a[1]"
    }
  ],
  "media": null,
  "page": {
    "canonical_url": "",
    "description": "",
    "lang": "en",
    "meta": {
      "viewport": "width=device-width, initial-scale=1"
    },
    "open_graph": {},
    "robots": "",
    "title": "Example Domain",
    "twitter": {}
  },
  "parsed": {
    "artifacts": [],
    "chunks": [],
    "form_fields": [],
    "links": [],
    "metadata": {
      "canonical_url": "",
      "language": "en",
      "title": "Example Domain"
    },
    "pages": [],
    "parser": "html_dom",
    "parser_version": "universal-content-2026-08-23-v4",
    "quality": {
      "grade": "high",
      "reasons": [],
      "score": 1
    },
    "segments": [
      {
        "id": 1,
        "kind": "title",
        "location": {
          "kind": "html",
          "xpath": "/html[1]/head[1]/title[1]"
        },
        "name": "title",
        "text": "Example Domain"
      },
      {
        "id": 2,
        "kind": "style",
        "location": {
          "kind": "html",
          "xpath": "/html[1]/head[1]/style[1]"
        },
        "name": "style",
        "text": "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}"
      },
      {
        "id": 3,
        "kind": "h1",
        "location": {
          "kind": "html",
          "xpath": "/html[1]/body[1]/div[1]/h1[1]"
        },
        "name": "h1",
        "text": "Example Domain"
      }
    ],
    "stats": {
      "segment_count": 5,
      "table_count": 0,
      "text_chars": 142
    },
    "status": "parsed",
    "tables": [],
    "text": "Example Domain Example Domain This domain is for use in documentation examples without needing permission. Avoid use in operations. Learn more",
    "warnings": []
  },
  "resources": [
    {
      "attribute": "href",
      "kind": "resource",
      "rel": "icon",
      "tag": "link",
      "url": "data:",
      "xpath": "/html[1]/head[1]/link[1]"
    }
  ],
  "stats": {
    "capture_backend": "http",
    "capture_version": "universal-capture-2026-08-23-v3",
    "detail": "full",
    "element_count": 12,
    "estimated_result_bytes": 8987,
    "fetch_ms": 1426,
    "file_count": 0,
    "form_count": 0,
    "html_bytes": 559,
    "iframe_count": 0,
    "image_count": 0,
    "jsonld_count": 0,
    "link_count": 1,
    "media_count": 0,
    "parsed_parser": "html_dom",
    "parsed_status": "parsed",
    "requested_detail": "full",
    "resource_count": 1,
    "response_compacted": false,
    "source_blocked": false,
    "table_count": 0,
    "text_chars": 142,
    "url_count": 2,
    "work_units": 1
  },
  "status_code": 200,
  "structured_data": {
    "facts": [
      {
        "confidence": 0.55,
        "context": "Example Domain 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}",
        "key": "content",
        "path": "meta.content",
        "source": "attribute",
        "value": "width=device-width, initial-scale=1"
      },
      {
        "confidence": 0.82,
        "key": "viewport",
        "path": "meta.viewport",
        "source": "metadata",
        "value": "width=device-width, initial-scale=1"
      },
      {
        "confidence": 0.7,
        "key": "heading",
        "path": "h1",
        "source": "dom_heading",
        "value": "Example Domain"
      }
    ],
    "jsonld": [],
    "meta": {
      "viewport": "width=device-width, initial-scale=1"
    },
    "open_graph": {},
    "twitter": {}
  },
  "tables": null,
  "text": {
    "text_blocks": [
      {
        "tag": "title",
        "text": "Example Domain",
        "xpath": "/html[1]/head[1]/title[1]"
      },
      {
        "tag": "style",
        "text": "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}",
        "xpath": "/html[1]/head[1]/style[1]"
      },
      {
        "tag": "h1",
        "text": "Example Domain",
        "xpath": "/html[1]/body[1]/div[1]/h1[1]"
      }
    ],
    "text_chars": 142,
    "visible_text": "Example Domain Example Domain This domain is for use in documentation examples without needing permission. Avoid use in operations. Learn more"
  },
  "url": "https://example.com/",
  "urls": [
    {
      "attribute": "href",
      "kind": "resource",
      "raw_url": "data:",
      "rel": "icon",
      "source": "attribute",
      "tag": "link",
      "url": "data:",
      "xpath": "/html[1]/head[1]/link[1]"
    },
    {
      "attribute": "href",
      "kind": "link",
      "raw_url": "https://iana.org/domains/example",
      "source": "attribute",
      "tag": "a",
      "text": "Learn more",
      "url": "https://iana.org/domains/example",
      "xpath": "/html[1]/body[1]/div[1]/p[2]/a[1]"
    }
  ],
  "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` | `object` | 2 fields |
| `artifacts.capture_version` | `string` | universal-capture-2026-08-23-v3 |
| `artifacts.detail` | `string` | full |
| `capture_backend` | `string` | http |
| `content_type` | `string` | text/html |
| `dom` | `object` | 7 fields |
| `dom.element_count` | `integer` | 12 |
| `dom.html` | `string` | <!doctype html><html lang="en"><head><title>Example Domain</title><link… |
| `dom.html_bytes` | `integer` | 559 |
| `dom.html_sha256` | `string` | [redacted:token] |
| `dom.rendered` | `boolean` | false |
| `dom.source_backend` | `string` | http |
| `dom.truncated` | `boolean` | false |
| `elements` | `array` | 3 items |
| `elements` | `array` | 3 items |
| `files` | `array` | 0 items |
| `final_url` | `string` | https://example.com/ |
| `forms` | `null` | null |
| `headers` | `object` | 9 fields |
| `headers.Age` | `array` | 1 items |
| `headers.Allow` | `array` | 1 items |
| `headers.Cf-Cache-Status` | `array` | 1 items |
| `headers.Cf-Ray` | `array` | 1 items |
| `headers.Content-Encoding` | `array` | 1 items |
| `headers.Content-Type` | `array` | 1 items |
| `headers.Date` | `array` | 1 items |
| `headers.Last-Modified` | `array` | 1 items |
| `headers.Server` | `array` | 1 items |
| `iframes` | `null` | null |
| `images` | `array` | 0 items |
| `links` | `array` | 1 items |
| `links` | `array` | 1 items |
| `media` | `null` | null |
| `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 |
| `parsed` | `object` | 15 fields |
| `parsed.artifacts` | `array` | 0 items |
| `parsed.chunks` | `array` | 0 items |
| `parsed.form_fields` | `array` | 0 items |
| `parsed.links` | `array` | 0 items |
| `parsed.metadata` | `object` | 3 fields |
| `parsed.pages` | `array` | 0 items |
| `parsed.parser` | `string` | html_dom |
| `parsed.parser_version` | `string` | universal-content-2026-08-23-v4 |
| `parsed.quality` | `object` | 3 fields |
| `parsed.segments` | `array` | 3 items |
| `parsed.stats` | `object` | 3 fields |
| `parsed.status` | `string` | parsed |
| `parsed.tables` | `array` | 0 items |
| `parsed.text` | `string` | Example Domain Example Domain This domain is for use in documentation e… |
| `parsed.warnings` | `array` | 0 items |
| `resources` | `array` | 1 items |
| `resources` | `array` | 1 items |
| `stats` | `object` | 24 fields |
| `stats.capture_backend` | `string` | http |
| `stats.capture_version` | `string` | universal-capture-2026-08-23-v3 |
| `stats.detail` | `string` | full |
| `stats.element_count` | `integer` | 12 |
| `stats.estimated_result_bytes` | `integer` | 8987 |
| `stats.fetch_ms` | `integer` | 1426 |
| `stats.file_count` | `integer` | 0 |
| `stats.form_count` | `integer` | 0 |
| `stats.html_bytes` | `integer` | 559 |
| `stats.iframe_count` | `integer` | 0 |
| `stats.image_count` | `integer` | 0 |
| `stats.jsonld_count` | `integer` | 0 |
| `stats.link_count` | `integer` | 1 |
| `stats.media_count` | `integer` | 0 |
| `stats.parsed_parser` | `string` | html_dom |
| `stats.parsed_status` | `string` | parsed |
| `stats.requested_detail` | `string` | full |
| `stats.resource_count` | `integer` | 1 |
| `stats.response_compacted` | `boolean` | false |

## 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)
