# Website Screenshot (`vashiiq/website-screenshot`) Actor

Capture screenshots of any web pages in bulk: PNG, JPEG or PDF, full page or screen, desktop or mobile, with cookie banners hidden.

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

## Pricing

Pay per event

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

Capture screenshots of web pages in bulk with a real Chrome browser. Get PNG, JPEG or PDF, the visible screen or the full page, on desktop, laptop, tablet or phone sizes, with cookie pop-ups hidden.

### What it does

- Opens each URL in Chrome and saves a screenshot to the run’s storage, with a direct link in every result row.
- Device presets: desktop (1920×1080), laptop (1366×768), iPad (810×1080) and iPhone (390×844).
- PNG, JPEG (smaller files) or PDF, of the visible screen or the whole scrollable page.
- Hides common cookie and consent pop-ups with CSS. Nothing is clicked or accepted for you.
- Dark mode, an optional wait before capture, and a list of any pages it couldn’t capture (FAILED_URLS), which you aren’t charged for.

**Why this one:** Cookie banners hidden by default, device presets, dark mode and PDF in one Actor, plus a list of pages it couldn’t capture, which you aren’t charged for.

In our last check, 20 runs over varied inputs succeeded 100% of the time.

### Use cases

- Visual archives and before/after records of web pages
- Checking how a site looks on phones, tablets and desktops
- Thumbnails and previews for directories, reports or link lists
- Monitoring competitors’ landing pages on a schedule

### Input example

```json
{
  "urls": [
    {
      "url": "https://example.com"
    },
    {
      "url": "https://en.wikipedia.org/wiki/Web_scraping"
    }
  ],
  "device": "desktop",
  "format": "png",
  "maxItems": 2
}
```

- urls: pages to capture (thousands per run)
- device: desktop, laptop, tablet or mobile
- fullPage: whole scrollable page or just the screen
- format: PNG, JPEG or PDF
- delaySecs: extra wait before capture
- darkMode: ask the page for its dark theme
- hideCookieBanners: hide consent pop-ups with CSS (nothing is clicked)

### Output sample

Real results from a run of this Actor:

```json
[
  {
    "url": "https://www.amazon.com",
    "finalUrl": "https://www.amazon.com/",
    "statusCode": 202,
    "title": "Amazon.com. Spend less. Smile more.",
    "screenshotUrl": "https://api.apify.com/v2/key-value-stores/cZhP18ckh4y3FK8MN/records/e1c3cb910bf20cb0-mobile.png?signature=1JtzqDkApPIc1WTtxQkez",
    "screenshotKey": "e1c3cb910bf20cb0-mobile.png",
    "format": "png",
    "device": "mobile",
    "fullPage": false,
    "width": 390,
    "height": 664,
    "fileSizeBytes": 659580,
    "sourceUrl": "https://www.amazon.com",
    "scrapedAt": "2026-10-27T06:42:40.019Z"
  }
]
```

**Fields:**

- url / finalUrl: the page asked for and where it ended up
- statusCode: HTTP status
- title: page title
- screenshotUrl: link to the file in the run storage
- format, device, fullPage, width, height, fileSizeBytes

### Pricing

Pay per result: **$4.00 per 1,000 results**, plus a $0.005 start fee per run. You pay only for results you get; Apify platform costs are included. Set a maximum charge for a run and the Actor stops cleanly when it's reached, keeping everything collected so far.

### Tips

- Some big sites (for example Etsy, the New York Times and Product Hunt) block datacenter IPs. If a page lands in FAILED_URLS, run it again with the residential proxy group.
- Use JPEG for smaller files and PDF when you need selectable text.
- For pages with animations or late-loading content, set a wait of 2–3 seconds.
- Large batches run at the default 1 GB; give the run more memory if you want more pages captured in parallel.

### FAQ

**Do I need an account on each site?** No. It only reads public pages and data.

**Where are the images?** In the run’s key-value store. Each result has a screenshotUrl you can open or download, and screenshotKey to find it in storage.

**Am I charged for pages that fail?** No. You pay only for screenshots you get, plus the small start fee per run. Failed pages are listed in FAILED_URLS.

**Does it accept cookie banners?** No. It hides common banners with CSS so they don’t cover the page, but it never clicks Accept for you.
**Something broke or a field is missing?** Open an issue on the Issues tab and include your run link. We fix scrapers quickly when sites change.

### Legal

Only capture pages you’re allowed to, and respect each site’s terms and copyright when you use the images.

This Actor collects publicly available data only. You're responsible for using it lawfully and in line with each site's terms.

# Actor input Schema

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

Web pages to capture. Up to thousands per run.

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

Screen size to emulate.

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

Capture the whole scrollable page instead of just the visible screen.

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

File type for each capture.

## `delaySecs` (type: `integer`):

Extra wait after the page loads, for animations or late content.

## `darkMode` (type: `boolean`):

Ask the page to use its dark theme, if it has one.

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

Hide common cookie and consent pop-ups so they don't cover the page.

## `maxItems` (type: `integer`):

Stop after this many. You're only charged for screenshots you get.

## `proxyConfiguration` (type: `object`):

Datacenter proxy works for most sites.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://en.wikipedia.org/wiki/Web_scraping"
    }
  ],
  "device": "desktop",
  "fullPage": false,
  "format": "png",
  "delaySecs": 0,
  "darkMode": false,
  "hideCookieBanners": true,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `screenshots` (type: `string`):

One row per captured page, with a link to its image or PDF.

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

The image and PDF files in this run's storage.

## `failedUrls` (type: `string`):

Pages that couldn't be captured (not charged), with the reason.

# 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": [
        {
            "url": "https://apify.com"
        },
        {
            "url": "https://en.wikipedia.org/wiki/Web_scraping"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("vashiiq/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": [
        { "url": "https://apify.com" },
        { "url": "https://en.wikipedia.org/wiki/Web_scraping" },
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("vashiiq/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": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://en.wikipedia.org/wiki/Web_scraping"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call vashiiq/website-screenshot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vashiiq/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/Z8AQdyKTTIWhCpu0h/builds/a4DXiyOanK5PqJGgN/openapi.json
