# Website Screenshot & PDF: Full Page, Mobile, Element (`praised_tumbler/website-screenshot-pdf`) Actor

Capture public web pages as PNG, JPEG or PDF: true full-page screenshots with lazy content loaded, phone and tablet views, single elements, dark mode, cookie banners hidden. Respects robots.txt. No login, no proxy needed.

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

## Pricing

from $6.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 & PDF: Full Page, Mobile, Element

Turn any **public web page** into a **PNG, JPEG or PDF**: a website screenshot and URL-to-PDF tool in one. Give one address or a list of 200: every page becomes a file in the key-value store, and the results table links to it.

- **True full-page pictures.** The page is scrolled first, so pictures and sections that only load on scroll are in the picture. Very long pages are cut at a height you choose.
- **Phone, tablet and desktop.** Five ready screen sizes or your own; phone and tablet use Chrome's mobile mode, so responsive sites show their mobile layout.
- **One element only.** Give a CSS selector (`#pricing`, `main article`, `.chart`) and get just that part.
- **Clean pictures.** Cookie-consent layers of the common tools are left out (nothing is clicked, no consent is given). Hide anything else with your own selectors; optionally block ads and trackers; dark mode on request.
- **PDF** of the whole page with backgrounds, in A4 or Letter.
- **Waits the way you need:** page loaded, network quiet, an extra delay, or "until this element is visible".
- **Good manners built in:** robots.txt is respected (also after redirects), pages of the same site are opened one after another with a pause, and the browser says honestly what it is.

### Input

| Field | Description |
|---|---|
| `urls` | Public http(s) addresses (up to 200). |
| `captureMode` | `fullPage` (default) or `viewport` (only what fits the screen). |
| `format` | `png` (default), `jpeg` or `pdf`. |
| `device` | `desktop` (1366 x 768), `desktopLarge` (1920 x 1080), `laptop` (1440 x 900), `tablet` (820 x 1180 @2x), `mobile` (412 x 915 @2x) or `custom` with `viewportWidth`, `viewportHeight`, `deviceScaleFactor`. |
| `selector` | Capture only the first element matching this CSS selector. |
| `darkMode` | Ask the page for its dark colour scheme. |
| `hideCookieBanners` | Leave cookie layers out of the picture (default on). |
| `hideSelectors` | More elements to leave out (chat bubbles, sticky bars). |
| `blockAds` | Do not load well-known ad and tracking hosts. |
| `scrollToLoad` | Scroll through the page first (default on). |
| `waitUntil`, `delaySecs`, `waitForSelector` | When to take the picture. |
| `maxPageHeight` | Cut very long pages at this height (default 15,000 px). |
| `navigationTimeoutSecs` | Loading time limit per page (default 30). |
| `allowErrorPages` | Also capture pages that answer with an error (off by default). |
| `maxConcurrency` | Pages at the same time, 1 to 5. |

#### Example: full-page pictures of two pages on a phone

```json
{ "urls": ["https://docs.apify.com/", "https://apify.com/pricing"], "device": "mobile", "captureMode": "fullPage", "format": "jpeg" }
```

#### Example: one chart as a PNG, captured when it is ready

```json
{ "urls": ["https://example.com/report"], "selector": ".chart", "waitForSelector": ".chart svg", "device": "desktopLarge" }
```

### Output

One row per page in the dataset:

```json
{
    "url": "https://docs.apify.com/",
    "status": "ok",
    "finalUrl": "https://docs.apify.com/",
    "httpStatus": 200,
    "title": "Apify Documentation",
    "imageUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-docs-apify-com.png",
    "key": "001-docs-apify-com.png",
    "format": "png",
    "captureMode": "fullPage",
    "device": "desktop",
    "width": 1366,
    "height": 4210,
    "pageHeight": 4210,
    "bytes": 512340,
    "loadTimeMs": 1830,
    "warnings": []
}
```

`imageUrl` opens the file directly. `status` is `ok` or `error`; failed pages carry the reason in `error` and are **not charged**.

### Ready-made examples

Saved examples you can open, run and copy:

