# Convert a list of URLs to PDF in bulk

**Use case:** 

Renders each web page in a real browser and saves it as a print-quality A4 PDF with backgrounds, cookie banners hidden. Paste hundreds of URLs and download the PDFs from the dataset links.

## Input

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "https://docs.apify.com/platform"
  ],
  "outputFormats": [
    "pdf"
  ],
  "viewportPreset": "desktop",
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "fullPage": true,
  "waitStrategy": "load",
  "waitDelay": 2000,
  "waitSelector": ".main-content",
  "captureSelector": "#main-article",
  "hideCookieBanners": true,
  "darkMode": false,
  "scrollToTriggerLazyLoad": false,
  "blockResources": true,
  "imageQuality": 90,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfMargin": "10mm",
  "timeout": 30,
  "maxConcurrency": 5
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "text"
  },
  "status": {
    "label": "Status",
    "format": "text"
  },
  "format": {
    "label": "Format",
    "format": "text"
  },
  "file_url": {
    "label": "File URL",
    "format": "link"
  },
  "page_title": {
    "label": "Page Title",
    "format": "text"
  },
  "width": {
    "label": "Width",
    "format": "number"
  },
  "height": {
    "label": "Height",
    "format": "number"
  },
  "file_size_bytes": {
    "label": "Size (bytes)",
    "format": "number"
  },
  "captured_at": {
    "label": "Captured At",
    "format": "date"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Screenshot & PDF API Actor is ready to run with the inputs already set for "Convert a list of URLs to PDF in bulk". [Sign up or log in](https://console.apify.com/create-task-from-example/UfrXD2o2i546dj6BF) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Convert a list of URLs to PDF in bulk" task

The Screenshot & PDF API Actor will start running based on the input automatically. You can also change all the input fields, like URLs, output formats, and more, to match your specific use case.

### 3. Receive the "Convert a list of URLs to PDF in bulk" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as URL, status, format, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Convert a list of URLs to PDF in bulk" task via API](https://apify.com/henryklimes/screenshot-pdf.md).

## FAQ

### Where do I get the PDF files?

Each dataset row of the bulk PDF task has a file_url linking to the PDF in the run's key-value store, ready to download or pass to another tool.

### What does each PDF cost?

Screenshot & PDF API charges $0.002 per capture, so 1,000 PDFs cost $2.

### Can I use Letter size or landscape?

Set pdfFormat to Letter or Legal and pdfLandscape to true.

## About this Actor

This example demonstrates how to use [Screenshot & PDF API](https://apify.com/henryklimes/screenshot-pdf.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/henryklimes/screenshot-pdf.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/henryklimes/screenshot-pdf.md

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`).
