Screenshot & PDF API
Pricing
$2.00 / 1,000 successful captures
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
35 minutes ago
Last modified
Categories
Features
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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
urls | Array | ✅ Yes | - | List of URLs to capture |
outputFormats | Array | ✅ Yes | ["png"] | Capture formats: png, jpeg, webp, pdf |
viewportPreset | String | No | desktop | Device preset: desktop (1920×1080), tablet (768×1024), mobile (375×667), custom |
viewportWidth | Integer | No | 1920 | Custom viewport width (only used if preset is custom) |
viewportHeight | Integer | No | 1080 | Custom viewport height (only used if preset is custom) |
fullPage | Boolean | No | true | Capture entire scrollable page (true) or just viewport (false) |
waitStrategy | String | No | load | When to capture: load, networkidle, delay, selector |
waitDelay | Integer | No | 2000 | Fixed delay in ms (used when waitStrategy is delay) |
waitSelector | String | No | - | CSS selector to wait for (used when waitStrategy is selector) |
captureSelector | String | No | - | CSS selector to capture only a specific element |
hideCookieBanners | Boolean | No | true | Attempt to hide common cookie consent banners |
darkMode | Boolean | No | false | Emulate dark mode (prefers-color-scheme: dark) |
customCss | String | No | - | Inject custom CSS before capture |
customJavaScript | String | No | - | Execute custom JavaScript before capture |
scrollToTriggerLazyLoad | Boolean | No | false | Slowly scroll down to trigger lazy-loaded images |
imageQuality | Integer | No | 90 | JPEG/WebP quality (1-100, PNG ignores this) |
pdfFormat | String | No | A4 | PDF page size: A4, Letter, Legal |
pdfLandscape | Boolean | No | false | Use landscape orientation for PDFs |
pdfPrintBackground | Boolean | No | true | Include background graphics in PDFs |
pdfMargin | String | No | - | PDF margins (e.g., 10mm, 0.5in) |
timeout | Integer | No | 30 | Timeout per URL in seconds (5-120) |
maxConcurrency | Integer | No | 3 | Max concurrent browser pages (1-10) |
proxyConfiguration | Object | No | - | 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
| Field | Type | Description |
|---|---|---|
url | String | Original URL requested |
final_url | String | Final URL after redirects |
status | String | Capture status: ok or error |
http_status | Integer | HTTP response status code (null if unavailable) |
format | String | File format: png, jpeg, webp, or pdf |
file_key | String | Key in the key-value store (null on error) |
file_url | String | Public URL to download the file (null on error) |
width | Integer | Image width in pixels (null for PDFs or on error) |
height | Integer | Image height in pixels (null for PDFs or on error) |
file_size_bytes | Integer | File size in bytes (null on error) |
page_title | String | Page title from HTML <title> tag (null on error) |
captured_at | String | ISO 8601 timestamp when captured |
error_message | String | Error details if status is error (null otherwise) |
Accessing Captured Files
Files are stored in the Actor run's default key-value store. Download them:
- Via dataset URLs: Each row's
file_urlfield contains a direct download link - Via Apify API:
GET https://api.apify.com/v2/key-value-stores/{storeId}/records/{file_key} - 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_urlin 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:
- Convert a list of URLs to PDF in bulk
- Take full-page screenshots of websites
- Capture mobile screenshots of websites
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
Why do some captures have cookie banners?
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:
- Use
customJavaScriptto set cookies/localStorage before capture - Capture pages with public access tokens in the URL
- 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: trueto include background images - Increase
timeoutto allow more time for content to load - Use
waitStrategy: "networkidle"to wait for all resources - Use
scrollToTriggerLazyLoad: truefor 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
proxyConfigurationwith 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
- Issues: Report bugs or request features via the Apify Store issues tab for this Actor
- Documentation: Apify Actors documentation
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.