# Website Screenshot: Full-Page PNG, JPEG & WebP (`ataism/website-screenshot`) Actor

Screenshots of any URL list in real Chromium: viewport or full page, PNG, JPEG or WebP, device presets, public image links. Blocks are free. From $5 per 1K.

- **URL**: https://apify.com/ataism/website-screenshot.md
- **Developed by:** [Kaizoku Data](https://apify.com/ataism) (community)
- **Categories:** Developer tools, Automation, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 screenshots

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Website Screenshot: Full-Page PNG, JPEG & WebP

Take **screenshots of a list of web pages** in a real Chromium browser: the visible viewport or the **full page**, as **PNG, JPEG or WebP**, with desktop, laptop, tablet or mobile presets. Each image is stored in the run's key-value store with a **public link**, and each row lists the final URL, HTTP status, page title, image size and load time. No proxy, no key.

**Price: $5 per 1,000 screenshots ($0.005 each); full-page screenshots $0.012 each**, plus Apify's default Actor-start event. Failed pages, blocks, CAPTCHA or bot-challenge pages, timeouts and refused URLs are free.

- **Viewport or full page:** with full page on, the page is scrolled once so lazy images load, and then captured to its full height. The height is capped (see [Limits](#limits-and-honest-caveats)); a cut page is marked `truncated`.
- **Devices and formats:** desktop 1920×1080, laptop 1366×768, tablet 820×1180 and mobile 390×844 (both at 2×), or your own viewport. PNG, JPEG or WebP, with a quality setting.
- **Wait the way you need:** `load`, `domcontentloaded` or `networkidle`, an extra delay, or a CSS selector to wait for.
- **Cleaner captures:** an optional stylesheet hides the banners of common cookie-consent tools. Nothing is clicked or accepted.
- **Quick start:** press *Start*. The prefilled input captures `https://crawlee.dev/` (a site run by Apify) at 1920×1080. It takes under a minute (about 10 seconds in the browser) and costs $0.005.

> **Safe and polite by design.** robots.txt is read and obeyed for every page and every redirect hop. The browser's User-Agent says it is an automated Chrome and names this Actor. Every request a page makes goes through a guard that refuses private, internal and cloud-metadata addresses. Blocks and challenges become free rows: they are never retried or worked around.

### What it does

For each URL:

1. **Guard.** The URL must be http(s). Social-media, video and Google hosts are refused before any DNS lookup (`platform`), and so are private, loopback and link-local addresses (`ssrf`).
2. **robots.txt.** The robots.txt of the page's origin is fetched once per run with the product token `website-screenshot-actor` and obeyed. A `Crawl-delay` is honoured in full. Pages on one host are loaded at most once per second. The page's own images, scripts, styles and fonts load as in any browser and pass the address guard. Preloading is switched off, so a page cannot make the browser fetch other pages it was not sent to: speculation rules and `<link rel=prefetch|prerender>` (in the HTML, added by scripts or sent as headers) are removed before the browser acts on them, and any remaining prefetch request is refused.
3. **Fresh browser context.** Each URL gets its own isolated context (no cookies, cache, storage or service workers shared with other URLs). One Chromium is reused for the whole run.
4. **Load.** The page is loaded. Every redirect hop, and every later navigation of the page itself, is checked against the same rules (platform list, addresses, robots.txt) **before it is requested**. A refusal (401, 403, 429, 503, 999), a bot challenge or CAPTCHA wall, or an HTTP error gives a free row without a screenshot.
5. **Wait.** The Actor waits for your chosen load state, then your selector and your delay, if you set them. With **Hide cookie banners** on, it adds the consent stylesheet.
6. **Capture.** It takes the viewport, or the full page up to the height cap. The image's format and pixel size are read back from the file before it is saved to the key-value store, with the right content type (`image/png`, `image/jpeg`, `image/webp`).
7. **Row.** The row is written with the public link. A row is charged only after both the image and the row are saved.

### Input

| Field | What it does |
|---|---|
| **URLs** (`urls`) | Pages to capture, one per line, up to 300 per run. `example.org` becomes `https://example.org/`. Duplicates are captured once. |
| **Full page** (`fullPage`) | Default off: the viewport only ($0.005). On: the whole page ($0.012). |
| **Device** (`device`) | `desktop` (default, 1920×1080), `laptop` (1366×768), `tablet` (820×1180 at 2×) or `mobile` (390×844 at 2×). |
| **Viewport width / height** (`width`, `height`) | Optional overrides of the preset in CSS pixels: width 320–3840, height 320–2160. |
| **Image format** (`format`) | `png` (default), `jpeg` or `webp`. |
| **Quality** (`quality`) | 1–100, default 80. Applies to JPEG and WebP only. |
| **Wait until** (`waitUntil`) | `load` (default), `domcontentloaded` or `networkidle` (the load event, then up to 10 s more until the network is quiet for 0.5 s). |
| **Extra delay (ms)** (`delayMs`) | 0–10,000, default 0. |
| **Wait for CSS selector** (`waitForSelector`) | Optional. The Actor waits up to 10 s for a visible match. Plain CSS only: no XPath, no `text=` engines, no scripts. |
| **Hide cookie banners** (`hideCookieBanners`) | Default on. Hides the containers of about 20 common consent tools (OneTrust, Cookiebot, Didomi, Quantcast, TrustArc, Usercentrics, Osano, Termly, Iubenda, Complianz, CookieYes, Sourcepoint, Axeptio, Borlabs, consentmanager and others) with one stylesheet. |

#### Example inputs

**1. Homepages of a list of sites at desktop size (monitoring, lead lists, link previews):**

```json
{
  "urls": ["https://crawlee.dev/", "https://www.python.org/", "https://go.dev/"]
}
```

**2. Full-page JPEGs of landing pages, smaller files:**

```json
{
  "urls": ["https://books.toscrape.com/", "https://quotes.toscrape.com/"],
  "fullPage": true,
  "format": "jpeg",
  "quality": 70
}
```

**3. Mobile WebP, after the product grid has rendered:**

```json
{
  "urls": ["https://books.toscrape.com/catalogue/category/books/travel_2/index.html"],
  "device": "mobile",
  "format": "webp",
  "waitForSelector": "ol.row",
  "delayMs": 500
}
```

### Output

You get one item per URL (JSON, CSV, Excel or XML). The **Overview** view shows the screenshot itself, and the **Free rows and problems** view lists what was not captured and why. Example:

```json
{
  "url": "https://crawlee.dev/",
  "requestedUrl": "https://crawlee.dev/",
  "finalUrl": "https://crawlee.dev/",
  "httpStatus": 200,
  "title": "Crawlee · Build reliable crawlers. Fast.",
  "status": "ok",
  "billable": true,
  "chargedEvent": "screenshot",
  "screenshotKey": "screenshot-crawlee.dev-151c821820-7bad1d37.png",
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<store id>/records/screenshot-crawlee.dev-151c821820-7bad1d37.png",
  "format": "png",
  "width": 1920,
  "height": 1080,
  "bytes": 146402,
  "sha256": "4f0c…",
  "fullPage": false,
  "truncated": false,
  "pageHeight": 1080,
  "device": "desktop",
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "deviceScaleFactor": 1,
  "loadMs": 2056,
  "loadState": "load",
  "captureMs": 2642,
  "pageBytes": 812337,
  "pageRequests": 41,
  "blockedRequests": 6,
  "blockedHosts": ["www.googletagmanager.com (platform)", "www.google-analytics.com (platform)"],
  "note": null,
  "errorCode": null,
  "message": null,
  "capturedAt": "2026-10-27T09:12:00.000Z",
  "urlKey": "https://crawlee.dev/"
}
```

| Field | Meaning |
|---|---|
| `status`, `billable`, `chargedEvent` | `ok` = screenshot saved and charged (`screenshot` or `full-page-screenshot`); `error` = free row, see `errorCode` and `message`. |
| `screenshotUrl`, `screenshotKey` | Public link to the image and its key in the run's default key-value store. |
| `width`, `height`, `bytes`, `format`, `sha256` | Read from the saved file itself. `width` = viewport width × pixel ratio. |
| `finalUrl`, `httpStatus`, `title` | The page after redirects, its status and its title (at most 300 characters). |
| `truncated`, `pageHeight` | Full page only: `pageHeight` is the page's height in CSS pixels; `truncated` is true when the image stops at the height cap. |
| `loadMs`, `loadState`, `captureMs` | Time to the load state that was reached, which state, and the total browser time for this URL. |
| `pageBytes`, `pageRequests` | What the page downloaded through the Actor's guard. |
| `blockedRequests`, `blockedHosts` | Requests of the page that were refused, with up to 10 hosts and reasons (`ssrf`, `platform`, `port`). The page is still captured. |
| `note` | For example "The load event did not fire within 30 s; captured after DOMContentLoaded", or "The page is 47273 px tall; the capture stops at 8192 px". |

#### Error codes (all free)

| Code | Meaning |
|---|---|
| `invalid-input` | Not an http(s) URL, embedded credentials, or longer than 2,048 characters (`file:`, `chrome:`, `javascript:`, `data:` and the like are refused). |
| `platform` | A social-media, video or Google host (YouTube, TikTok, Instagram, Facebook, X, Vimeo, SoundCloud, Spotify, Twitch, Reddit, LinkedIn, Google domains), also when reached by a redirect. Never contacted. |
| `ssrf` | The host is, or resolves to, a private, loopback, link-local, carrier-grade NAT or reserved address, also after a redirect. |
| `robots-blocked` | robots.txt disallows the page, or a redirect target, for this Actor. Not requested. |
| `robots-unavailable` | robots.txt answered 5xx or 429, or could not be read (tried twice). The page is not loaded without its rules. |
| `slow-host` | robots.txt asks for a `Crawl-delay` over 30 s, or the run's 600 s of Crawl-delay waiting is used up. The delay is never shortened. |
| `refused` | The page answered 401, 403, 429, 503 or 999. Not retried, and no other method is tried. |
| `challenge` | A bot challenge or CAPTCHA wall (a Cloudflare challenge, hCaptcha or reCAPTCHA wall, PerimeterX, DataDome, or a bare "Access denied" page). Never solved or worked around. |
| `host-skipped` | The host refused or challenged 2 pages in this run, so it is not asked again. |
| `http` | Another HTTP error (for example 404 or 500). No screenshot is taken of an error page. |
| `dns`, `network`, `tls` | The name does not resolve, the connection failed, or the HTTPS certificate was not accepted. |
| `timeout` | No HTML within 30 s, or the page used up its time budget. |
| `selector-not-found`, `invalid-selector` | No visible element matched **Wait for CSS selector** within 10 s, or the selector is not valid CSS. |
| `download` | The URL starts a file download instead of showing a page. Downloads are refused. |
| `too-large` | The page downloaded more than 50 MB or made more than 1,500 requests. |
| `redirects`, `invalid-url` | More than 5 redirects (HTTP or page-initiated), or a redirect to an unusable URL or port. |
| `page-crashed`, `browser-crashed` | The tab or the browser crashed, usually because the page needs more memory. The next URL gets a fresh browser. |
| `navigation`, `store-failed`, `internal` | Another loading error, the image could not be saved, or an unexpected error in this Actor. |

#### RUN_SUMMARY (key-value store record)

This record holds:

- charged and free rows, and the charged events;
- browser time (`browserSecs`, `browserSecsUnpaid`) and time per step (`phaseMs`);
- bytes downloaded by pages, requests, and refused requests;
- browser launches and crashes;
- errors by code;
- `stoppedBy`: `finished`, `max-charge`, `unpaid-work-cap`, `time-limit`, `migrating`, `aborted`, `browser-crashed`, `browser-launch` or `error`.

### Pricing

Pay per event:

- **`screenshot` = $0.005**: one viewport screenshot saved.
- **`full-page-screenshot` = $0.012**: one full-page screenshot saved. A full page takes 2–3 times the browser work of a viewport (more scrolling, loading and rendering).

A run charges one of the two events, depending on **Full page**. These are free:

- URLs whose page was blocked or showed a challenge;
- URLs that timed out or failed;
- URLs that were refused (robots.txt, platform, private addresses) or invalid.

There is no start fee of our own; Apify's default Actor-start event applies.

| Screenshots saved | Viewport | Full page |
|---|---|---|
| 1 (the prefilled example) | $0.005 | $0.012 |
| 100 | $0.50 | $1.20 |
| 300 (the per-run maximum) | $1.50 | $3.60 |
| 10,000 (34 runs) | $50 | $120 |

Set a **maximum charge per run** in the run options. The Actor stops cleanly before the next URL it could not pay for: that URL is not loaded and no image is saved. To protect you from paying for compute on bad lists, the run also stops when:

- free rows reach 50 and outnumber the charged ones;
- browser time spent on free rows passes 300 s plus 2 s per saved screenshot;
- 300 MB were downloaded for free rows.

**Memory.** The default is 1 GB. That is enough for viewport screenshots and for full pages up to 8,192 pixels high. For full pages up to 16,384 pixels, run with **2 GB** or more. The price per screenshot is the same; only the height cap changes.

### Use it via API, n8n or Make

Get an API token in Apify Console under *Settings*, *API & Integrations*, and keep it in an environment variable (`APIFY_TOKEN` below). Never paste it into shared code.

**cURL** (starts a run, waits and returns the rows; the synchronous endpoint waits up to 5 minutes, so use it for lists of up to about 20 URLs):

```bash
curl -X POST "https://api.apify.com/v2/acts/ataism~website-screenshot/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://crawlee.dev/"], "format": "webp"}'
```

**Python** (`pip install "apify-client>=3"`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("ataism/website-screenshot").call(run_input={
    "urls": ["https://crawlee.dev/", "https://www.python.org/"],
    "fullPage": True,
    "format": "jpeg",
})
for row in client.dataset(run.default_dataset_id).iterate_items():
    print(row["url"], row["status"], row["screenshotUrl"], row["errorCode"])
```

(With apify-client versions before 3.0, `call()` returns a dict: use `run["defaultDatasetId"]`.)

**JavaScript** (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('ataism/website-screenshot').call({
    urls: ['https://crawlee.dev/'],
    device: 'mobile',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const row of items) console.log(row.url, row.width, row.height, row.screenshotUrl);
```

**n8n:**

1. Add the **Apify** node, operation **Run an Actor and get dataset**, Actor `ataism/website-screenshot`, input `{"urls": ["https://your-site.example/"]}`.
2. Use `screenshotUrl` in the next node, for example to post the image to Slack or attach it to a ticket.

**Make:**

1. Add the **Apify** module **Run an Actor**, choose `ataism/website-screenshot`, put your URLs in the input JSON and set *Run synchronously* to *Yes*.
2. Add the **Apify** module **Get Dataset Items** and map the run's default dataset ID (one bundle per URL).
3. Send `url`, `screenshotUrl` and `status` to Google Sheets, Airtable or your CMS.

### Privacy, rights and terms

- **You are responsible for having the rights to capture the pages you list, and to use the screenshots.** A screenshot copies the page's text, images, logos and any personal data shown on it. Capture only pages you are allowed to capture: your own sites, sites whose terms allow it, or uses your law permits (for example archiving your own pages or reviewing public pages for quality). Nothing here is legal advice.
- **No logins, no paywalls, no consent clicking.** The Actor sends no cookies or credentials of yours, and it never clicks a button. The cookie-banner option only hides banners with CSS, so a page that shows content only after consent is captured as it looks without consent.
- **Public links.** Images are saved in your run's key-value store. Their links can be opened by anyone who has them (like any Apify record URL). Delete the store, or keep the links private, if that matters to you.
- **What the output contains:** the page's URL, status, title, timings and the image. The Actor adds nothing else about the page, but the image shows whatever the page shows.
- **Polite access.** robots.txt is obeyed for every page and every redirect. The browser's User-Agent ends with `website-screenshot-actor/0.1 (+https://apify.com/ataism/website-screenshot)` and still says `HeadlessChrome`. Blocks and challenges are reported, never worked around. No proxies are used. Social-media, video and Google sites are refused.

### Security

The browser loads pages from the open web, so the Actor treats each page as untrusted:

- **Every request of the page is guarded.** The browser has no direct network access. Each request goes through a small guard proxy inside the run: the page, every redirect, iframes, scripts, images, fonts, fetch/XHR, WebSockets and preconnects. The guard resolves the host name itself and refuses private, loopback, link-local and reserved addresses (IPv4 and IPv6, including IPv4-mapped, NAT64 and 6to4). It then connects to exactly the address it checked, so a name that changes its answer (DNS rebinding) gains nothing. Chrome's own DNS is switched off. WebRTC is limited to the proxy, and QUIC (HTTP/3) is off. Only ports 80, 443, 8080, 8443 and the page's own port are allowed. HTTPS is not intercepted: certificates are checked by Chrome as usual.
- **Not just the first request.** Redirects and page-initiated navigations are paused and checked before they are sent. If the page navigates away while it is being captured and that navigation is refused or fails, the row is free; Chrome's error page is never captured.
- **Nothing from the input runs.** The only scripts the Actor runs in a page are its own fixed functions: reading the title, the challenge check, the scroll for full pages, the banner stylesheet and the preloading guard (it runs in a separate script world the page cannot reach). **Wait for CSS selector** accepts plain CSS only.
- **No downloads, no service workers, no popups, no preloading, no dialogs.** Downloads are refused, service workers are blocked, popups and new tabs are never opened (nothing they would load is requested), the page's prefetch and prerender requests are removed or refused (every page the browser loads goes through the check above) and dialogs are dismissed. Video and audio are not loaded (poster images still show).
- **Bounded.** Each page has a hard time budget (at most about 90 s plus your delay), 50 MB and 1,500 requests. A crashed tab or browser gives a free row, and the next URL gets a fresh one.

### Limits and honest caveats

- **Full-page height cap:** 8,192 image pixels below 2 GB of memory and 16,384 at 2 GB or more (16,383 for WebP, the format's own limit). On mobile and tablet (2×) that is half as many CSS pixels. Longer pages are cut at the cap and marked `truncated` with the full `pageHeight`.
- **Pages that scroll inside a container** (some web apps keep the page at the window height and scroll an inner element) give a full-page image the height of the viewport.
- **Lazy content:** for full pages, the Actor scrolls down once (at most 3 s) and waits briefly for the network. Content that loads only on user interaction (clicks, infinite scroll) is not loaded.
- **Bot protection:** many large sites refuse automated browsers. Those rows are free (`refused` or `challenge`); the Actor will not try to get around them. Challenge detection is best-effort: a challenge served in an unusual way can still be captured and charged.
- **Cookie banners:** only the listed tools are hidden. A banner from another tool stays visible.
- **Google and social content inside pages:** pages may embed resources from Google, YouTube, Facebook, X and the like. Those are not loaded, so embedded videos, maps, tweets and ad slots show as empty boxes. Web fonts from `fonts.googleapis.com` and `fonts.gstatic.com` are the one exception: they are loaded so text renders in the right font.
- **Preloading inside shadow DOM:** speculation rules that a page places inside a shadow root (a web component's own DOM) are outside the preloading guard and could still make the browser prefetch a page. We know of no site that does this; such a prefetch is never captured or charged, because every navigation is checked against robots.txt before it is sent.
- **Load time:** if the load event does not arrive within 30 s, the page is captured as it is at that moment (charged, with a `note`). If no HTML arrives within 30 s, the row is a free `timeout`.
- Per run: 300 URLs and 55 minutes (a run that reaches the time limit stops cleanly with `stoppedBy: time-limit`; split long lists); one page at a time, in one browser.

### FAQ

**Why is my screenshot blank or showing an "Access denied" page?** If the Actor recognised a block, the row is a free `refused` or `challenge` row. If the site served a normal-looking page that is empty until a login or consent, that is what the page looks like to a visitor without them.

**Can I capture pages behind a login?** No. The Actor sends no cookies or credentials and never fills in forms.

**Can I get a PDF?** Not from this Actor. It produces images only.

### Open-source components

- `apify` SDK 3.7.2 (Apache-2.0).
- `playwright-core` 1.64.1 (Apache-2.0), with the Chromium build that ships in Apify's `actor-node-playwright-chrome` image.

Everything else (the guard proxy, robots.txt, the URL guard, challenge detection and the image size reader) is written in this repository without further dependencies.

# Actor input Schema

## `urls` (type: `array`):

Pages to capture, one per line, up to 300 per run. "example.org" becomes https://example.org/. Only http and https pages; private, internal, social-media, video and Google hosts are refused. Capture only pages you have the right to capture.

## `fullPage` (type: `boolean`):

Off: the visible viewport only ($0.005 per screenshot). On: the whole page height, scrolled once so lazy images load ($0.012 per full-page screenshot: several times the browser work). Full pages stop at 8,192 image pixels of height with less than 2 GB of memory and at 16,384 with 2 GB or more (16,383 for WebP); a cut page is marked truncated.

## `device` (type: `string`):

Viewport preset. desktop: 1920x1080. laptop: 1366x768. tablet: 820x1180 at 2x (images 1640 px wide). mobile: 390x844 at 2x (images 780 px wide). Tablet and mobile also use touch and mobile emulation.

## `width` (type: `integer`):

Optional: overrides the preset's width (320-3840). The image is this many pixels wide times the preset's pixel ratio.

## `height` (type: `integer`):

Optional: overrides the preset's height (320-2160). This is the screenshot's height when Full page is off.

## `format` (type: `string`):

PNG (lossless, largest files), JPEG or WebP (smaller; see Quality).

## `quality` (type: `integer`):

1-100. Ignored for PNG.

## `waitUntil` (type: `string`):

When the page counts as loaded. load: the load event (images, styles). domcontentloaded: the HTML is parsed (fastest, images may be missing). networkidle: the load event, then up to 10 s more until no request has run for 0.5 s. If the load event does not come within 30 s, the page is captured as it is and the row says so in note.

## `delayMs` (type: `integer`):

Wait this long after loading, before the screenshot (0-10000), for animations or late content.

## `waitForSelector` (type: `string`):

Optional: wait up to 10 s until an element matching this CSS selector is visible (for example #main or .product-grid). If none appears, the row is a free error (selector-not-found). Plain CSS only; no scripts are accepted or run.

## `hideCookieBanners` (type: `boolean`):

Best-effort: adds one stylesheet that hides the banners of common consent tools (OneTrust, Cookiebot, Didomi, Usercentrics and others). Nothing is clicked, accepted or rejected; banners of other tools stay visible. Paywalls and logins are never touched.

## `mode` (type: `string`):

Internal: "selfTest" runs the maintainer health check and saves no items.

## Actor input object example

```json
{
  "urls": [
    "https://crawlee.dev/"
  ],
  "fullPage": false,
  "device": "desktop",
  "format": "png",
  "quality": 80,
  "waitUntil": "load",
  "delayMs": 0,
  "hideCookieBanners": true,
  "mode": "run"
}
```

# Actor output Schema

## `results` (type: `string`):

One item per URL: public link to the image, size, format, final URL, title, load time, and for free rows the error code and message (JSON, CSV, Excel or XML).

## `files` (type: `string`):

The screenshots in the run's key-value store (keys screenshot-<host>-<hash>-<options>.png, .jpg or .webp).

## `runSummary` (type: `string`):

Charged and free rows, browser time, bytes, refused requests, errors by code, browser launches and why the run stopped.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://crawlee.dev/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ataism/website-screenshot").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": ["https://crawlee.dev/"] }

# Run the Actor and wait for it to finish
run = client.actor("ataism/website-screenshot").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://crawlee.dev/"
  ]
}' |
apify call ataism/website-screenshot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ataism/website-screenshot"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wX3JOKo2dgH5MGM2f/builds/1tGeR4JeufQhanizn/openapi.json
