# Website Screenshot API: Full-Page PNG & URL to PDF (`devdarfy/render-api`) Actor

Website screenshot API: full-page PNG, JPEG or WebP screenshots and URL to PDF for a list of URLs. Lazy-loaded images are scrolled in, cookie banners hidden, device presets and dark mode. $1 per 1,000 screenshots.

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

## Pricing

from $1.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

A **website screenshot API** for lists of URLs: full-page PNG, JPEG or WebP screenshots and **URL to PDF** in the same run. Before each capture the page is scrolled so lazy-loaded images appear, and cookie banners are hidden. Every file is saved to the run's key-value store, and every URL gets one dataset row with the file link.

- **What you get:** one file per URL and output type, plus a row with the file link, final URL after redirects, HTTP status, page title, image size, file size and render time.
- **What it costs:** $0.001 per screenshot and $0.0015 per PDF, so **1,000 screenshots = $1** and 1,000 PDFs = $1.50. Pages that answer with an HTTP error are still delivered but not charged, and failed URLs are free. The only other charge is the standard Apify start fee of $0.00005 per run (per GB of memory). Apify platform usage is included in the price.
- **What you need:** a list of public URLs.

### Example output

A row from a run on 21 November 2026 with the default input (https://apify.com, full page, PNG). The store ID in `fileUrl` is shortened:

```json
{
  "url": "https://apify.com",
  "type": "screenshot",
  "status": 200,
  "finalUrl": "https://apify.com/",
  "title": "Apify: Marketplace of ready-to-run tools for AI",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/screenshot-0001-apify-com.png",
  "keyValueStoreKey": "screenshot-0001-apify-com.png",
  "width": 1280,
  "height": 10056,
  "bytes": 1083494,
  "durationMs": 7738,
  "error": null
}
```

The full-page capture of apify.com came out 10,056 px tall because the page was scrolled to the bottom first, so lazy sections were loaded. With `outputs: "both"` each URL produces two rows, one `screenshot` and one `pdf`.

### Use cases

- **SEO and marketing reports.** Capture your landing pages or competitor pages on desktop and mobile presets, every week, for a visual history.
- **Archiving and evidence.** Keep a dated PNG or PDF of a page as it looked on a given day, for compliance, legal or content records.
- **Thumbnails and link previews.** Generate preview images for a directory, a bookmark tool or a newsletter.
- **Web page to PDF.** Turn reports, invoices, documentation pages or articles at a URL into A4 or Letter PDFs with your own header and footer.
- **Layout checks.** Compare the same page in light and dark mode or across device sizes.

### URL to PDF

Set `outputs` to `pdf` (or `both` for a screenshot and a PDF of each URL). Paper size (A4, Letter, Legal, A3, A5, Tabloid), landscape, background graphics, scale, margins and HTML header and footer templates are all inputs. PDFs use the browser's print layout, so very long pages that do not fit in one screenshot still come out complete.

### Features

- **Full-page screenshots that are actually full**: the page is scrolled in steps so lazy images and scroll-triggered sections load, then captured from the top.
- **Cookie banners and pop-ups hidden**: known consent managers (OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, Iubenda and more) plus a heuristic for custom bars. Scroll locks are released.
- **Device presets**: desktop, laptop, iPad, iPhone, Android, or a custom size and pixel ratio up to 3x.
- **Wait strategies**: `load`, `domcontentloaded`, `networkidle`, wait for a CSS selector, extra delay.
- **Element capture**: give a CSS selector and get only that element.
- **PDF**: A4, Letter, Legal, A3, A5, Tabloid, landscape, backgrounds, scale, margins, header and footer templates.
- **Dark mode**, custom CSS, selectors to hide, custom JavaScript.
- **Formats**: PNG, JPEG, WebP with quality setting.
- **Safe by design**: only http(s) to public hosts. Private, loopback, link-local and `.internal` addresses are blocked, including after DNS resolution and on redirects.

### Example input

```json
{
  "urls": [{ "url": "https://apify.com" }, { "url": "https://news.ycombinator.com" }],
  "outputs": "both",
  "format": "webp",
  "quality": 85,
  "device": "iphone",
  "darkMode": true,
  "hideCookieBanners": true,
  "fullPage": true
}
```

### Pricing

Pay per event: one `screenshot` event ($0.001) per screenshot and one `pdf` event ($0.0015) per PDF. 1,000 screenshots cost $1 and 1,000 PDFs cost $1.50. Pages that answer with HTTP 4xx/5xx are still rendered and delivered, but not charged. Failed URLs are not charged. Use `maxItems` and Apify's maximum cost per run setting to cap spend.

### FAQ

**Why is a lazy image still missing?** Some sites load images only after interaction. Increase `delayMs`, use `waitForSelector` for an element that appears once content has loaded, or `waitUntil: "networkidle"`.

**A cookie banner is still visible.** Add its selector to `selectorsToHide`. Banners shown inside iframes from unknown vendors are the usual cause.

**Can I capture logged-in pages?** Pass headers (for example a session cookie) in `extraHeaders`. They are sent only to the same origin as the page URL.

**Can I capture localhost or intranet pages?** No. Private and internal addresses are always blocked.

**What does custom JavaScript see?** It runs inside the page like a script on that site, with the same network limits. It cannot read files or reach the actor. It has a 10 second limit.

**How tall can a full-page screenshot be?** Up to `maxPageHeight` (default 16,000 px, hard limit 16,384 device pixels in Chromium). Taller pages are cropped; use PDF for very long pages.

**Why is WebP slower than PNG?** The image is captured as PNG and encoded to WebP in the browser.

**Can I convert raw HTML to PDF?** Not directly: the input is a list of URLs. Put the HTML at any public address (a static host or a storage bucket link) and pass that URL.

**How is this different from other screenshot Actors?** The price is per file and already includes compute, so a slow page does not cost more. Lazy-load scrolling, cookie-banner hiding, PDF output and device presets are built in, and one bad URL does not stop the batch.

### Limits

- Pages that need a login form, CAPTCHA solving or human interaction are out of scope.
- Maximum 10,000 URLs per run (`maxItems`), 300 s per URL, 100 MB per file (default 25 MB).
- Video, GIFs and animations are not recorded; animations are frozen for screenshots.
- Pages behind aggressive bot protection may need the proxy setting.

### More Actors from the same developer

| Actor | What it does | Price |
|---|---|---|
| [ATS Jobs API](https://apify.com/devdarfy/ats-jobs) | Greenhouse, Lever and Ashby job postings, with new-job alerts | $3 / 1,000 jobs |
| [Career Page Jobs Scraper](https://apify.com/devdarfy/jobposting-extractor) | schema.org JobPosting data from any careers page that publishes it | $4 / 1,000 jobs |
| [Government Jobs API](https://apify.com/devdarfy/gov-jobs) | USAJOBS and Swedish Arbetsförmedlingen (Platsbanken) job ads | $2 / 1,000 jobs |
| [RSS Feed Reader & Parser](https://apify.com/devdarfy/rss-feed-reader) | RSS, Atom, RDF and JSON Feed to clean JSON, new items only | $1 / 1,000 items |
| [Bulk DNS Lookup & DMARC Checker](https://apify.com/devdarfy/dns-email-security) | MX, SPF, DMARC, DKIM and DNSSEC audit per domain, with a score | $2 / 1,000 domains |
| [Companies House API](https://apify.com/devdarfy/uk-companies-house) | UK company lookup by number, search and new incorporations | $3 / 1,000 companies |

# Actor input Schema

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

Pages to render. Only http(s) URLs to public hosts are allowed.

## `maxItems` (type: `integer`):

Render at most this many URLs from the list (cost safety cap).

## `outputs` (type: `string`):

What to produce for every URL.

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

Output image format for screenshots: png, jpeg or webp.

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

1-100. Ignored for PNG.

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

Capture the whole scrollable page instead of just the viewport.

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

CSS selector. If set, only this element is captured (overrides full page).

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

Sets viewport, pixel ratio, mobile and user agent. 'custom' uses the size fields below.

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

Browser viewport width in pixels (ignored when a device preset is chosen).

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

Browser viewport height in pixels (ignored when a device preset is chosen).

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

1-3. Higher means sharper but larger files.

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

Emulate prefers-color-scheme: dark.

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

When to consider navigation finished: load, domcontentloaded or networkidle.

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

Wait until this CSS selector is visible before capturing.

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

Extra delay in milliseconds after the page is ready, before capturing.

## `scrollToBottom` (type: `boolean`):

Scrolls the page in steps so lazy images and infinite sections load, then returns to top. Automatic for full page.

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

Hide cookie consent banners and pop-ups before capturing (hides them, does not click Accept).

## `selectorsToHide` (type: `array`):

Extra CSS selectors to hide (display:none).

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

Injected before capture.

## `customJs` (type: `string`):

Runs in the page context after load (no access to files or the actor). 10 s limit.

## `emulateMedia` (type: `string`):

'auto' uses print for PDFs and screen for screenshots.

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

PDF paper size, for example A4 or Letter.

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

Render the PDF in landscape orientation.

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

Print background colors and images.

## `pdfScale` (type: `number`):

PDF page scale factor (1 = 100%).

## `pdfMarginMm` (type: `integer`):

PDF page margin in millimetres.

## `pdfHeaderTemplate` (type: `string`):

Chromium header template. Use classes date, title, url, pageNumber, totalPages. Setting header or footer enables them.

## `pdfFooterTemplate` (type: `string`):

Same as header.

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

Hard timeout per URL in seconds.

## `maxRetries` (type: `integer`):

How many times to retry a failed URL.

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

How many pages to render in parallel.

## `maxFileSizeMb` (type: `integer`):

Files above this are rejected with an error row.

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

Taller pages are cropped at this height.

## `userAgent` (type: `string`):

Overrides device default.

## `extraHeaders` (type: `object`):

Sent with every request to the page's origin.

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

Optional. Useful for geo-targeted or blocked sites.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxItems": 100,
  "outputs": "screenshot",
  "format": "png",
  "quality": 85,
  "fullPage": true,
  "device": "custom",
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "deviceScaleFactor": 1,
  "darkMode": false,
  "waitUntil": "load",
  "delayMs": 0,
  "scrollToBottom": true,
  "hideCookieBanners": true,
  "emulateMedia": "auto",
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfPrintBackground": true,
  "pdfScale": 1,
  "pdfMarginMm": 10,
  "timeoutSecs": 60,
  "maxRetries": 1,
  "maxConcurrency": 3,
  "maxFileSizeMb": 25,
  "maxPageHeight": 16000
}
```

# Actor output Schema

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

One row per URL with links to the rendered 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": [
        {
            "url": "https://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("devdarfy/render-api").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("devdarfy/render-api").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 devdarfy/render-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devdarfy/render-api"
        }
    }
}
```

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/vBNJX7Z6YfFj4vRbY/builds/nk1TLgHuDvhm3foBh/openapi.json
