# Website Screenshot & URL to PDF (Bulk) (`squarish_altruism/screenshot`) Actor

Capture full-page or viewport screenshots (PNG/JPEG) and PDFs of any list of URLs with a real Chrome browser. Device presets, cookie-banner hiding, lazy-load scrolling, element screenshots, dark mode. Pay only for pages that load.

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

## Pricing

$2.00 / 1,000 captures

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 & URL to PDF (Bulk)

> **At a glance:** turn a list of URLs into screenshots or PDFs. **You get** a download link for each page. **Cost:** 1,000 screenshots are $2, and pages that fail are free.

Capture **screenshots** and **PDFs** of any number of web pages with a real Chrome browser. Paste a list of URLs and get back full-page or viewport images (PNG or JPEG) and PDFs, each with a direct download link.

It hides cookie consent pop-ups automatically, scrolls the page so lazy-loaded images appear, and can emulate a mobile, tablet, laptop or desktop screen. **You only pay for pages that load.** Error pages, bot blocks and failures are free.

### Features

- **Bulk:** hundreds or thousands of URLs per run, captured in parallel.
- **Full-page or viewport** screenshots in PNG (lossless) or JPEG (small files).
- **URL to PDF:** A4, A3, A5, Letter, Legal or Tabloid, portrait or landscape. Choose screen or print styles, with or without backgrounds.
- **Device presets:**

  | Preset | Size | Notes |
  |---|---|---|
  | Desktop | 1920×1080 | |
  | Laptop | 1366×768 | |
  | Tablet | 820×1180 | 2× resolution |
  | Mobile | 390×844 | 3× resolution, touch and mobile user agent |

  You can also set a custom viewport.
- **Cookie banners hidden:**
  - Covers OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, Iubenda, Osano, Complianz, CookieYes, Borlabs and more.
  - Hidden with CSS only: **nothing is accepted or clicked**.
- **Hide anything else** with your own CSS selectors, such as chat widgets, ads or sticky headers. You can also inject custom CSS.
- **Element screenshots:** capture just one element, such as a pricing table, chart or ad slot.
- **Lazy-load scrolling** before full-page captures, so images further down the page render.
- **Wait controls:** load event, DOM ready or network idle. You can also wait for a CSS selector or add an extra delay.
- **Dark mode:** captures the site's `prefers-color-scheme: dark` look.
- **Very tall pages** are capped at a height you choose, so you never get a 200 MB image.

### How to use it

1. Paste your URLs, or upload a text or CSV file of URLs.
2. Choose **Screenshot**, **PDF** or both.
3. Pick a device and click **Start**.
4. Open the **Captures** table to preview each screenshot and download the files. Everything is also stored in the run's key-value store.

### Input example

```json
{
  "urls": [{ "url": "https://apify.com" }, { "url": "https://example.com/pricing" }],
  "outputs": ["screenshot", "pdf"],
  "device": "mobile",
  "fullPage": true,
  "format": "jpeg",
  "hideSelectors": ["#intercom-container"]
}
```

### Output

One row per URL:

```json
{
  "index": 0,
  "url": "https://apify.com",
  "finalUrl": "https://apify.com/",
  "statusCode": 200,
  "title": "Apify: Full-stack web scraping and data extraction platform",
  "device": "mobile",
  "viewport": { "width": 390, "height": 844 },
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/…/records/0001-apify-com-1a2b3c4d.jpg",
  "screenshotBytes": 482113,
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/…/records/0001-apify-com-1a2b3c4d.pdf",
  "pdfBytes": 1203321,
  "charged": 2,
  "capturedAt": "2026-11-03T13:40:00.000Z"
}
```

The output can also include these fields:

- `warnings`: for example, a page that was taller than the height limit.
- `error`: present if the page couldn't be loaded.

File names start with the URL's position in your list, so files sort in input order.

### Pricing

**$0.002 per capture.** One screenshot or one PDF counts as one capture. 1,000 screenshots cost $2.

These are free:

- pages that return an HTTP error (4xx/5xx), which are still captured so you can see them
- pages that fail to load

### Use cases

- **Visual monitoring and archiving:** schedule daily captures of your site, your competitors' pricing pages or landing pages.
- **SEO and marketing reports:** mobile and desktop captures of client pages for audits and decks.
- **Compliance and evidence:** timestamped PDFs of web pages.
- **Thumbnails and previews:** generate link previews or a portfolio of site images.
- **QA:** check how pages render across devices after a release.
- **AI pipelines:** feed page screenshots to vision models.

