Screenshot & PDF API avatar

Screenshot & PDF API

Pricing

$2.00 / 1,000 successful captures

Go to Apify Store
Screenshot & PDF API

Screenshot & PDF API

Use this when you need bulk website screenshots or PDFs of any URL as PNG, JPEG, WebP or PDF. Supports full-page, element and mobile viewports, plus cookie-banner hiding. Input a list of URLs. Failed captures are not billed. $2 per 1,000 successful captures. Not a text or product scraper.

Pricing

$2.00 / 1,000 successful captures

Rating

0.0

(0)

Developer

Jindrich Klimes

Jindrich Klimes

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

35 minutes ago

Last modified

Categories

Features

Limited permissions

Share

High-performance screenshot and PDF generation for any website. Capture pages as PNG, JPEG, WebP, or PDF with full customization.

The Screenshot & PDF API Actor provides a reliable, fast way to capture website screenshots and generate PDFs at scale. Perfect for website monitoring, content archiving, report generation, social media previews, QA testing, and AI agents that need to "see" web pages.

Why This Actor?

✅ Fast & Reliable - Built on Playwright with proper error handling and robust resource management
✅ Cost-Optimized - Efficient browser reuse, smart resource blocking, and high concurrency support
✅ Feature-Rich - Full viewport control, element selection, wait strategies, dark mode, custom CSS/JS
✅ Clean Output - Auto-hide cookie banners, trigger lazy loading, capture exactly what you need
✅ Flexible Formats - PNG, JPEG, WebP screenshots + full PDF generation
✅ AI-Friendly - Structured output with metadata, public file URLs, detailed error reporting

Features

  • Multiple formats: PNG, JPEG, WebP, and PDF in a single run
  • Device presets: Desktop (1920×1080), Tablet (768×1024), Mobile (375×667), or custom viewport
  • Full page or viewport: Capture entire scrollable page or just visible area
  • Element selection: Capture a specific element by CSS selector
  • Smart waiting: Wait for load event, network idle, fixed delay, or specific CSS selector
  • Cookie banner removal: Best-effort hiding of common consent dialogs
  • Dark mode support: Emulate prefers-color-scheme: dark
  • Custom CSS/JS injection: Modify page appearance or behavior before capture
  • Lazy loading: Auto-scroll to trigger lazy-loaded images
  • PDF customization: A4/Letter/Legal formats, landscape, margins, background graphics
  • Quality control: Adjustable JPEG/WebP quality (1-100)
  • Concurrent processing: Configure max concurrency for speed vs. resources
  • Proxy support: Optional Apify Proxy configuration
  • Detailed metadata: Page title, dimensions, file size, HTTP status, timestamps

Input

{
"urls": [
"https://example.com",
"https://en.wikipedia.org/wiki/Web_scraping"
],
"outputFormats": ["png", "pdf"],
"viewportPreset": "desktop",
"fullPage": true,
"waitStrategy": "load",
"hideCookieBanners": true,
"darkMode": false,
"scrollToTriggerLazyLoad": false,
"imageQuality": 90,
"pdfFormat": "A4",
"pdfLandscape": false,
"pdfPrintBackground": true,
"timeout": 30,
"maxConcurrency": 3
}

Input Parameters

ParameterTypeRequiredDefaultDescription
urlsArray✅ Yes-List of URLs to capture
outputFormatsArray✅ Yes["png"]Capture formats: png, jpeg, webp, pdf
viewportPresetStringNodesktopDevice preset: desktop (1920×1080), tablet (768×1024), mobile (375×667), custom
viewportWidthIntegerNo1920Custom viewport width (only used if preset is custom)
viewportHeightIntegerNo1080Custom viewport height (only used if preset is custom)
fullPageBooleanNotrueCapture entire scrollable page (true) or just viewport (false)
waitStrategyStringNoloadWhen to capture: load, networkidle, delay, selector
waitDelayIntegerNo2000Fixed delay in ms (used when waitStrategy is delay)
waitSelectorStringNo-CSS selector to wait for (used when waitStrategy is selector)
captureSelectorStringNo-CSS selector to capture only a specific element
hideCookieBannersBooleanNotrueAttempt to hide common cookie consent banners
darkModeBooleanNofalseEmulate dark mode (prefers-color-scheme: dark)
customCssStringNo-Inject custom CSS before capture
customJavaScriptStringNo-Execute custom JavaScript before capture
scrollToTriggerLazyLoadBooleanNofalseSlowly scroll down to trigger lazy-loaded images
imageQualityIntegerNo90JPEG/WebP quality (1-100, PNG ignores this)
pdfFormatStringNoA4PDF page size: A4, Letter, Legal
pdfLandscapeBooleanNofalseUse landscape orientation for PDFs
pdfPrintBackgroundBooleanNotrueInclude background graphics in PDFs
pdfMarginStringNo-PDF margins (e.g., 10mm, 0.5in)
timeoutIntegerNo30Timeout per URL in seconds (5-120)
maxConcurrencyIntegerNo3Max concurrent browser pages (1-10)
proxyConfigurationObjectNo-Apify Proxy config (leave empty for no proxy)

