# Website Screenshot API — Full-Page PNG, JPEG, PDF, WebP (`fetchbase/web-screenshot-pro`) Actor

Screenshot any URL as PNG, JPEG, WebP or PDF. Full-page shots that work: sticky headers un-stuck, cookie banners and ads removed, lazy content settled. Device presets, dark mode, retina, authenticated pages, PDF controls, proxy. Charged only per successful screenshot — no startup fee.

- **URL**: https://apify.com/fetchbase/web-screenshot-pro.md
- **Developed by:** [Fetchbase](https://apify.com/fetchbase) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 screenshot captureds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Website Screenshot & PDF Generator — Full-Page, Cookie-Banner-Free

Capture any public URL as a pixel-perfect **PNG, JPEG, WebP, or PDF** — with the
two things screenshot tools usually get wrong actually solved:

1. **Real full-page capture.** Sticky headers, floating navbars and chat widgets
   are automatically "un-stuck" so they appear **once, in place** — not repeated
   or floating over your content. Lazy-loaded images are scrolled into loading
   before the shot.
2. **Clean shots by default.** Cookie/GDPR consent walls and ad slots are removed
   (or auto-accepted, your choice) so screenshots don't arrive ruined by overlays.

**You are charged only for screenshots that succeed.** No startup fee. Failed
captures cost $0.

### Quick start

```json
{
  "urls": ["https://stripe.com", "https://news.ycombinator.com"]
}
```

That's it — two clean, full-page PNGs land in your run's storage, with direct
image URLs in the dataset:

```json
{
  "url": "https://stripe.com/",
  "status": 200,
  "format": "png",
  "imageUrl": "https://api.apify.com/v2/key-value-stores/…/records/001-stripe-com.png",
  "fullPage": true,
  "device": "Desktop",
  "bytes": 5859948
}
```

### Features

| | |
|---|---|
| **Formats** | PNG (lossless), JPEG & WebP (small, quality dial), PDF (paper size, landscape, scale, margins, page ranges) |
| **Full page** | Auto-scroll settles lazy content; sticky/fixed elements de-stuck; optional max-height cap |
| **Clean-up** | Cookie-banner removal or click-Accept, ad/tracker hiding, hide-any-selector, custom CSS/JS injection |
| **Devices** | Desktop, Desktop HD, iPhone, Android, iPad presets — or custom viewport + retina (@2x/@3x) |
| **Dark mode** | Render the site's dark theme (`prefers-color-scheme`) |
| **Element shots** | Screenshot a single element by CSS selector |
| **Timing** | `load` / `domcontentloaded` / `networkidle`, wait-for-selector, extra delay |
| **Authenticated pages** | Cookies, custom headers, HTTP Basic auth — capture pages you have access to |
| **Localization** | Geolocation, timezone, locale emulation |
| **Reliability** | Optional Apify Proxy (incl. residential) for bot-protected sites; generous navigation timeouts; captures what rendered even if a page never fully "loads" |
| **Speed** | Optional resource blocking (images/fonts/media/CSS) for fast lightweight captures |

### Common recipes

**Marketing site archive (weekly, via Schedules):** all your landing pages, full-page,
banner-free — `{"urls": [...], "format": "jpeg", "quality": 80}`

**Mobile QA:** `{"urls": ["https://your.app"], "device": "iPhone", "darkMode": true}`

**Invoice/report to PDF:** `{"urls": ["https://…/invoice/123"], "format": "pdf", "pdfFormat": "A4", "cookies": [{"name": "session", "value": "…"}]}`

**Element card for social embeds:** `{"urls": ["…"], "selector": "#pricing-table", "format": "webp"}`

### Pricing

Pay per event: a small fixed price **per successful screenshot**, plus standard
Apify platform usage for the browser time your run consumes. No subscription,
no startup fee, failed captures free. Stop or scale any time.

### Use it from code or automation

Run via the Apify API, scheduler, or any Apify SDK/client:

```bash
curl -X POST "https://api.apify.com/v2/acts/fetchbase~web-screenshot-pro/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://example.com"], "format": "png"}'
```

Works out of the box with Apify **Schedules** (recurring captures), **Webhooks**
(notify your systems when a batch finishes), **Zapier/Make/n8n** integrations,
and the **MCP server** for AI agents.

### FAQ

**Is this legal / responsible?** The actor renders public web pages you direct it
to — the same thing your browser does — and hides overlay elements cosmetically
before capture. It extracts and stores no page content or personal data. For
authenticated captures, only use credentials for accounts you own or are
authorized to use. You are responsible for the URLs you submit.

**Why did my capture come back different from my browser?** Some sites serve
different content to datacenter IPs. Enable Apify **residential proxy** in the
input for the most human-like rendering.

**A screenshot failed — was I charged?** No. Only successful captures are billed.

***

Something missing, or a site that renders badly? **Open an issue on the actor**
— fixes ship fast. If this actor saves you time, a ⭐ review helps others find it.

### More tools by Fetchbase

Part of a suite of fast, no-nonsense web utilities — all pay-per-result, charged only on success, no startup fee:

- [Website Screenshot API](https://apify.com/fetchbase/web-screenshot-pro) — full-page PNG / JPEG / WebP / PDF
- [Website to Markdown](https://apify.com/fetchbase/website-to-markdown) — clean Markdown for LLMs & RAG
- [PDF & DOCX to Markdown](https://apify.com/fetchbase/document-to-markdown) — documents → Markdown for RAG
- [SEO Audit + Core Web Vitals](https://apify.com/fetchbase/website-seo-audit) — scored on-page audit with fixes
- [Website Performance Audit](https://apify.com/fetchbase/website-performance-audit) — bulk Core Web Vitals & page speed
- [Tech Stack Detector](https://apify.com/fetchbase/tech-stack-detector) — CMS, frameworks, analytics, hosting
- [Domain, DNS & WHOIS Lookup](https://apify.com/fetchbase/domain-dns-intelligence) — records, registration, SSL
- [RSS Feed Reader](https://apify.com/fetchbase/rss-feed-reader) — RSS / Atom / JSON → normalized JSON
- [Job Postings API](https://apify.com/fetchbase/job-postings-scraper) — Greenhouse, Lever, Ashby & more

### Use with AI agents (MCP)

This Actor is callable by AI agents through the [Apify MCP server](https://mcp.apify.com/). Agents in Claude, Cursor, Windsurf, LangGraph, CrewAI and others can discover it via `search-actors` and run it as a tool — its inputs and outputs are fully described in the schema for reliable agent use.

***

#### Was this Actor useful?

If it saved you time, please consider leaving an honest review. Reviews are the main way
independent Actors get discovered on Apify — a single one makes a real difference, and
critical feedback is just as welcome as praise.

Something missing or broken? Open an issue instead and it will get fixed.

# Actor input Schema

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

One or more public URLs. Each produces one image/PDF and one billable event. You may omit the https:// prefix.

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

png (lossless), jpeg or webp (smaller, use Quality), or pdf (full document).

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

Capture the entire scrollable page instead of just the visible viewport.

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

Emulate a common device (viewport, pixel density, mobile/touch). Choose Custom to set your own width/height/scale below.

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

Browser width in pixels. Used only when Device preset = Custom.

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

Browser height in pixels. Used only when Device preset = Custom. Full-page captures grow past this to fit the page.

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

Device pixel ratio. 2 or 3 renders crisp @2x/@3x 'retina' images. Used only when Device preset = Custom.

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

Emulate prefers-color-scheme: dark so sites render their dark theme.

## `blockCookieBanners` (type: `boolean`):

Hide the common GDPR/cookie/consent overlays that otherwise ruin ~40% of screenshots.

## `clickAcceptCookies` (type: `boolean`):

If a consent dialog exposes an Accept/Agree button, click it (dismisses banners that reappear after hiding).

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

Remove common ad slots and tracking iframes before capture.

## `hideStickyHeaders` (type: `boolean`):

On full-page shots, convert position:fixed/sticky elements so headers, nav bars and chat widgets appear once in place instead of floating over or repeating down the page. This is the classic full-page bug most tools don't solve.

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

Extra CSS selectors to hide before capture, e.g. '.newsletter-popup' or '#chat-widget'.

## `omitBackground` (type: `boolean`):

Capture a transparent background where the page has none (PNG/WebP only).

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

When to consider navigation done before capturing.

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

Wait until this element appears before capturing.

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

Fixed wait after the page settles, for late-rendering content or animations.

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

Screenshot only the element matching this selector instead of the page (ignores Full page).

## `fullPageMaxHeight` (type: `integer`):

Cap the height of full-page captures so pathologically long pages don't produce huge files. 0 = no cap.

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

Compression quality for JPEG/WebP. Higher = better & larger. Ignored for PNG/PDF.

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

Extra CSS applied before capture (e.g. hide elements, tweak layout).

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

JavaScript run in the page before capture (e.g. click a tab, dismiss a modal). Runs after load.

## `blockResources` (type: `array`):

Skip loading these resource types to speed up capture. Blocking 'image'/'media' changes appearance; 'font' rarely does.

## `timeoutMs` (type: `integer`):

Max time to wait for a page to load before capturing whatever has rendered.

## `cookies` (type: `array`):

Cookies to set before loading — capture logged-in/paywalled pages you have access to. Array of objects like \[{"name":"session","value":"abc"}]; domain defaults to each target URL. Only use cookies for accounts you own.

## `headers` (type: `object`):

Extra request headers, e.g. {"Authorization":"Bearer …"}.

## `httpUsername` (type: `string`):

Username for HTTP Basic authentication (optional).

## `httpPassword` (type: `string`):

Password for HTTP Basic authentication. Stored encrypted.

## `geolocation` (type: `object`):

Emulate a GPS position, e.g. {"latitude":48.85,"longitude":2.35}. Grants the page geolocation permission.

## `timezoneId` (type: `string`):

IANA timezone to emulate, e.g. America/New\_York or Europe/London.

## `locale` (type: `string`):

Locale/language to emulate, e.g. en-US or de-DE (also sets Accept-Language).

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

Paper size for PDF output.

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

Render the PDF in landscape instead of portrait.

## `pdfScale` (type: `string`):

Rendering scale, 0.1–2 (1 = 100%).

## `pdfMargin` (type: `string`):

Margin on all sides, e.g. 0, 1cm, 0.5in.

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

Include background colors/images in the PDF.

## `pageRanges` (type: `string`):

Restrict PDF to certain pages, e.g. 1-3.

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

Off by default (fast, works on most sites). Enable Apify Proxy — including residential — to capture bot-protected sites that block datacenter IPs.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://news.ycombinator.com"
  ],
  "format": "png",
  "fullPage": true,
  "device": "Desktop",
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "deviceScaleFactor": 1,
  "darkMode": false,
  "blockCookieBanners": true,
  "clickAcceptCookies": false,
  "blockAds": true,
  "hideStickyHeaders": true,
  "hideSelectors": [],
  "omitBackground": false,
  "waitUntil": "load",
  "delayMs": 0,
  "fullPageMaxHeight": 0,
  "quality": 85,
  "blockResources": [],
  "timeoutMs": 45000,
  "pdfFormat": "A4",
  "pdfLandscape": false,
  "pdfScale": "1",
  "pdfMargin": "0",
  "pdfPrintBackground": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

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

No description

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

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

# Run the Actor and wait for it to finish
run = client.actor("fetchbase/web-screenshot-pro").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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://apify.com"
  ]
}' |
apify call fetchbase/web-screenshot-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fetchbase/web-screenshot-pro",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/xPZz7Tcz54hD2b1up/builds/fpeLHJqv5oyl0rcKQ/openapi.json
