Website Screenshot API (Full Page, Mobile, No Cookie Banners) avatar

Website Screenshot API (Full Page, Mobile, No Cookie Banners)

Pricing

from $4.00 / 1,000 screenshot takens

Go to Apify Store
Website Screenshot API (Full Page, Mobile, No Cookie Banners)

Website Screenshot API (Full Page, Mobile, No Cookie Banners)

Full-page screenshots without cookie banners or ads, as PNG, JPEG or PDF. $4 per 1,000. Pages that return 4xx or 5xx are delivered but not charged.

Pricing

from $4.00 / 1,000 screenshot takens

Rating

0.0

(0)

Developer

Matias Isnard

Matias Isnard

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Security

Limited permissions

Share

Full-page screenshots without cookie banners or ads, as PNG, JPEG or PDF. $4 per 1,000. Pages that return 4xx or 5xx are delivered but not charged.

Give it a list of URLs. For each one you get a PNG, JPEG or PDF taken with a real Chromium browser, saved in the run's key-value store, and a dataset item with a link to the file, the final URL after redirects, the HTTP status, the page title, how long it took and, if it failed, why.

Cookie consent banners are hidden by default. You can capture the visible part of the page or the full page, on a desktop, mobile or tablet viewport, or only one element.

The Actor is built to finish. Every page load has a timeout, a page that never fires its load event is captured as it is instead of failing, a failed attempt is retried once, and a URL that cannot be captured gets a result with the error. One bad URL never fails the run, and if Chromium crashes a new one is started for the remaining URLs.

Only the URLs you give are opened. Nothing else is crawled.

Input

{
"urls": ["https://apify.com", "www.wikipedia.org"],
"format": "png",
"fullPage": false,
"viewport": "desktop",
"waitUntil": "load",
"delayMs": 0,
"selector": "",
"hideCookieBanners": true,
"clickCookieAccept": false,
"blockAds": false,
"timeoutSecs": 30,
"retries": 1
}
  • urls (required): pages to capture. https:// is added when there is no scheme. Duplicates are captured once. Invalid lines are skipped with a warning.
  • format: png (default), jpeg (quality 80, much smaller files) or pdf. PDF prints the page with backgrounds on Letter pages, and ignores fullPage and selector.
  • fullPage: capture the whole scrollable page instead of only the viewport. The page is scrolled once first so lazy images load. Very tall pages are cut at 12,000 pixels (6,000 CSS pixels on mobile and tablet, which use 2x pixels).
  • viewport: desktop 1366x768, mobile 390x844 with an iPhone user agent and touch, tablet 820x1180 with an iPad user agent, or custom with viewportWidth and viewportHeight.
  • waitUntil: load (default) or networkidle (no requests for 0.5 s). Many news and shopping sites never reach network idle, so load is the safer choice.
  • delayMs: extra wait before the screenshot, for animations or late content. Up to 30,000.
  • selector: CSS selector. When set, only the first matching element is captured.
  • hideCookieBanners (default true): hides consent banners with CSS. Nothing is clicked. See below.
  • clickCookieAccept (default false): also tries to click the "Accept" button of the banner. This gives consent on your behalf, so it is off unless you turn it on.
  • blockAds (default false): blocks requests to about 30 common ad and tracking networks (DoubleClick, Taboola, Outbrain, Criteo and others). Pages load faster, ad slots may stay as empty boxes.
  • timeoutSecs (default 30): how long to wait for the page to load in each attempt.
  • retries (default 1, up to 3): extra attempts after a failure.

How a page is loaded

  1. Open the URL and wait for the HTML to be parsed.
  2. Wait for waitUntil (load or network idle) for the rest of timeoutSecs. If it does not happen in time, the page is captured as it is and loadTimedOut is true. A tracker that never finishes loading does not cost you the screenshot.
  3. Click the consent button if clickCookieAccept is on, inject the banner-hiding CSS, scroll through the page for full page captures, wait delayMs, hide remaining consent boxes, take the screenshot.

If an attempt fails (connection error, browser error, the screenshot itself fails or the attempt takes more than about 2 minutes), it is retried and each retry waits for less: network idle, then load, then only the parsed HTML plus up to 5 seconds. Hosts that do not exist are not retried.

