URL to Screenshot
Pricing
from $12.00 / 1,000 results
Pricing
from $12.00 / 1,000 results
Rating
0.0
(0)
Developer
Kulwinder
Actor stats
0
Bookmarked
2
Total users
2
Monthly active users
2 days ago
Last modified
Categories
Share
๐ธ URL to Screenshot
Capture full-page or viewport screenshots of any public webpage โ clean, fast, and configurable.
Overview
URL to Screenshot is an Apify Actor that takes a URL and returns a screenshot of the page. It supports multiple image formats, device presets, dark mode, ad blocking, and cookie banner removal โ so you always get a clean, accurate capture.
Perfect for visual regression testing, web archiving, content previews, monitoring, and more.
Features
- ๐ Full-page or viewport-only screenshots
- ๐ผ๏ธ Output in
jpeg,png,webp, orpdf - ๐ฑ Device presets:
mobile,tablet,desktop,4K - ๐ซ Blocks ads, trackers, and cookie banners by default
- ๐ Dark mode support
- ๐จ Transparent background option
- ๐ Proxy support for anti-bot protection
Input
The actor accepts a JSON input object. Only url is required.
Example Input
{"url": "https://example.com","fullPage": true,"fileType": "png","viewportDevice": "desktop","blockAds": true,"blockTrackers": true,"blockCookiesBanner": true,"darkMode": false,"quality": 90}
Input Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
url | string | โ | โ Yes | The URL of the page to screenshot. Must start with http:// or https://. |
fullPage | boolean | true | No | When true, captures the full scrollable page instead of just the visible viewport. |
fileType | string | "jpeg" | No | Output image format. One of: jpeg, png, webp, pdf. |
blockAds | boolean | true | No | Removes ad banners and sponsored content before capturing. |
blockTrackers | boolean | true | No | Disables analytics scripts and tracking pixels for faster, more private captures. |
blockCookiesBanner | boolean | true | No | Hides or removes GDPR/CCPA cookie consent banners for a cleaner output. |
viewportDevice | string | "desktop" | No | Simulates a device screen size. One of: mobile, tablet, desktop, 4K. |
viewportWidth | integer | 0 | No | Custom viewport width in pixels (0โ7680). Overrides viewportDevice if set. |
viewportHeight | integer | 0 | No | Custom viewport height in pixels (0โ7680). Overrides viewportDevice if set. |
omitBackground | boolean | false | No | Renders the screenshot with a transparent background. Only effective with png. |
darkMode | boolean | false | No | Requests the site's CSS dark theme via prefers-color-scheme: dark. |
quality | integer | 100 | No | Image quality from 1 to 100. Not applicable to png. |
proxyConfiguration | object | { "useApifyProxy": false } | No | Proxy settings for bypassing anti-bot protection. |
Parameter Details
url
The full URL of the page to capture. Must match the pattern:
https://example.comhttp://sub.domain.co/path/to/page
fileType
Choose the output format based on your use case:
| Format | Best For |
|---|---|
jpeg | General use, smaller file size |
png | High quality, transparency support |
webp | Modern compression, smaller than jpeg |
pdf | Document archiving, print-ready output |
viewportDevice vs viewportWidth / viewportHeight
Use viewportDevice to quickly simulate a known device. If you need exact dimensions, set viewportWidth and/or
viewportHeight โ these will override viewportDevice.
| Device | Approximate Width |
|---|---|
mobile | ~375px |
tablet | ~768px |
desktop | ~1280px |
4K | ~3840px |
quality
Controls compression for jpeg and webp outputs. Has no effect on png, which is always lossless.
proxyConfiguration
Pass Apify Proxy settings to route requests through a proxy. Example:
{"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]}}
Output
The actor saves the screenshot to the Apify Key-Value Store under the key OUTPUT. You can retrieve it via the
Apify API or the Actor run detail page.
Example API URL to fetch the output:
https://api.apify.com/v2/key-value-stores/{storeId}/records/OUTPUT
Usage Examples
Minimal โ just a URL
{"url": "https://news.ycombinator.com"}
Full-page PNG with clean rendering
{"url": "https://example.com","fullPage": true,"fileType": "png","blockAds": true,"blockCookiesBanner": true}
Mobile viewport screenshot
{"url": "https://example.com","viewportDevice": "mobile","fileType": "jpeg","quality": 80}
Dark mode, custom resolution
{"url": "https://example.com","darkMode": true,"viewportWidth": 1920,"viewportHeight": 1080,"fileType": "png"}
Limits & Notes
viewportWidthandviewportHeightaccept values between0and7680.qualitymust be between1and100; values outside this range will be rejected.- The
omitBackgroundoption only produces visible transparency inpngoutput. - Cookie banner removal targets common GDPR/CCPA overlays; some custom implementations may not be detected.