# Website to PDF: Bulk URL to PDF, Print-Ready A4 or Letter (`weio/website-to-pdf-bulk`) Actor

Bulk webpage to PDF and URL to PDF: save a list of web pages as print-ready PDF files in one run. Choose A4, Letter or Legal; portrait or landscape; include backgrounds after full page load. Each successful page returns a public PDF link, title and HTTP status.

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

## Pricing

$4.00 / 1,000 pdf saveds

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 to PDF (bulk)

Give it a list of web pages; get one PDF per page, saved after the page has fully loaded (lazy images scrolled into view).

### Options

- Paper size: A4, Letter or Legal; portrait or landscape
- `screenMedia` on (default): the PDF looks like the page on screen, backgrounds included. Off: the site's own print stylesheet is used.
- Extra wait for fade-ins and late content

### Output (one row per page)

- `pdfUrl`: public link to the PDF (stored in the run's key-value store)
- `pdfBytes`, `pdfPages`, `title`, `httpStatus`, `finalUrl`, `charged`

### Pricing

Pay per event: one `pdf` per PDF saved. Pages that are unreachable (DNS error, refused connection, certificate error) return an `error` row and are not charged. Pages whose server answers with an HTTP error (404, 500 and so on) are saved as a PDF so you can see what came back, but are not charged (`charged: false`).

### Notes

- Cookie and consent banners are hidden before the capture (`hideCookieBanners`, on by default). They are never clicked, so no consent is given for you. Age gates are not bypassed: the row says `ageGate: true` and shows what a first-time visitor sees.
- Public pages only; nothing is clicked, no forms are submitted, no logins.
- Each page opens in a fresh browser context; three pages are processed in parallel.

### Cost examples

One PDF saved = $0.004 on the pay-per-event price. 100 pages = $0.40; 1,000 pages (the per-run maximum) = $4.00. Pages that do not load, and pages answered with an HTTP error, are not charged.

### Schedule it or connect it

- Run it on a timer with [Apify Schedules](https://docs.apify.com/platform/schedules), for example a weekly archive of your key pages.
- Start it from [n8n](https://docs.apify.com/platform/integrations/n8n), [Make](https://docs.apify.com/platform/integrations/make) or [Zapier](https://docs.apify.com/platform/integrations/zapier) and pass the `pdfUrl` column on to email, Drive or your CRM.
- Call it over HTTP with your Apify token: `POST https://api.apify.com/v2/acts/weio~website-to-pdf-bulk/run-sync-get-dataset-items` with body `{"websites":["https://example.com/page"]}`.

### FAQ

**Does it work on pages that load content with JavaScript?** Yes. The page is fully loaded and lazy images are scrolled into view before the PDF is saved.

**Can I get the print version of a page?** Yes. Set `screenMedia` to off and the site's own print stylesheet is used.

**Are cookie banners in the PDF?** They are hidden, never clicked, so no consent is given for you.

**Which pages are skipped?** Pages behind a login, and pages the site's robots.txt disallows. Nothing is clicked and no forms are submitted.

# Actor input Schema

## `websites` (type: `array`):

Page URLs or domains, one per line (max 1000 per run). A bare domain is opened as https://<domain>/.

## `paperFormat` (type: `string`):

PDF paper size.

## `landscape` (type: `boolean`):

Landscape instead of portrait.

## `screenMedia` (type: `boolean`):

On = render with screen styles (what a visitor sees). Off = use the site's print stylesheet.

## `waitMs` (type: `integer`):

Wait after the page loads before the screenshot, for fade-ins and lazy images.

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

On = cookie/consent banners are hidden before the capture (never clicked: no consent is given). Age gates are not bypassed; the row says ageGate: true.

## Actor input object example

```json
{
  "websites": [
    "zingermans.com"
  ],
  "paperFormat": "A4",
  "landscape": false,
  "screenMedia": true,
  "waitMs": 1500,
  "hideCookieBanners": true
}
```

# Actor output Schema

## `siteRows` (type: `string`):

The default dataset with one row per page.

# 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 = {
    "websites": [
        "zingermans.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("weio/website-to-pdf-bulk").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 = { "websites": ["zingermans.com"] }

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

```

## MCP server setup

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

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/TQNsU9RMcwkIbeaHU/builds/4i1GosRfjE83OTqNG/openapi.json