Up to 3 pages are open at the same time with 2 GB of memory (2 for full page captures), and more with more memory. All pages share one browser.

With hideCookieBanners on, a stylesheet hides the containers of OneTrust, Cookiebot, Didomi, Quantcast, Sourcepoint, Usercentrics, TrustArc, Cookie Consent, CookieYes, Complianz, iubenda, Termly, Osano and Funding Choices, plus elements with ids or classes like cookie-banner, cookie-consent, cookie-notice or consent-wall. It also unlocks scrolling when the banner had locked it. Right before the screenshot, fixed-position boxes whose text mentions cookies or consent (in English, Spanish, French, German and Italian) are hidden too, which catches most custom banners.

Hiding is not clicking. The site still thinks you have not answered, so content that only loads after consent (some embedded videos, some ads) does not appear. If you need that, turn on clickCookieAccept.

Output

One dataset item per URL. Real output from a test run:

{
"url": "https://www.spiegel.de",
"takenAt": "2026-10-30T05:06:20+00:00",
"format": "png",
"viewport": "desktop",
"attempts": 1,
"screenshotUrl": "https://api.apify.com/v2/key-value-stores/rJVBKcPKnQf4brJof/records/0003-www.spiegel.de-03e0ef35.png?signature=...",
"screenshotKey": "0003-www.spiegel.de-03e0ef35.png",
"finalUrl": "https://www.spiegel.de/",
"statusCode": 200,
"title": "DER SPIEGEL | Online-Nachrichten",
"loadMs": 1653,
"waitUntilUsed": "load",
"loadTimedOut": false,
"error": null,
"attemptErrors": [],
"durationMs": 1772
}

A URL that could not be captured has no screenshotUrl and the reason in error, for example Error: Page.goto: net::ERR_NAME_NOT_RESOLVED at https://nonexistent-host.invalid/.

  • screenshotUrl: link to the file. It works without an API token, so you can put it in a spreadsheet or send it to someone.
  • screenshotKey: the key of the file in the run's default key-value store, for downloading with the API.
  • statusCode: status of the main document. A 404 or 403 page is still captured, so you can see what the site showed.
  • loadMs: time of the attempt that worked. durationMs: total time for the URL including failed attempts.
  • attemptErrors: the error of every failed attempt, also when a later attempt worked.

The files are stored in the run's default key-value store, so they are kept as long as your plan keeps run storage. Download them if you need them for longer.

Pricing

Pay per event: screenshot-taken, once per URL whose screenshot was saved and whose page answered with a status below 400. You are not charged for URLs that failed, and not for error pages (4xx and 5xx) even though you get their screenshot. Many sites answer automated browsers with a 403 page, and paying for those would not be fair.

You can cap the cost of a run with "Maximum cost per run". The Actor stops cleanly when the cap is reached.

Limitations

  • Pages are loaded from Apify's servers in the US, without a proxy. Some sites block automated browsers and show a 403 or a challenge page (in tests: nytimes.com, ebay.com and etsy.com). Those are captured but not charged.
  • Content behind a login is not supported. There are no cookies, headers or authentication options.
  • Full page captures of long, heavy pages take 20 to 70 seconds each. Viewport captures usually take 1 to 10 seconds.
  • Pages taller than the cap are cut. Pages that scroll inside an inner container instead of the page itself come out as a viewport-sized image even with fullPage.
  • The consent banner list covers the common frameworks. A custom banner that is not fixed on the screen and has no usual name can still show.
  • One viewport, format and wait setting per run. For both desktop and mobile, run twice.

Run locally

python -m venv .venv
.venv/Scripts/pip install -r requirements.txt # on Linux/macOS: .venv/bin/pip
.venv/Scripts/python -m playwright install chromium-headless-shell
# put input in storage/key_value_stores/default/INPUT.json
.venv/Scripts/python -m my_actor
python -m unittest discover -s tests -t .

Author: Matias Isnard.

FAQ

What is charged? Each URL whose screenshot was saved and whose page answered below 400. Failed URLs and error pages are free.

Can it capture pages behind a login? No. There are no cookie, header or authentication options.

How long does a screenshot take? Viewport captures usually take 1 to 10 seconds. Full page captures of long pages take 20 to 70 seconds.

Can I get desktop and mobile in one run? No, one viewport per run. Run it twice.