Output

Each URL produces one dataset row per output format:

{
"url": "https://example.com",
"final_url": "https://example.com/",
"status": "ok",
"http_status": 200,
"format": "png",
"file_key": "example-com-1699882920000.png",
"file_url": "https://api.apify.com/v2/key-value-stores/abc123/records/example-com-1699882920000.png",
"width": 1920,
"height": 3840,
"file_size_bytes": 524288,
"page_title": "Example Domain",
"captured_at": "2026-11-13T15:22:00.000Z",
"error_message": null
}

Output Fields

FieldTypeDescription
urlStringOriginal URL requested
final_urlStringFinal URL after redirects
statusStringCapture status: ok or error
http_statusIntegerHTTP response status code (null if unavailable)
formatStringFile format: png, jpeg, webp, or pdf
file_keyStringKey in the key-value store (null on error)
file_urlStringPublic URL to download the file (null on error)
widthIntegerImage width in pixels (null for PDFs or on error)
heightIntegerImage height in pixels (null for PDFs or on error)
file_size_bytesIntegerFile size in bytes (null on error)
page_titleStringPage title from HTML <title> tag (null on error)
captured_atStringISO 8601 timestamp when captured
error_messageStringError details if status is error (null otherwise)

Accessing Captured Files

Files are stored in the Actor run's default key-value store. Download them:

  1. Via dataset URLs: Each row's file_url field contains a direct download link
  2. Via Apify API: GET https://api.apify.com/v2/key-value-stores/{storeId}/records/{file_key}
  3. Via Apify Console: View the run's key-value store tab

Files are publicly accessible for the lifetime of the run's storage (default: 7 days for free accounts, configurable for paid).

Use Cases & Recipes

📸 Website Monitoring

Track visual changes to detect unauthorized modifications, monitor uptime, or analyze competitor strategies.

Recipe:

{
"urls": ["https://competitor.com/pricing", "https://mysite.com/landing"],
"outputFormats": ["png"],
"viewportPreset": "desktop",
"fullPage": true,
"waitStrategy": "load"
}

Schedule: Run daily or hourly via Apify Schedules. Compare screenshots with previous runs to detect changes. Store results in named KV stores for long-term retention.

🎨 Open Graph & Social Preview Images

Generate accurate social media preview images by capturing pages at the standard Open Graph dimensions (1200×630).

Recipe:

{
"urls": ["https://blog.example.com/article-1"],
"outputFormats": ["png"],
"viewportPreset": "custom",
"viewportWidth": 1200,
"viewportHeight": 630,
"fullPage": false,
"hideCookieBanners": true
}

Integration: Pipe to image processing APIs, upload to CDN, or validate Open Graph tags before publishing.

📦 Archiving & Compliance PDFs

Create permanent PDF records of web pages for legal compliance, auditing, or historical documentation.

Recipe:

{
"urls": ["https://docs.example.com/terms", "https://contracts.example.com/agreement-123"],
"outputFormats": ["pdf"],
"pdfFormat": "Letter",
"pdfPrintBackground": true,
"pdfMargin": "0.5in",
"waitStrategy": "networkidle"
}

Best practices: Enable pdfPrintBackground for complete visual fidelity. Use Letter/Legal formats for US compliance. Store in named KV stores with long retention periods.

🧪 QA Visual Regression Testing

Automate visual testing by comparing screenshots across deployments, browsers, or time periods.

Recipe:

{
"urls": ["https://staging.example.com/checkout", "https://production.example.com/checkout"],
"outputFormats": ["png"],
"viewportPreset": "mobile",
"fullPage": true,
"waitStrategy": "networkidle",
"hideCookieBanners": true
}

Workflow: Capture both staging and production, use image diff tools (e.g., Pixelmatch) to detect visual regressions. Integrate with CI/CD pipelines via webhooks.

Integrations

The Actor outputs data to Apify's dataset storage, which integrates with:

  • API - Fetch results via Apify's REST API
  • Webhooks - Get notified when runs complete, then download files
  • Google Sheets - Export metadata to spreadsheets
  • Make - Build workflows with 1000+ apps
  • Zapier - Connect to 5000+ apps
  • n8n - Self-hosted workflow automation
  • Direct download - Use file_url in dataset rows to download files programmatically

Examples

Basic Screenshot

Capture example.com as PNG:

{
"urls": ["https://example.com"],
"outputFormats": ["png"]
}

Mobile Screenshot with Lazy Loading

{
"urls": ["https://news.ycombinator.com"],
"outputFormats": ["png"],
"viewportPreset": "mobile",
"scrollToTriggerLazyLoad": true,
"waitStrategy": "networkidle"
}

Dark Mode PDF

{
"urls": ["https://docs.github.com"],
"outputFormats": ["pdf"],
"darkMode": true,
"pdfFormat": "Letter",
"pdfPrintBackground": true
}

