# Retrieve the page HTML

Retrieves the HTML for a specific page. This endpoint returns the raw HTML of the page as it would appear in the browser.

Endpoint: GET /api/v1/pages/{pageId}/html
Version: v2.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer JWT

## Path parameters:

  - `pageId` (string, required)
    The unique identifier of the page. To get this ID, use [List pages of a site](#operation/sites-get_all_pages_by_site).

## Query parameters:

  - `language` (string, required)
    The language code for the page content.

  - `version` (any)
    The version number of the page to retrieve.

  - `variantId` (any)
    The unique identifier of the personalization or A/B/n test variant to use. To get this ID, you can use the [List flow definitions](#operation/flows-list_flow_definitions_by_page) endpoint. Use the `transpiledVariants[].ref`, or `variants[].ref` when available.
 
If you provide this value, the HTML content is retrieved for the specified variant. If you omit this value, the HTML content for the base page is returned.

## Header parameters:

  - `x-sc-job-id` (any)
    A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

## Response 200:

  - `200` (unknown)
    Successful response

## Response 200 fields (application/json):

  - `pageId` (string)
    The unique identifier of the page.
    Example: f0b81bcc-7388-46be-b109-6e73d1114470

  - `html` (string)
    The HTML content of the page.
    Example: <html><body><h1>Webpage content</h1></body></html>

  - `renderingHostUrl` (string)
    The origin (scheme and host only) of the rendering host that produced html. Root-relative asset references in `html` are resolved against this origin, not the site's public hostname, which may point to a separate deployment with different build hashes. The value is empty if the origin cannot be determined, in which case callers should fall back rather than fail.
    Example: https://xmc-example-site.sitecorecloud.io

## Response 422:

  - `422` (unknown)
    Unprocessable entity

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array)
    The location of the error in the request.

  - `detail.msg` (string)
    The error message.

  - `detail.type` (string)
    The type of error.

  - `detail.input` (any)
    The input that caused the error.

  - `detail.ctx` (object)
    The context in which the error occurred.

