# Website Screenshot and URL to PDF: Full Page and Mobile (`venture_ace/website-screenshot`) Actor

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 and URL to PDF: full page, mobile, cookie banners hidden

Paste a list of URLs and get a **website screenshot** (PNG or JPEG) and, if you want, a **PDF** of each page, taken with headless Chromium (Playwright). It is a full page screenshot API, a URL to PDF converter and a mobile screenshot tool in one Actor, for the pages **you** supply. No login, no proxies, no scraping of other people's data.

### Why use it

- **Full page that really is full page.** The page is scrolled first so lazy-loaded images appear (a common failure of other screenshot Actors). Pages taller than 16,000 px are capped and the row says so.
- **Cookie banners hidden.** It clicks common "accept" buttons and hides OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics and generic consent banners; add your own selectors with `hideSelectors`.
- **Desktop, tablet or mobile** presets, or any custom viewport; pixel ratio 1-3 for retina; dark colour scheme.
- **Wait for the page to be ready:** `waitForSelector`, a fixed `delayMs`, or `waitUntil`.
- **Light:** one shared browser, 3 pages in parallel, 1 GB of memory.
- **Failures are reported, not captured.** A page that errors, times out or answers HTTP 4xx/5xx comes back as a `failed` row with the reason, not as a screenshot of an error page (turn on `captureErrorPages` if you want those).
- **MCP-ready:** callable by AI assistants through the Apify MCP server.

### Input

| Field | What it does |
|---|---|
| `urls` | Pages to capture. `https://` is added if missing. Public http(s) pages only; every request, redirects included, must resolve to a public address. |
| `format` | `png` (default), `jpeg` or `none` (PDF only). `jpegQuality` 1-100. |
| `pdf` | Also save a PDF (`pdfFormat`: A4, Letter, A3, Legal). |
| `fullPage` | Whole scrollable page (default) or just the first screen. |
| `device` | `desktop` 1440x900, `tablet` 820x1180, `mobile` 390x844. `viewportWidth`/`viewportHeight` override. |
| `deviceScaleFactor` | 1-3. |
| `waitForSelector`, `failOnSelectorTimeout`, `delayMs`, `waitUntil` | When the page counts as ready. |
| `hideCookieBanners`, `hideSelectors` | Consent banners and any extra CSS selectors to hide. |
| `darkMode` | Request the dark theme. |
| `maxUrls` | Safety cap, default 50. `concurrency` default 3, `timeoutSecs` default 45. |

### Output

One dataset row per URL: `url`, `status` (`ok` or `failed`), `screenshotKey`, `screenshotUrl`, `pdfKey`, `pdfUrl`, `width`, `height`, `bytes`, `httpStatus`, `title`, `device`, `fullPage`, `note`, `error`, `capturedAt`. The files are in the run's key-value store; the URLs in the row open them directly.

### Good to know

- Some sites block datacenter browsers or rate-limit them (HTTP 403 or 429); those rows come back `failed` with the status code.
- Sites that need a login, a CAPTCHA or a proxy are not supported.
- You are responsible for having the right to capture and store the pages you submit.

### Pricing

No Actor fee: you pay only Apify's platform usage for your run (a few seconds of compute per page). Set `maxUrls` low for tests.

### Related searches

website screenshot, screenshot API, URL to PDF, full page screenshot, webpage to image, mobile screenshot, Chromium Playwright screenshot.

# Actor input Schema

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

Pages to capture, one per line. https:// is added if missing. Only public http(s) pages; localhost and private addresses are refused.

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

PNG is lossless; JPEG is much smaller for long pages. Choose none to get only PDFs.

## `pdf` (type: `boolean`):

Print each page to PDF (A4 by default) in addition to the image.

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

Capture the whole scrollable page, not just the first screen. The page is scrolled first so lazy-loaded images appear. Capped at 16,000 px tall.

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

Viewport and user agent preset. Desktop 1440x900, tablet 820x1180, mobile 390x844.

## `viewportWidth` (type: `integer`):

Overrides the device width. Leave empty to use the preset.

## `viewportHeight` (type: `integer`):

Overrides the device height. Leave empty to use the preset.

## `deviceScaleFactor` (type: `integer`):

1 is standard; 2 gives retina-sharp images at four times the pixels (larger files).

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

1 to 100, used when the format is JPEG.

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

When navigation counts as done. networkidle waits for quiet network and is best for most sites; domcontentloaded is fastest.

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

CSS selector that must be visible before the capture, for example #app .loaded. If it never appears the row is marked failed (see failOnSelectorTimeout).

## `failOnSelectorTimeout` (type: `boolean`):

Off: capture anyway and note the timeout in the row. On: mark the URL failed.

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

Fixed wait after the page has loaded, for animations and late widgets.

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

Clicks common 'accept' buttons and hides known consent banners (OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics and generic patterns).

## `hideSelectors` (type: `array`):

Anything else to remove from the capture, for example .newsletter-popup or #chat-widget.

## `captureErrorPages` (type: `boolean`):

Off (default): a 4xx/5xx response marks the URL failed, with the status code, and is not charged. On: screenshot the error page anyway.

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

Ask pages for their dark theme (prefers-color-scheme: dark).

## `pdfFormat` (type: `string`):

Paper size for the PDF.

## `maxUrls` (type: `integer`):

Safety cap: only the first N unique URLs are captured.

## `concurrency` (type: `integer`):

Pages captured at once. 3 fits the default 1 GB; raise memory before raising this.

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

How long to wait for one page to load before marking it failed.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://en.wikipedia.org/wiki/Screenshot"
  ],
  "format": "png",
  "pdf": false,
  "fullPage": true,
  "device": "desktop",
  "deviceScaleFactor": 1,
  "jpegQuality": 80,
  "waitUntil": "load",
  "failOnSelectorTimeout": false,
  "delayMs": 0,
  "hideCookieBanners": true,
  "captureErrorPages": false,
  "darkMode": false,
  "pdfFormat": "A4",
  "maxUrls": 50,
  "concurrency": 3,
  "timeoutSecs": 45
}
```

# Actor output Schema

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

One row per URL with links to the image and PDF files.

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

The key-value store holding every captured file.

# 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://example.com",
        "https://en.wikipedia.org/wiki/Screenshot"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("venture_ace/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://example.com",
        "https://en.wikipedia.org/wiki/Screenshot",
    ] }

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

```

## MCP server setup

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