Website Screenshot Generator avatar

Website Screenshot Generator

Pricing

from $0.005 / actor start

Go to Apify Store
Website Screenshot Generator

Website Screenshot Generator

Capture screenshots of any website using Playwright headless browser. Full-page or viewport capture. Supports batch mode (up to 50 URLs), device presets (desktop/tablet/mobile), CSS selector targeting, PNG/JPEG/WebP output.

Pricing

from $0.005 / actor start

Rating

0.0

(0)

Developer

Perry AY

Perry AY

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Website Screenshot Generator 📸 — Full-Page & Viewport Capture via Playwright

Capture screenshots of any website — full‑page scrollable content or viewport‑only — using a headless Playwright browser engine. Supports batch mode (up to 50 URLs), three device presets (desktop, tablet, mobile), custom viewport dimensions, CSS selector element targeting, and three output formats (PNG, JPEG, WebP). Images are stored in the Apify Key‑Value Store with direct‑access URLs for immediate integration into dashboards, monitoring pipelines, visual regression test suites, and reporting tools.

Built for anyone who needs automated website screenshots without running their own Playwright infrastructure.


What does it do?

The Website Screenshot Generator eliminates the operational overhead of running headless browsers for screenshot capture. Modern websites are increasingly dynamic — reliant on JavaScript rendering, lazy‑loaded images, asynchronous content injection, and complex CSS animations. Taking a reliable screenshot of such a page requires not just a browser engine, but careful orchestration of navigation timing, viewport sizing, content settlement, and error handling. This actor wraps all of that complexity into a single API call.

When you submit a URL, the actor launches an isolated Chromium browser instance via Playwright. It navigates to the target page, waits for the networkidle event (ensuring all XHR/fetch requests have settled), applies an optional user‑configurable delay for animations or lazy‑loaded content to complete, then captures the screenshot. The result is pushed to the Apify Key‑Value Store with a deterministic filename derived from the domain and timestamp, and the dataset receives a structured record containing the URL, viewport configuration, page metadata, and a direct download link.

The actor supports two distinct operating modes. Single URL mode processes one website at a time with full configuration control — ideal for on‑demand screenshots, manual QA checks, or integration into CI/CD pipelines where a single verification image is needed per run. Batch mode accepts an array of up to 50 URLs with per‑item overrides for device preset, viewport size, format, and full‑page flag — enabling portfolio‑wide visual audits, screenshot archives, or mass content verification in a single run. Each URL in a batch is processed sequentially in its own browser context to prevent cookie leakage, session cross‑contamination, or JavaScript state bleed between unrelated domains.

