# Website Screenshot: Bulk, Full Page, Mobile & PDF (`datasur-labs/website-screenshot`) Actor

Capture screenshots of many URLs at once: full page or viewport, desktop/laptop/tablet/mobile, PNG or JPEG, cookie banners and chat widgets hidden, optional PDF. $0.001 per screenshot, failed pages free.

- **URL**: https://apify.com/datasur-labs/website-screenshot.md
- **Developed by:** [Data Sur Labs](https://apify.com/datasur-labs) (community)
- **Categories:** Developer tools, SEO tools, Automation
- **Features:** Limited permissions
- **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: bulk, full page, mobile & PDF

**Capture screenshots of hundreds of URLs in one run.** Viewport or full page, desktop/laptop/tablet/mobile, PNG or JPEG, with cookie banners and chat widgets hidden automatically. Optional A4 PDF of every page. Each image gets a direct link, ready for reports, archives, visual QA, SEO audits, lead sheets or AI vision models.

### Features

- 📱 **4 devices in one run**: desktop 1920×1080, laptop 1366×768, tablet (iPad) and mobile (iPhone, retina 2x). Every URL is captured on every selected device.
- 📜 **Full-page screenshots** with lazy-image scrolling. Very long pages are capped (default 12,000 px) so captures don't fail.
- 🍪 **Cookie banners and chat bubbles hidden** (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, Intercom, HubSpot…). No consent is clicked.
- 🚫 **Trackers and ads blocked** while loading (analytics, pixels, ad networks), so captures are faster and cleaner.
- 📄 **PDF export** (A4, backgrounds included).
- 💸 **Failed pages are free.**

### Input example

```json
{"urls": ["https://apify.com", "https://www.wikipedia.org"], "devices": ["desktop", "mobile"], "fullPage": true, "format": "jpeg", "savePdf": false}
```

### Output (one row per URL × device)

```json
{"url": "https://apify.com", "device": "desktop", "httpStatus": 200, "title": "Apify: Full-stack web scraping and data extraction platform",
 "screenshotUrl": "https://api.apify.com/v2/key-value-stores/…/records/apify-com-desktop.png", "format": "png", "fullPage": false, "sizeKb": 950, "loadMs": 5483}
```

### Pricing (pay per event)

- **$0.003 per screenshot** (+ $0.005 per run start)
- **$0.002 per PDF** (only if `savePdf` is on)
- Failed captures aren't charged. 1,000 screenshots = $3.

### Tips

- Use `jpeg` for smaller files and `png` for pixel-perfect captures.
- Raise `delaySecs` for pages with heavy animations. Use `waitUntil: networkidle` for dashboards.
- Pages behind a login or aggressive bot protection may show a challenge page instead of the site.

# Actor input Schema

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

Pages to capture, one per line.

## `devices` (type: `array`):

Each URL is captured once per device.

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

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

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

PNG (lossless) or JPEG (smaller).

## `jpegQuality` (type: `integer`):

1-100.

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

Hides OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, Intercom, HubSpot chat… with CSS (no consent is clicked).

## `savePdf` (type: `boolean`):

Save an A4 PDF of each page (desktop/laptop/tablet). Charged as a separate PDF event.

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

Page load event to wait for.

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

Wait after load for animations/lazy content.

## `scrollToBottom` (type: `boolean`):

For full-page captures.

## `timeoutSecs` (type: `integer`):

Per page.

## `maxConcurrency` (type: `integer`):

Pages captured in parallel.

## `maxFullPageHeight` (type: `integer`):

Very long pages are cut at this height to keep captures fast and reliable.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://www.wikipedia.org"
  ],
  "devices": [
    "desktop"
  ],
  "fullPage": false,
  "format": "png",
  "jpegQuality": 80,
  "hideCookieBanners": true,
  "savePdf": false,
  "waitUntil": "load",
  "delaySecs": 1,
  "scrollToBottom": true,
  "timeoutSecs": 45,
  "maxConcurrency": 4,
  "maxFullPageHeight": 12000
}
```

# Actor output Schema

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

One row per URL × device with image (and PDF) links.

# 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://apify.com",
        "https://www.wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datasur-labs/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://apify.com",
        "https://www.wikipedia.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("datasur-labs/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://apify.com",
    "https://www.wikipedia.org"
  ]
}' |
apify call datasur-labs/website-screenshot --silent --output-dataset

```

## MCP server setup

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