### Tips

- **Sites that block automated browsers** return error pages, which are free. Try a residential proxy in the Proxy setting.
- **Pages that keep loading** (chat widgets, live feeds) can time out with *Network idle*. Use *Page load event* and add a short extra delay.
- **Only capture pages you're allowed to.** Respect the site's terms and copyright when you reuse the images.

### Integrations

Run it on a schedule, trigger it from Zapier, Make or n8n, call it from your code through the Apify API, or send results to Google Drive, S3 or a webhook when a run finishes.

### Use with AI agents (MCP)

This Actor works as a tool for AI assistants such as Claude, ChatGPT and Cursor, through [Apify's MCP server](https://mcp.apify.com).

1. Add the server to your MCP client, with this Actor selected:

```json
{
  "mcpServers": {
    "apify": { "url": "https://mcp.apify.com?tools=squarish_altruism/screenshot" }
  }
}
```

In Claude Code: `claude mcp add apify "https://mcp.apify.com?tools=squarish_altruism/screenshot" -t http`

2. Sign in with your Apify account when your client asks. If it can't use OAuth, send your Apify API token in an `Authorization: Bearer` header.
3. Ask in plain language, for example: *"Take a full-page screenshot and a PDF of https://example.com on a mobile device."*

Runs started by an agent are billed to your Apify account at the same prices as above.

### Related tools

- [Website Change Monitor](https://apify.com/squarish_altruism/page-change-monitor)
- [Website SEO Audit & Broken Link Checker](https://apify.com/squarish_altruism/site-audit)
- [Bulk Image Downloader & Converter](https://apify.com/squarish_altruism/image-downloader)

# Actor input Schema

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

Pages to capture. You can paste many URLs or upload a file.

## `outputs` (type: `array`):

What to create for each URL. Each file is one capture.

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

Browser size and type. Mobile and tablet use touch, high-DPI screens and mobile user agents.

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

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

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

PNG is lossless; JPEG gives much smaller files.

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

1-100. Only used for JPEG.

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

Hide consent pop-ups from common providers (OneTrust, Cookiebot, Usercentrics, Didomi, Quantcast, Iubenda and more). Nothing is accepted or clicked.

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

Extra CSS selectors to hide, e.g. chat widgets or ads: #intercom-container, .ad-banner

## `selector` (type: `string`):

CSS selector of a single element to screenshot instead of the page, e.g. #pricing-table.

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

When the page counts as loaded.

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

Wait until this CSS selector appears before capturing (max 15 s).

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

Wait this long after loading, e.g. for animations.

## `scrollToLoad` (type: `boolean`):

Scroll through the page before a full-page screenshot so lazy-loaded images appear.

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

Ask the site for its dark colour scheme (prefers-color-scheme: dark).

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

Paper size for PDF output.

## `pdfLandscape` (type: `boolean`):

Use landscape orientation for PDF output.

## `pdfMedia` (type: `string`):

Screen looks like the website. Print uses the print stylesheet of the site, if it has one.

## `pdfPrintBackground` (type: `boolean`):

Include background colours and images.

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

Overrides the device width (px).

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

Overrides the device height (px).

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

Very long pages are cut at this height.

## `customCss` (type: `string`):

CSS injected into every page before capture.

## `navigationTimeoutSecs` (type: `integer`):

How long to wait for a page to load before giving up (it is retried twice).

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

Pages captured in parallel.

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

Optional. Use a proxy for sites that block data-centre traffic or need a specific country.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    }
  ],
  "outputs": [
    "screenshot"
  ],
  "device": "desktop",
  "fullPage": true,
  "format": "png",
  "quality": 80,
  "hideCookieBanners": true,
  "waitUntil": "load",
  "delayMs": 500,
  "scrollToLoad": true,
  "darkMode": false,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfMedia": "screen",
  "pdfPrintBackground": true,
  "maxFullPageHeight": 15000,
  "navigationTimeoutSecs": 60,
  "maxConcurrency": 5
}
```

# Actor output Schema

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

One item per URL, with links to the captured files.

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

Files saved to the run's default key-value store.

# 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"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("squarish_altruism/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" }] }

# Run the Actor and wait for it to finish
run = client.actor("squarish_altruism/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"
    }
  ]
}' |
apify call squarish_altruism/screenshot --silent --output-dataset

```

## MCP server setup

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