Beyond plain viewport captures, the actor offers three specialised capture modes. Full‑page mode scrolls the entire document and composites a single image containing every pixel of the page — essential for capturing infinite‑scroll layouts, long documentation pages, or any content that extends below the fold. CSS selector mode targets a specific DOM element by its selector string (e.g., #main-content, .hero-banner, img.hero-logo) and captures only that element's bounding box — perfect for isolating a navigation bar, a specific widget, or a call‑to‑action button for visual regression testing. Device preset mode automatically sets the viewport to standard dimensions for desktop (1920×1080), tablet (768×1024), or mobile (375×812) — any dimension can be overridden with custom width and height values for non‑standard layouts.


Who is it for?

PersonaTypical NeedHow the Actor Helps
QA EngineerCapture screenshots during automated test runs for visual regression detectionFull‑page and viewport modes with CSS selector targeting; deterministic filenames for diff‑based comparison across builds
Web DeveloperVerify responsive layout across multiple viewport sizes without manual browser resizingDevice presets (desktop, tablet, mobile) with custom dimension overrides; batch mode renders the same URL at multiple breakpoints
Content Curator / EditorGenerate preview thumbnails for article links, bookmark archives, or RSS feed itemsPNG/JPEG/WebP output; direct KVS URLs ready for CDN distribution; page title metadata included in each result
Digital MarketerCapture competitor landing pages, ad creatives, or promotional banners for market analysisBatch mode processes up to 50 URLs in one run; per‑item overrides for device and format; timestamped captures for change tracking
Security ResearcherDocument phishing pages, defaced websites, or suspicious content for incident reportsFull‑page capture preserves entire page content; CSS selector mode isolates specific elements; KVS storage provides permanent evidence URLs
DevOps / SRE EngineerIntegrate screenshot capture into CI/CD pipelines for deployment verificationFully scriptable via Apify API; charge events only for successful captures; structured JSON output parsable by any automation tool
Platform / Product ManagerMonitor partner landing pages, onboarding flows, or marketing sites for visual driftBatch mode with weekly timestamped captures; dataset views for diffing current vs. historical screenshots
Design System MaintainerCapture component states (hover, active, focused) across different viewports for documentationCSS selector mode isolates individual components; custom delay allows hover/focus state animations to settle

Why use this?

  • Zero browser infrastructure to manage — No need to install, configure, or patch a headless Chromium instance. The actor ships with Playwright pre‑installed on the Apify platform. Submit a URL, get a screenshot back. No Dockerfile tweaking, no xvfb setup, no selenium grid maintenance.

  • Three capture modes in one tool — Viewport‑only for fast, targeted captures. Full‑page for scrollable content. CSS selector for element‑level isolation. Choose the right mode per task without switching between different tools or scripts. A single API contract covers all three.

  • Production‑grade error resilience — Every URL is processed in its own browser context, so a timeout, DNS failure, or SSL error on one page never blocks the rest of the batch. Failed captures are reported with descriptive error messages (timeout vs. network error vs. invalid selector) and excluded from charges — you only pay for successful output.

  • Responsive testing built in — Three device presets (desktop, tablet, mobile) with the ability to override any dimension independently. Run the same URL through all three presets in a single batch to verify responsive behaviour without touching browser DevTools.

  • Key-Value Store output — Screenshots are pushed to the Apify Key‑Value Store with deterministic filenames and content‑type headers. Access via the screenshotUrl field with the Apify API token, or download directly from the Apify Console run view.

  • Batch processing with per‑item control — Process up to 50 URLs in a single run, each with independent device, format, full‑page, and delay settings. Mix desktop and mobile captures in the same batch. Override quality for JPEG/WebP per item.

  • Metadata‑rich output — Every result includes the page title, viewport dimensions, device label, page scroll height, image format, capture timestamp, and the direct KVS download URL — structured JSON ready for downstream processing, database insertion, or reporting.

  • Cost‑effective per‑capture pricing — The screenshot-capture event charges only for successfully captured images. Failed captures (timeout, 404, invalid URL) incur no charge. Full‑page captures and CSS selector captures have separate, lower surcharges — you only pay for the enhanced processing when you use it.


Features

Playwright Chromium Engine

The actor uses Playwright's Chromium browser — the same engine that powers modern Chrome. It supports the full modern web platform: ES2023+ JavaScript, WebAssembly, CSS Grid, Flexbox, custom fonts, canvas, WebGL, and service workers. The browser runs in headless mode with --no-sandbox, --disable-dev-shm-usage, and --single-process flags for optimal performance in the Apify container environment.

Three Capture Modes

ModeTriggerUse Case
ViewportfullPage: falseFast capture of above‑the‑fold content. Best for preview thumbnails, dashboard widgets, social link cards.
Full‑PagefullPage: trueComposite image of entire scrollable document. Best for content audits, documentation archives, design reviews.
CSS SelectorcssSelector: "#id"Isolated capture of a single DOM element. Best for visual regression testing of specific components, widget QA, ad verification.

Device Presets with Custom Overrides

PresetDefault ViewportTypical Target
desktop1920×1080Standard laptop/desktop monitors, 16:9 screens
tablet768×1024iPad portrait orientation, medium‑sized tablets
mobile375×812iPhone X‑series portrait, modern smartphones

Any dimension can be overridden independently via the width and height parameters. Setting device: "mobile" with width: 414 produces an iPhone 11 Pro Max width at mobile viewport height.

Image Format Support

FormatTypeBest ForQuality Support
PNGLosslessUI mockups, design reviews, text‑heavy pagesNot applicable (always lossless)
JPEGLossyPhoto‑heavy pages, preview thumbnails, bandwidth‑sensitive use cases1 (smallest) to 100 (highest)
WebPLossy/LosslessModern web applications, Chrome/Edge‑first pipelines1 (smallest) to 100 (highest)

PNG is the default format and the safest choice for pixel‑perfect accuracy. JPEG at quality 85 offers excellent compression for photographic content with minimal visual degradation. WebP provides superior compression ratios over JPEG at equivalent quality settings.

Configurable Navigation Delay

The delay parameter (0–60000ms) injects a pause between page load completion and screenshot capture. This is essential for:

  • CSS animations that trigger on page load (fade‑ins, slide‑ups)
  • A/B testing scripts that swap content after the DOMContentLoaded event
  • Lazy‑loaded images triggered by scroll position or intersection observers
  • Third‑party widget initialisation (chat widgets, cookie consent banners, social share buttons)

Automatic URL Normalisation

URLs submitted without a scheme (example.com) are automatically prefixed with https://. Invalid URLs (empty strings, malformed hosts, non‑HTTP schemes) are caught during input validation with descriptive error messages before any browser process is launched — saving both time and billing charges.

Deterministic Key‑Value Store Naming

Screenshot filenames follow the pattern {domain_sanitised}_{timestamp}.{ext}. For example, a screenshot of https://example.com captured on 24 July 2026 at 14:30:00 would produce example_com_20260724_143000_123456.png. This deterministic naming ensures:

  • No filename collisions within a single run (microsecond precision)
  • Immediate recognisability of the source domain from the filename
  • Idempotent storage keys for the same domain + timestamp combination

Input Parameters

FieldTypeRequiredDefaultDescription
urlstringYes*Single URL to screenshot. Required when batchMode is false.
batchDataarrayNo*[]Batch items array. Required when batchMode is true. Max 50 items.
batchModebooleanNofalseEnable batch processing. true = use batchData, false = use url.
devicestringNodesktopDevice preset: desktop (1920×1080), tablet (768×1024), mobile (375×812).
fullPagebooleanNofalsetrue = full scrollable page, false = viewport only.
delayintegerNo0Milliseconds to wait before capture (max 60000ms).
widthintegerNoCustom viewport width in pixels (320–7680). Overrides device preset.
heightintegerNoCustom viewport height in pixels (240–4320). Overrides device preset.
cssSelectorstringNoCSS selector for element‑specific capture (e.g., #main, .hero).
formatstringNopngOutput format: png, jpeg, or webp.
qualityintegerNoJPEG/WebP quality (1–100). Ignored for PNG.
  • Either url (single mode) or batchData (batch mode) is required, not both.

Example Input

Single URL — Viewport PNG

{
"url": "https://example.com",
"device": "desktop",
"fullPage": false,
"format": "png"
}

Single URL — Full‑Page JPEG with Quality

{
"url": "https://example.com",
"device": "mobile",
"fullPage": true,
"format": "jpeg",
"quality": 85,
"delay": 2000
}

CSS Selector — Element Capture

{
"url": "https://example.com",
"cssSelector": "h1",
"format": "png"
}

Batch Mode — Multiple Devices

{
"batchMode": true,
"batchData": [
{
"url": "https://example.com",
"device": "desktop",
"fullPage": true,
"format": "png"
},
{
"url": "https://example.com",
"device": "tablet",
"fullPage": false,
"format": "png"
},
{
"url": "https://example.com",
"device": "mobile",
"fullPage": false,
"format": "jpeg",
"quality": 90
}
]
}

Output Format

Each successful screenshot produces a dataset item with the following structure:

{
"url": "https://example.com",
"screenshotKey": "example_com_20260724_143000_123456.png",
"device": "desktop",
"fullPage": true,
"format": "png",
"viewport": {
"width": 1920,
"height": 1080
},
"pageTitle": "Example Domain",
"pageHeight": 2430,
"timestamp": "2026-07-24T14:30:00.123456+00:00",
"error": null,
"success": true
}
FieldTypeDescription
urlstringThe original URL that was screenshotted
screenshotKeystringKey‑Value Store record key for the screenshot image. Download via Apify Console (open run → Key-Value Store tab) or via the Apify API with your API token.
devicestringResolved device label (desktop, tablet, mobile, or custom)
fullPagebooleanWhether full‑page capture mode was used
formatstringOutput image format (png, jpeg, webp)
viewportobjectActual viewport dimensions {width, height} used for capture
pageTitlestringDocument title from the HTML <title> tag
pageHeightintegerTotal scrollable height of the page in pixels
timestampstringISO‑8601 UTC timestamp of when the capture was taken
errorstringError message if capture failed, otherwise null
successbooleanWhether the screenshot was captured and stored successfully

Failed Screenshot Example

{
"url": "https://example.com/nonexistent",
"screenshotKey": null,
"device": "desktop",
"fullPage": false,
"format": "png",
"viewport": {
"width": 1920,
"height": 1080
},
"pageTitle": "",
"pageHeight": 0,
"timestamp": "2026-07-24T14:30:05.654321+00:00",
"error": "Navigation timed out: https://example.com/nonexistent",
"success": false
}

Batch Summary Item

After all items are processed, a final summary item is pushed:

{
"status": "completed",
"totalUrls": 3,
"completed": 3,
"failed": 0,
"totalScreenshots": 3,
"fullpageScreenshots": 1,
"selectorScreenshots": 0,
"timestamp": "2026-07-24T14:30:06.789012+00:00"
}

Use Cases

  • Visual regression testing in CI/CD — Integrate the actor into your GitHub Actions or GitLab CI pipeline. On each deploy, capture screenshots of critical pages (homepage, login, checkout) and diff them against the previous run's images stored in the KVS. Detect unintended layout shifts, missing elements, or style regressions before they reach production.

  • Multi‑device responsive audit — Run the same URL through all three device presets in a single batch to verify responsive breakpoints. Capture desktop, tablet, and mobile views simultaneously and compare layouts side‑by‑side. Identify content that is hidden, truncated, or overlapping at specific viewport widths.

  • Competitor landing page monitoring — Schedule weekly runs targeting competitor homepages, pricing pages, and feature announcements. Track visual changes over time — new product banners, redesigned CTAs, updated testimonials. Archive screenshots for competitive intelligence reports and market analysis presentations.

  • Content archive and digital preservation — Capture full‑page screenshots of documentation, blog posts, news articles, and policy pages for permanent archival. The KVS stores images indefinitely, providing a timestamped visual record that survives CMS redesigns, content deletions, or domain changes.

  • Widget and component QA — Use CSS selector mode to isolate specific UI components (navigation bars, cookie consent banners, search result cards, product grids). Capture each component across multiple viewports and formats to verify rendering, responsive behaviour, and visual consistency across the site.

  • Phishing and brand abuse documentation — Security researchers can document malicious websites by capturing full‑page screenshots as evidence. The deterministic naming and KVS storage provide a forensically sound chain of custody. Batch mode processes multiple suspected phishing URLs in one run.

  • SEO preview generation — Generate thumbnail previews of web pages for internal dashboards, link previews in messaging platforms, or visual sitemaps. The screenshotUrl field provides a directly embeddable image URL — no additional CDN or file hosting required.

  • Onboarding flow verification — Capture screenshots of multi‑step onboarding flows (signup, email verification, profile setup, first action) to verify visual correctness across browser environments. Use custom delay values to account for server‑side rendering and third‑party script initialisation.


FAQ

What is the maximum number of URLs I can process in a single run? Up to 50 URLs per run when using batchMode: true. Each URL is processed sequentially to prevent resource exhaustion and ensure capture reliability. For larger workloads, split your URLs across multiple runs or use the Apify scheduler for periodic processing.

Which image format should I choose? Use PNG when pixel accuracy matters — UI mockups, design reviews, text‑heavy content, or any scenario where image quality cannot be compromised. Use JPEG for photo‑heavy pages or bandwidth‑sensitive pipelines where smaller file sizes are more important than lossless quality. Use WebP when your downstream consumers support it (Chrome, Edge, Opera, and modern CDNs) — it provides 25–35% better compression than JPEG at equivalent quality.

Does the actor support authentication or login‑gated pages? Not directly. The actor is designed for publicly accessible websites. If you need to screenshot pages behind a login, you would need to handle authentication externally and pass a session cookie or authentication token — this is beyond the current scope. Pages that return HTTP 401 or 403 are reported as failed captures.

How long are screenshots stored in the Key‑Value Store? Screenshots persist in the KVS for the duration of the actor run's default retention period (typically 7 days for free accounts, indefinite for paid plans). You can download images to your own storage using the screenshotUrl field. For permanent retention, use the Apify KVS API to export records to your own S3/GCS bucket.

What happens if a URL takes too long to load? The actor has a 30‑second navigation timeout per URL. If the page does not reach networkidle within that window, the capture is abandoned with a "Navigation timed out" error and no charge is incurred. This prevents a single slow page from blocking an entire batch run.

Will the screenshots include cookie consent banners or pop‑ups? Yes, unless you use delay: 0 and the page loads them asynchronously after the initial render. Many cookie consent scripts, newsletter pop‑ups, and interstitial ads load after networkidle. If you want to exclude them, consider using a CSS selector to target the main content area only, or pipe the URL through a consent‑management proxy before submitting.

Does full‑page capture work on infinite‑scroll pages? Full‑page mode captures the document at its current scroll height. For pages where content loads dynamically as you scroll (infinite scroll feeds, virtualised lists), the actor captures only the content that was rendered at load time. It does not simulate scroll events to trigger further content loading. For such pages, use viewport‑only mode or increase the delay to allow initial lazy‑loading to complete.

Can I specify different settings for each URL in a batch? Yes. Every item in batchData supports its own device, fullPage, delay, cssSelector, width, height, format, and quality fields. Any field not set at the item level falls back to the top‑level default. This lets you mix desktop and mobile captures, different formats, and different full‑page flags in the same batch.

What happens if my batch contains a mix of valid and invalid URLs? Invalid URLs (empty, malformed, or non‑HTTP schemes) are caught during input validation and the entire run is rejected with a clear error message — no charges are incurred. Valid URLs that fail at capture time (timeouts, network errors, SSL issues) are reported individually with success: false and a descriptive error field. Only the successful captures in the batch trigger charges.

Is the screenshot truly pixel‑perfect? The Playwright Chromium engine renders pages identically to standard Chrome/Edge. However, subtle differences may occur compared to Safari (WebKit) or Firefox (Gecko) due to browser engine rendering differences. The screenshot is an accurate representation of how the page renders in Chromium at the specified viewport dimensions. Font rendering, sub‑pixel anti‑aliasing, and system‑level CSS features (scrollbar styling, accent colours) may vary slightly from a native desktop browser.

Does the actor support JavaScript‑heavy single‑page applications (SPAs)? Yes. Playwright waits for networkidle before capturing, which means all XHR/fetch requests triggered by React, Vue, Angular, or Svelte applications must settle first. The optional delay parameter provides an additional safety margin for SPAs with lazy‑loaded routes, code‑splitting, or deferred third‑party scripts.

How are duplicate URLs handled in batch mode? Duplicate URLs are processed independently — each gets its own browser context and separate screenshot. If you submit the same URL twice in batchData, you get two separate captures with different timestamps and screenshot keys. There is no deduplication logic; duplicates are treated as distinct tasks.

Can I use this actor to monitor my own website for visual changes? Yes. Schedule the actor to run daily/weekly via the Apify scheduler and compare screenshotUrl outputs across runs. The deterministic naming convention (domain + timestamp) makes it straightforward to build a visual diff pipeline. Use external tools like pixelmatch or resemble.js to compare the downloaded PNG buffers and flag differences beyond a configurable threshold.

What formats are available for the metadata output? The primary output format is JSON pushed to the Apify dataset. The dataset can be exported via the Apify API in JSON, CSV, XML, RSS, Excel, or HTML formats. The screenshot image itself is stored as a binary record in the KVS with the appropriate Content-Type header for direct browser rendering.


Usage & Billing

The actor uses a pay‑per‑event pricing model. You are charged only for events that are successfully processed. The following table describes each chargeable event:

Event NamePrice (USD)Trigger Condition
apify-actor-start$0.005Fired once when the actor run starts. Always applies.
screenshot-capture$0.025Fired per successfully captured screenshot. Not charged for failed captures.
fullpage-capture$0.015Surcharge per screenshot captured in full‑page mode (fullPage: true). Stacked on top of screenshot-capture.
batch-process$0.01Surcharge fired once when batchMode is true. Applies regardless of how many items are in the batch.
selector-capture$0.01Surcharge per screenshot captured with a CSS selector (cssSelector is set). Stacked on top of screenshot-capture.

Charge stacking example — batch full‑page selector capture: A batch run with 10 URLs, all using fullPage: true and cssSelector: "#main" would incur:

  • 1 × apify-actor-start = $0.005
  • 1 × batch-process = $0.010
  • 10 × screenshot-capture = $0.250
  • 10 × fullpage-capture = $0.150
  • 10 × selector-capture = $0.100
  • Total = $0.515

Charge exclusion example — single URL that times out: A single‑URL run where the page fails to load would incur only:

  • 1 × apify-actor-start = $0.005
  • Total = $0.005

The minimum charge per run is $0.10. The maximum charge per run is capped at $0.10 for runs with no successful captures (just the start event), scaling proportionally for successful captures. Platform usage fees (Apify compute, storage, and bandwidth) are billed separately by Apify based on your account plan.


MCP Integration

The Website Screenshot Generator is available through the Apify MCP (Model Context Protocol) server, enabling AI assistants like Claude Desktop, Cursor, and VS Code to capture website screenshots on demand.

Quick Start

Connect your AI assistant to the Apify MCP server and use natural language prompts to trigger screenshot captures. The MCP server handles authentication via OAuth — no API keys needed for browser‑equipped clients.

Example Prompts

"Capture a full‑page screenshot of example.com as a PNG at desktop resolution."

"Take mobile viewport screenshots of example.com and example.org, both as JPEG at 85% quality."

"Screenshot the main content area of example.com using CSS selector '#content' and save as WebP."

Claude Desktop Configuration

Add this to your claude_desktop_config.json:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com"
}
}
}