Capture Specific Element

Capture only the main article:

{
"urls": ["https://en.wikipedia.org/wiki/Web_scraping"],
"outputFormats": ["png"],
"captureSelector": "#mw-content-text",
"fullPage": false
}

Custom CSS Injection

Remove ads and adjust styling:

{
"urls": ["https://example.com"],
"outputFormats": ["png"],
"customCss": ".ad, .sidebar { display: none !important; } body { font-size: 18px; }"
}

High-Resolution Multiple Formats

Capture as PNG and PDF with custom viewport:

{
"urls": ["https://example.com"],
"outputFormats": ["png", "pdf"],
"viewportPreset": "custom",
"viewportWidth": 2560,
"viewportHeight": 1440,
"imageQuality": 95
}

Ready-made example tasks

Open one, check the prefilled input, and run it in one click:

Pricing

This Actor uses pay-per-event pricing at $0.002 per successful capture ($2.00 per 1,000 captures).

How Captures Are Counted

One capture event is charged per successful file generated:

  • ✅ 1 URL + 1 format (PNG) = 1 capture = $0.002
  • ✅ 1 URL + 2 formats (PNG + PDF) = 2 captures = $0.004
  • ✅ 100 URLs + 1 format = 100 captures = $0.20
  • ❌ Failed captures = 0 captures (free)

Important: Each output format counts as one capture. If you request 3 formats (PNG, JPEG, PDF) for 1 URL, you'll be charged for 3 captures.

Example scenarios:

  • Website monitoring (1,000 PNGs daily) = 1,000 captures = $2.00/day
  • Social previews (500 URLs, PNG + WebP) = 1,000 captures = $2.00/batch
  • PDF archiving (200 contracts) = 200 captures = $0.40/batch

Use maxConcurrency and blockResources options to optimize speed without affecting cost.

Performance & Limitations

Performance

  • Speed: ~2-4 seconds per URL (desktop viewport, viewport PNG with resource blocking)
  • Memory: Optimized browser reuse reduces overhead
  • Recommended concurrency: 5-8 for 2048 MB, 3-5 for 1536 MB

Limitations

  • JavaScript required: Only works with JavaScript-enabled content (uses real browser)
  • Authentication: No built-in login flow (use custom JavaScript or cookies)
  • Dynamic content: Some pages with complex SPAs may need custom wait strategies
  • File retention: Files stored in KV store follow Apify's retention policy (default: 7-30 days)

FAQ

The Actor tries to hide common cookie consent dialogs, but new or custom banners may not be detected. Use customCss to hide specific elements:

{
"customCss": "#cookie-banner { display: none !important; }"
}

How do I capture pages that require login?

This Actor doesn't include authentication flows. Options:

  1. Use customJavaScript to set cookies/localStorage before capture
  2. Capture pages with public access tokens in the URL
  3. Use a custom Actor that handles your specific auth flow

Can I capture localhost or internal URLs?

No. Apify Actors run in the cloud and cannot access local networks. Use the Apify CLI to test locally, or deploy your internal pages with public access.

Why is my PDF cut off or missing content?

Try these fixes:

  • Set pdfPrintBackground: true to include background images
  • Increase timeout to allow more time for content to load
  • Use waitStrategy: "networkidle" to wait for all resources
  • Use scrollToTriggerLazyLoad: true for lazy-loaded content

What's the difference between PNG and JPEG?

  • PNG: Lossless, larger files, supports transparency, best for text-heavy pages
  • JPEG: Lossy, smaller files, no transparency, best for photo-heavy pages
  • WebP: Modern format, smaller than JPEG, lossy or lossless, best browser support

Use PNG for documents/dashboards, JPEG for content-heavy sites, WebP for modern workflows.

How long are captured files stored?

Files are stored in the Actor run's key-value store, which follows Apify's data retention policy:

  • Free accounts: 7 days
  • Paid accounts: 30+ days (configurable)

Download files immediately or use Apify's named key-value stores for longer retention.

Can I capture sites behind Cloudflare or bot detection?

Basic Cloudflare challenges should work. For advanced bot detection:

  • Enable proxyConfiguration with Apify residential proxies
  • Use waitStrategy: "delay" with higher delays
  • Inject custom headers via customJavaScript

If you encounter persistent issues, contact support.

What is resource blocking and should I use it?

By default, the Actor blocks fonts and video/audio resources (blockResources: true) to speed up page loads without affecting visual output. This reduces network overhead and speeds up captures by 20-40% on media-heavy sites.

What's blocked: Web fonts, video elements, audio elements
What's kept: Images, stylesheets, scripts, iframes

Turn it off (blockResources: false) if:

  • You need exact font rendering for typography-sensitive captures
  • The page requires media elements to render correctly

Support

License

This Actor is proprietary software operated by Cleanrows. Usage is subject to Apify's Terms of Service and Cleanrows' usage policies.


More Cleanrows Actors: Check out our ATS Jobs Feed Actor for recruiting intelligence and lead generation from hiring data.