Website Screenshot API: Full Page, Mobile & Desktop
Under maintenancePricing
from $0.01 / 1,000 row returneds
Website Screenshot API: Full Page, Mobile & Desktop
Under maintenanceTurn web page URLs or your own HTML into PNG or JPEG images with public links. Choose device, dark mode, full page or a single element, hide cookie banners, and wait for dynamic content. Failed captures are not charged.
Pricing
from $0.01 / 1,000 row returneds
Rating
0.0
(0)
Developer
bite-sized-insights
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Turn any public web page, or HTML you generate yourself, into a PNG or JPEG image. Give it a list of URLs or HTML documents; every one comes back as an image file with a public link, its pixel size and its file size. Pick a device, capture the whole page or a single element, switch to dark mode and hide cookie banners.
What this actor does
- Captures web pages and raw HTML. Paste URLs, pass your own HTML (email previews, social cards, reports), or both in the same run.
- Real page rendering. Pages are loaded the way a visitor sees them, including content that appears after the page opens, so modern sites come out complete instead of blank.
- Device presets. Desktop, laptop, tablet and phone, each with a matching window size and pixel density. Phones and tablets also get touch and mobile page layout. Override the width, height or pixel density (1x to 4x) for any custom size.
- Full page or first screen. Capture only what is visible on load, or the whole scrollable page.
- Single elements. Give a CSS selector and get just that element: a pricing table, a chart, a product card.
- Light and dark mode. Sites that follow the visitor's color preference switch with one setting.
- PNG or JPEG. PNG for lossless captures and transparent backgrounds, JPEG with adjustable quality for small files.
- Page clean-up. Hide elements such as cookie banners or chat widgets, add your own CSS, and freeze animations for steady results.
- Wait conditions. Wait for the page to finish loading, for the network to go quiet, for a specific element to appear, or for a fixed extra moment. Each screenshot has its own time limit.
- Public image links. Each image is stored with the run and linked in the results, ready to download or to hand to the next step of your workflow.
- Runs sources in parallel and delivers results as each one finishes.
Quick start
{"urls": ["https://example.com"]}
Click Start. Each image appears in the results as soon as it is ready, with a link in the image_url column.
Full-page phone screenshot in dark mode
{"urls": ["https://example.com"],"devicePreset": "mobile","fullPage": true,"colorScheme": "dark","format": "jpeg","quality": 85,"hideSelectors": [".cookie-banner", "#chat-widget"]}
Capture one element
{"urls": ["https://example.com/pricing"],"selector": "#plans","deviceScaleFactor": 2,"waitForSelector": "#plans"}
Capture your own HTML
{"urls": [],"htmlDocuments": ["<html><body style=\"font-family:sans-serif\"><h1>Launch day</h1></body></html>"],"viewportWidth": 1200,"viewportHeight": 630}
The URL list has an example prefilled; empty it (as above) when you only want to capture HTML.
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
urls | Array[String] | ["https://example.com"] | Public web pages to capture, up to 100. Domain or URL. |
htmlDocuments | Array[String] | [] | Complete HTML documents, up to 20, each up to 1,000,000 characters. |
devicePreset | String | desktop | desktop 1920x1080, laptop 1440x900, tablet 820x1180, mobile 390x844 |
viewportWidth, viewportHeight | Integer | from the device | Window size in pixels, 200 to 4000. |
deviceScaleFactor | Number | from the device | Pixel density, 1 to 4. A value of 2 doubles width and height. |
colorScheme | String | light | light or dark. |
fullPage | Boolean | false | Capture the whole scrollable page instead of the first screen. |
selector | String | - | CSS selector; captures only the first match. Not combinable with fullPage. |
format | String | png | png or jpeg. |
quality | Integer | 80 | JPEG quality, 1 to 100. Ignored for PNG. |
omitBackground | Boolean | false | Transparent background where the page paints none. PNG only. |
hideSelectors | Array[String] | [] | CSS selectors of elements to hide, up to 25. |
customCss | String | - | Extra styles applied for the capture, up to 20,000 characters. |
disableAnimations | Boolean | false | Finish running animations and stop endless ones first. |
waitUntil | String | load | load, domcontentloaded (fastest) or networkidle (waits for late content). |
waitForSelector | String | - | CSS selector that must be present before the page is captured. |
waitMs | Integer | 0 | Extra pause in milliseconds after the page is ready, up to 10000. |
timeoutSeconds | Integer | 30 | Time limit per screenshot, 5 to 120. |
failOnHttpError | Boolean | true | Skip the screenshot when the page answers with an error such as 404 or 500. |
At least one URL or one HTML document is required. Only public http(s) addresses are accepted: entries pointing at private or local addresses, containing credentials, or otherwise malformed are rejected as invalid input before any work starts.
Size limits
An image can hold at most 40 million pixels (width x height x pixel density squared). That fits a 1920 x 1080 window at 4x density, or a full page about 20,000 pixels tall at a width of 1920. Runs with a window that is too large for that are rejected up front. A full-page or element capture that turns out larger fails for that source only and is not charged. A single image can be up to 50 MB.
Output
One row per source, in the results table and the dataset. The image itself is stored with the run; image_url is the public link to it.
Successful capture
{"source": "https://example.com/","source_type": "url","status": "success","image_url": "https://api.apify.com/v2/key-value-stores/xxxxxxxxxxxxxxxxx/records/screenshot-0001-1a2b3c4d.png","image_key": "screenshot-0001-1a2b3c4d.png","format": "png","width": 1920,"height": 1080,"file_size_bytes": 28461,"capture_seconds": 0.92,"final_url": "https://example.com/","http_status": 200,"error": null}
Source that could not be captured
{"source": "https://example.com/missing","source_type": "url","status": "failed","image_url": null,"image_key": null,"format": null,"width": null,"height": null,"file_size_bytes": null,"capture_seconds": null,"final_url": null,"http_status": null,"error": "The page responded with HTTP 404"}
Every row has the same keys. HTML inputs are labelled HTML document 1, HTML document 2, ... in source; final_url and http_status only apply to URL inputs.
A source fails when the page cannot be reached, answers with an error status (unless failOnHttpError is off), is not allowed (private or local addresses), has no element matching selector, or exceeds its time limit. Failed sources are not charged. A source that cannot be finished within the run's remaining time is not started: it gets a failed row with the code time_limit and is not charged. If the run is stopped or migrated, sources not yet started are left out and everything delivered so far stays in the dataset. A problem with the run's access to the screenshot service ends the run with an error message instead of producing rows.
Pricing: pay per screenshot
You pay for every screenshot that was captured and delivered, plus a small flat fee per run. Failed sources are free. Apify's platform dataset-item fee ($0.00001 per row) applies to every row written to the dataset, including failed rows.
| Event | Price |
|---|---|
| Screenshot captured and delivered | $0.0155 on the Free plan (about $15.50 per 1,000 screenshots); cheaper on higher plans, see below |
| Run start | $0.00005 |
Price per screenshot by Apify plan:
| Plan | Price | Per 1,000 screenshots |
|---|---|---|
| Free | $0.0155 | $15.50 |
| Bronze | $0.0147 | $14.70 |
| Silver | $0.0132 | $13.20 |
| Gold, Platinum, Diamond | $0.0101 | $10.10 |
Free test runs
New users on Apify's free plan get up to 5 free runs of this actor (lifetime total), each capped to 3 sources. Runs started via the Apify Console's "Test" button are capped to 3 sources too, regardless of plan, and don't count against the 5 free runs.
How long does a run take?
Most pages take one to five seconds each, with up to 2 sources processed at once. Pages that load content late, or that you ask to wait for an element or for the network to settle, take longer, up to the time limit you set. Results stream into the dataset as each source finishes.
FAQ
Can I capture pages behind a login?
No. Only publicly reachable pages can be captured. For private content, pass the page's HTML in htmlDocuments instead.
Why is part of the page missing from my screenshot?
The page probably loads that content late. Try waitUntil: networkidle, waitForSelector with an element that appears once the content is there, or a short waitMs. Pages that reveal content while scrolling may need customCss to show it, since the capture does not scroll the page.
How do I get a sharper image?
Raise deviceScaleFactor. A value of 2 produces an image twice as wide and tall as the window size, the same as a retina screen.
How long are the image links available?
The files are stored with the run, so they stay available as long as the run's data does. Download or copy them if you need them for longer. Anyone who has the link can open the file, so treat links like the data they point to.
Can I get WebP?
Not at the moment. Use PNG for lossless captures or JPEG for small files.
Related Actors
- URL to PDF Converter - Archive pages as PDF.
- image similarity score - Detect visual changes automatically.
- bulk image converter - Convert, compress and resize in bulk.
Disclaimer
Only capture pages you are allowed to copy and store. The actor does not alter page content apart from the hiding and styling you ask for, and what ends up in the image depends on what the page shows at the time of capture.
Need help? Open an issue on the actor's repository or contact support through Apify Console.