Note: On first connection, your browser opens to sign in to Apify and authorise access. No manual token configuration is needed for desktop clients.

Bearer Token Alternative

For headless/CI/CD clients (Cursor, VS Code, custom scripts) that cannot perform browser‑based OAuth, use the Bearer token configuration:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com",
"headers": {
"Authorization": "Bearer YOUR_APIFY_TOKEN"
}
}
}
}

Replace YOUR_APIFY_TOKEN with your Apify API token.

How It Works

The Apify MCP server exposes all published actors as discoverable tools. Once connected, your AI assistant can search for "Website Screenshot Generator" (or any actor) using the built‑in discovery tools, then invoke it with structured parameters — all through natural language. The actor runs on Apify's infrastructure, and results (screenshot URLs, metadata) are returned directly to the assistant.

For more details, visit the Apify MCP documentation.


  • OG Preview Generator — Extract and validate Open Graph meta tags (og:title, og:description, og:image, twitter:card) from any URL. Generate structured preview cards for social media sharing. Pairs with screenshot captures for complete visual preview workflows.

  • Favicon Downloader & Converter — Detect, analyse, and download favicons from any website. Scans HTML link tags and standard paths to find every available icon. Combine with screenshot captures for complete website visual profiling.

  • URL Health — Comprehensive URL diagnostics: HTTP status codes, response times, redirect chain analysis, SSL/TLS certificate validation, and content‑type detection. Run alongside screenshots to capture both the visual and structural health of web pages.

  • Link Quality Analyzer — Analyse link quality across web pages: broken links, redirect chains, anchor text relevance, and link density. Use with screenshot captures for full‑spectrum page quality assessment.

  • Content Readability Analyzer — Score web page content against 6 readability formulas (Flesch Reading Ease, Flesch‑Kincaid Grade Level, Gunning Fog, Coleman‑Liau, SMOG, Automated Readability Index). Pair with screenshots for visual + textual content analysis.

  • Website Tech Stack Detector — Identify technologies powering any website: CMS, frameworks, analytics, CDNs, and server software. Use alongside screenshot captures for comprehensive website profiling during competitive intelligence or migration planning.

  • JSON Studio — Format, validate, diff, transform, and explore JSON documents. Useful for post‑processing screenshot metadata and integrating structured capture results into data pipelines.