- [Full-page screenshot as PNG](https://apify.com/praised_tumbler/website-screenshot-pdf/examples/full-page-website-screenshot-png)
- [Mobile (phone view) screenshot](https://apify.com/praised_tumbler/website-screenshot-pdf/examples/mobile-website-screenshot)
- [Web page to PDF](https://apify.com/praised_tumbler/website-screenshot-pdf/examples/web-page-to-pdf)

### Pricing

Pay per event: one **screenshot** event for every page captured (PNG, JPEG or PDF), plus a small start fee per run and GB of memory (it pays for starting the browser). Failed pages are free. Many pages in one run are cheaper per page than one run per page, because the browser starts only once. Set **Max cost per run**: the Actor never captures more pages than your limit pays for. See the Pricing tab for the current price.

### What it does not do (on purpose)

- **No logins, cookies or sessions.** Only pages anyone can open are captured.
- **No way around bot protection.** There is no stealth mode, no proxy rotation and no captcha solving. A site that refuses automated browsers shows its refusal page or an error; such a page fails with `allowErrorPages` off when it answers with an error code.
- **robots.txt is obeyed.** A page the site disallows is not opened, and the result says so.
- **No private networks.** Addresses that are not on the public internet are refused, including through redirects and embedded content.

### Good to know

- The picture shows the page as a visitor from the data centre's country sees it, in a fresh browser without history.
- **Memory and speed.** The default 2 GB captures one page at a time. Painting is processor work and a run gets more processor with more memory: for batches, 4 GB (three pages at a time) or 8 GB is clearly faster at about the same cost per page.
- One picture can be at most about 16,000 device pixels tall: at pixel density 2 (phone, tablet) that is 8,000 px of page. Longer pages are cut and the result says so.
- Pages that never stop loading are captured as they are after the time limit, with a warning. Use `waitForSelector` when a specific part must be there.
- Cookie layers are recognised by a list of common consent tools; an unusual one can stay in the picture: add its selector to `hideSelectors`.
- Files stay in the run's key-value store as long as the run is kept (see your storage retention).
- You are responsible for having the right to capture and use the pages you submit.

### FAQ

**Can an AI agent call it?** Yes, through the Apify API or MCP server. Send `urls` and read `imageUrl` from the result.

**Why did a page fail with "disallowed by robots.txt"?** The site's robots.txt does not allow automated visits to that address. This Actor respects that.

**Can I capture a page that needs a login?** No. This Actor only works with public pages.

**How do I monitor a page over time?** Schedule a task with the page address; every run adds a new picture.

### Related Actors

- [PDF & DOCX to Markdown](https://apify.com/praised_tumbler/pdf-docx-to-markdown): PDF, DOCX and HTML to Markdown, with OCR for scanned pages.
- [Image OCR](https://apify.com/praised_tumbler/image-ocr-bulgarian-cyrillic): text from images and photos.

# Actor input Schema

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

Public http(s) addresses, one per line (up to 200). "https://" is added when missing.

## `captureMode` (type: `string`):

Full page: the whole scrollable page in one picture. Visible part: only what fits the screen size.

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

PNG is exact, JPEG is smaller, PDF is a printable document of the whole page.

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

The screen the page is shown on. Phone and tablet use Chrome's mobile mode, so responsive sites show their mobile layout.

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

Optional. Capture only the first element matching this CSS selector, for example "#pricing" or "main article". Not for PDF.

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

Ask the page for its dark colour scheme (only pages that support it change).

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

Hide the consent layers of the common cookie tools. Nothing is clicked and no consent is given; the layer is only left out of the picture.

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

Elements to leave out of the picture, for example a chat bubble or a sticky bar: ".chat-widget", "#promo-bar".

## `blockAds` (type: `boolean`):

Do not load requests to well-known advertising and tracking hosts. Pages load faster; ad slots stay empty.

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

For full-page pictures and PDFs: scroll through the page before capturing, so pictures and sections that load on scroll are there.

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

When the page counts as loaded. "Network is quiet" waits longest and suits pages that load data after opening.

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

Time to wait after loading, for animations or late content (0 to 15).

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

Optional. Capture only after this element is visible, for example ".chart svg". If it does not appear within 15 seconds the page fails and is not charged.

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

1 to 100. Used for JPEG only.

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

Used for PDF only.

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

Used when Screen is "Custom size".

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

Used when Screen is "Custom size".

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

1 = normal, 2 = retina (picture twice as wide and high). Used when Screen is "Custom size".

## `maxPageHeight` (type: `integer`):

Very long pages are cut at this height (500 to 30,000). At pixel density 2 one picture can be at most 8,000 px of page.

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

A page that has shown its content but is still loading something is captured as it is, with a warning.

## `allowErrorPages` (type: `boolean`):

Off: a page that answers with an error (HTTP 400 and above) fails and is not charged. On: the error page is captured and charged.

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

1 to 5 (also limited by the memory of the run). Pages of the same site are always opened one after another, with a pause.

## Actor input object example

```json
{
  "urls": [
    "https://docs.apify.com/"
  ],
  "captureMode": "fullPage",
  "format": "png",
  "device": "desktop",
  "darkMode": false,
  "hideCookieBanners": true,
  "hideSelectors": [],
  "blockAds": false,
  "scrollToLoad": true,
  "waitUntil": "load",
  "delaySecs": 1,
  "jpegQuality": 80,
  "pdfFormat": "A4",
  "viewportWidth": 1366,
  "viewportHeight": 768,
  "deviceScaleFactor": 1,
  "maxPageHeight": 15000,
  "navigationTimeoutSecs": 30,
  "allowErrorPages": false,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

One row per page: status, link to the file, size, title and warnings.

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

The pictures and PDFs of this run.

# 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://docs.apify.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("praised_tumbler/website-screenshot-pdf").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://docs.apify.com/"] }

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

```

## MCP server setup

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

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/8lIGrBoRUroOJnBEk/builds/5ERJ31M6OeEVZ5gb9/openapi.json
