> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Take Screenshot

> Capture a rendered web page as a PNG, JPEG, or WebP image.

**Take Screenshot** opens a URL in Cloudflare's remote browser and captures the
rendered page. Unlike a direct HTTP request, it can wait for client-side
content and run JavaScript before capture.

## Inputs

| Input                         | Type                     | Required | Description                                                                |
| ----------------------------- | ------------------------ | -------- | -------------------------------------------------------------------------- |
| **Third-party account**       | Cloudflare account       | Yes      | The Cloudflare account used for browser rendering.                         |
| **URL**                       | String                   | Yes      | The complete page URL to capture.                                          |
| **Format**                    | `png`, `jpeg`, or `webp` | Yes      | Image encoding. Defaults to `png`.                                         |
| **Full Page**                 | Boolean                  | No       | Captures the full document rather than only the viewport. Defaults to off. |
| **Wait For Selector**         | String                   | No       | A CSS selector that must appear before capture.                            |
| **Wait Time**                 | Number                   | No       | Extra delay after load, from `0` to `30000` milliseconds.                  |
| **Viewport Width**            | Number                   | No       | Viewport width, up to `1920`. Defaults to `1920`.                          |
| **Viewport Height**           | Number                   | No       | Viewport height, up to `1080`. Defaults to `1080`.                         |
| **JavaScript Code**           | String                   | No       | JavaScript inserted into the page before capture.                          |
| **Additional API Parameters** | Object                   | No       | Extra fields passed to Cloudflare's screenshot endpoint.                   |

## Output

| Output         | Type | Description                                        |
| -------------- | ---- | -------------------------------------------------- |
| **Screenshot** | File | The captured image, named from the URL's hostname. |

## Example: capture a loaded dashboard

Set **URL** to the dashboard, **Wait For Selector** to a selector on its final
chart, and choose the viewport used by the dashboard's desktop layout. Turn on
**Full Page** when charts extend below the initial viewport.

<Warning>
  Cloudflare must be able to reach and authenticate to the URL. Do not expect a
  browser session from your own computer to be present in the remote browser.
</Warning>

## Troubleshooting

<AccordionGroup>
  <Accordion title="The screenshot shows a sign-in page">
    The remote browser does not share your local cookies. Use supported request
    or browser parameters to authenticate only when it is safe to do so.
  </Accordion>

  <Accordion title="Dynamic content is missing">
    Wait for a selector that appears after the content loads. Use **Wait Time**
    only when the page has no reliable ready-state element.
  </Accordion>
</AccordionGroup>
