Website Screenshot & HTML to Image / PDF avatar

Website Screenshot & HTML to Image / PDF

Pricing

from $2.10 / 1,000 screen captures

Go to Apify Store
Website Screenshot & HTML to Image / PDF

Website Screenshot & HTML to Image / PDF

Website screenshot API: capture URLs or your own HTML page as PNG, JPEG or PDF. Full page or one element, desktop, tablet or mobile, dark mode, common cookie banners hidden. Up to 1,000 URLs per run; dataset with file links. $0.003 per screen, $0.005 per full page or PDF; failed pages free.

Pricing

from $2.10 / 1,000 screen captures

Rating

0.0

(0)

Developer

Klarto

Klarto

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 hours ago

Last modified

Features

Limited permissions

Share

Website screenshot API on Apify: capture web pages, or one HTML document of your own, as PNG, JPEG or PDF. Take the first screen, the full page or one element, on a desktop, tablet or mobile screen. You pay per successful capture: $0.003 per screen or element, $0.005 per full page or PDF, plus Apify's start event of $0.0001 per run at 2 GB.

Why this Actor

  • Plays fair with sites. It checks robots.txt before opening each page, and again for the new site after a redirect to another site. It says who it is: every browser user agent ends with KlartoScreenshot/0.1 (+https://apify.com/klarto). No proxy IPs, no CAPTCHA solving, no stealth plugins.
  • Safe with untrusted URLs and HTML. Every browser connection goes through a filter inside the run that lets only public internet addresses through. Pages cannot reach private networks, localhost or cloud metadata addresses.
  • Only successful captures are charged. Failed pages, pages that answer with HTTP 4xx/5xx, pages blocked by robots.txt and skipped pages are free. The only other charge is Apify's start event.
  • A strict charge limit. Each capture reserves its price before it starts. When your maximum charge is reached, the remaining pages get status skipped and no file.
  • PDF and your own HTML. Print pages as A4, Letter, Legal, A3 or A5 PDF, or render your own HTML, e.g. an Open Graph card, an invoice or a report.

What it does

  • Input: a list of URLs (up to 1,000 per run) and/or one HTML document of your own (up to 2 MB).

  • Formats: PNG, JPEG (quality 10–100) or PDF (A4, Letter, Legal, A3, A5, with backgrounds).

  • What to capture:

    • the first screen (default);
    • the full scrollable page, cut at maxHeight (10,000 CSS px by default);
    • one element: the first match of a CSS selector (PNG and JPEG only).
  • Devices:

    deviceScreen (CSS px)Pixel densityUser agent
    desktop (default)1280×8001×Chromium's own
    laptop1440×9001×Chromium's own
    full-hd1920×10801×Chromium's own
    tablet820×11802×iPad Safari, touch
    mobile390×8443×iPhone Safari, touch

    Or a custom screen of 200–3,840 × 200–2,160 px and a pixel density of 1–3.

  • Options: dark mode, cookie banners hidden with CSS (on by default), waiting for an element, an extra delay of up to 10 s.

  • Output: one dataset item per page with its status and a link to the file. The files are in the run's key-value store. A run summary is in the OUTPUT record.

How it works

  1. Checks each URL. The host must resolve to public addresses only. Then the Actor reads the site's robots.txt as KlartoScreenshot (once per site per run).
  2. Opens the page in headless Chromium (Playwright 1.65). It waits for the load event, up to 5 s for the network to go quiet, then for your element and delay. All of this shares one page time budget, pageTimeoutSecs (30 s by default).
  3. Prepares the page. Common cookie banners are hidden with CSS. For a full-page PNG or JPEG, the page is scrolled down one screen at a time (0.15 s per step) so lazy images can start loading, then back to the top. PDFs are not scrolled.
  4. Takes the capture: a Chromium screenshot (PNG or JPEG, CSS animations stopped) or Chromium's print to PDF, which uses the page's print styles. If the page redirected to another site, that site's robots.txt is checked now, and a disallowed capture is discarded.
  5. Saves, then charges. The file goes to the key-value store and the item to the dataset. Only then is the capture charged.
  6. No outside services. The Actor calls no third-party API. The browser talks only to the sites you give and the resources their pages load, through a local filtering proxy in the run's container. The proxy connects only to checked public IPs, also after redirects and for every image, script and WebSocket.

Input

FieldDefaultWhat it does
urls—Pages to capture (up to 1,000). A link without https:// gets it added. Duplicates are removed.
html—One HTML document of your own (up to 2 MB). It gets fileIndex 0.
formatpngpng, jpeg or pdf.
fullPagefalseThe whole scrollable page instead of the first screen.
devicedesktopdesktop, laptop, full-hd, tablet or mobile (see the table above).
selector—Capture only the first element that matches this CSS selector. It must become visible within 10 s.
hideCookieBannerstrueHide 29 common cookie-banner containers with CSS. Nothing is clicked or accepted.
darkModefalseAsk the page for its dark color scheme. Only pages that support it change.
waitForSelector—Wait until this element is visible, within the page time budget; if it does not appear, the page fails with error.
delayMs0Extra wait after loading, 0–10,000 ms, shortened if the page time budget runs out.
pageTimeoutSecs30Time budget to load and prepare a page (loading, network quiet, waitForSelector, delayMs, scrolling), 5–120 s.
maxHeight10000Full-page cut-off in CSS px, 800–16,000.
viewportWidth, viewportHeight0Custom screen size; 0 = the device's size.
scale0Pixel density 1–3; 0 = the device's density.
jpegQuality80JPEG quality, 10–100.
pdfFormatA4A4, Letter, Legal, A3 or A5.
respectRobotsTxttrueFollow robots.txt. Turn off only for sites you own.
maxConcurrencyfrom memoryTabs at the same time, 1–10 (see Limits).

Minimal input (the Console prefill):

{"urls": ["https://books.toscrape.com/", "https://quotes.toscrape.com/"]}

Full pages on a phone screen as JPEG:

{"urls": ["https://books.toscrape.com/"], "fullPage": true, "device": "mobile", "format": "jpeg"}

Output

One dataset item per page. This item is from a real run of the prefill input on the Apify platform (build 0.1.13, 2 GB, 2026-11-18; later builds changed only this README). The link's signature is cut (shortened):

{
"fileIndex": 0,
"url": "https://books.toscrape.com/",
"input": "url",
"status": "ok",
"error": null,
"finalUrl": "https://books.toscrape.com/",
"httpStatus": 200,
"title": "All products | Books to Scrape - Sandbox",
"format": "png",
"width": 1280,
"height": 800,
"bytes": 151559,
"fileUrl": "https://api.apify.com/v2/key-value-stores/Vf9FYz9ReTzdVhwij/records/capture-0001.png?signature=…",
"charged": true,
"loadMs": 774,
"capturedAt": "2026-11-18T13:55:26Z"
}
FieldTypeMeaning
fileIndexnumberPosition in the run, from 0. The HTML document is 0 when given. The file name uses fileIndex + 1 (capture-0001.png).
urlstring or nullThe URL you gave (trimmed, with https:// added if missing); null for your HTML.
inputstringurl or html.
statusstringok, error, blocked or skipped (see below).
errorstring or nullWhy the page was not captured or not charged.
finalUrlstring or nullThe address after redirects; null for your HTML.
httpStatusnumber or nullThe page's HTTP status; null for your HTML.
titlestring or nullThe page title (up to 300 characters).
formatstring or nullpng, jpeg or pdf.
width, heightnumber or nullImage size in pixels: CSS px × pixel density, so a page without a mobile viewport tag can be 2,940 px wide on mobile; null for PDF.
bytesnumber or nullFile size.
fileUrlstring or nullSigned link to the file in the run's key-value store. It opens without your token, so anyone with the link can open the file.
chargedbooleanWhether the capture is billable.
loadMsnumber or nullTime from opening the page to the finished capture, in ms.
capturedAtstringUTC time of the item.
notestringOnly present when the filter refused some page resources (private, reserved or unresolvable hosts); lists those hosts.

When there is no file, fileUrl, format, width, height and bytes are null. The page fields can still be filled, e.g. httpStatus of an error answer or finalUrl of a redirect blocked by robots.txt. Items appear in the order pages finish; sort by fileIndex for the input order. In Console, the Overview view links each file, and the Image previews view shows PNG and JPEG captures inline.

status values:

  • ok: the page was captured. It is billable (charged: true).
  • error: not captured, or the page answered with HTTP 4xx/5xx. For an HTTP error the error page is still saved, not charged; if Chromium refuses to render it, there is no file. error says why.
  • blocked: robots.txt does not allow the page, or the site's robots.txt failed (5xx, no answer, or an answer that broke off). A redirect to a site whose robots.txt does not allow it is discarded too. Not charged.
  • skipped: the charge limit or the run timeout was reached before this page. No file, not charged. After an abort, pages that were not started are not listed.

Files: the captures are saved in the run's default key-value store as capture-0001.png, capture-0002.jpg, capture-0003.pdf and so on. This store is unnamed, so it follows Apify's data retention (Apify docs): on the Free plan your 10 most recent runs are kept for 4 months; on paid plans all data follows your plan's retention period; unnamed storages are then deleted. Copy the files you need to keep, or rename the store in Console (named storages are kept).

Run summary: the OUTPUT record has pages, ok, errors, skipped (including robots.txt blocks), blockedByRobots, captures (charged) and the last 200 failures.

Pricing

EventWhatPrice
captureThe first screen or one element, PNG or JPEG$0.003
full-page-captureA full page (PNG or JPEG) or a PDF$0.005
apify-actor-startApify's start event, at the start of each run: once up to 1 GB of memory, then once per extra GB$0.00005 each ($0.0001 at the default 2 GB)

Paid Apify plans pay less. Apify Store discounts apply automatically: Bronze 10% off, Silver 20% off, Gold and higher 30% off. The prices above are Free-plan prices; the Store card shows the lowest (Gold) price. The start event (apify-actor-start) has no discount.

  • Free: failed pages, pages that answer HTTP 4xx/5xx, pages blocked by robots.txt, skipped pages. Dataset items are not charged.
  • Element captures are always capture, also with fullPage on.
  • Examples:
    • the prefill input (2 screens): 2 × $0.003 + $0.0001 = $0.0061;
    • 1,000 screens in one run: $3.0001;
    • 1,000 full pages or PDFs in one run: $5.0001.
  • Charge limit: set a maximum cost per run in the run options (maxTotalChargeUsd in the API). No capture starts unless its price still fits. A charge that fails is retried before the run ends; the OUTPUT record has the final count.

Limits

  • Pages per run: 1,000. Your HTML counts as one page (999 URLs + HTML).

  • HTML: one document per run, up to 2 MB. Images and styles it links to must be on public URLs.

  • Full-page height: cut at maxHeight CSS px (default 10,000, max 16,000). The image is larger by the pixel density: on mobile (3×), maxHeight 1,000 gives an image 3,000 px tall, 1,170 px wide for a page with a mobile viewport tag.

  • Pages without a mobile viewport tag (<meta name="viewport">) are laid out 980 CSS px wide on tablet and mobile, as on a real phone. Their full-page captures keep the whole width: 2,940 px on mobile, 1,960 px on tablet.

  • Lazy images: scrolling gives them a chance to load, with no guarantee. Use delayMs or waitForSelector for slow pages. PDFs get no scrolling.

  • Timeouts: a page that does not load, or whose waitForSelector does not appear, within pageTimeoutSecs (30 s) fails with error; the other waits (network quiet, delayMs, scrolling) are cut short and the page is still captured. Taking the capture has its own limit of at least 30 s. A page whose scripts keep the browser busy is stopped after about 75 s at the defaults. None of these are charged.

  • Run timeout: shortly before it (60 s, or 20 % of a short timeout, at least 5 s), the Actor starts no new pages and lists the rest as skipped. Raise the timeout for long lists.

  • Tabs at the same time (default, from the run memory, rounded down, 1–6):

    MemoryScreens and elements (memory ÷ 700 MB)Full pages and PDF (memory ÷ 1,400 MB)
    1 GB11
    2 GB (default)21
    4 GB52
    8 GB (max)65

    maxConcurrency (1–10) overrides it.

  • Speed (measured on Apify with build 0.1.13, 2 GB memory, 2026-11-18, run start included; later builds changed only this README):

    • 2 screens (the prefill): 18 s;
    • 20 screens: 28 s (2 tabs);
    • 10 full pages, PNG, 1,280×1,775 to 2,549 px: 42 s (1 tab);
    • 10 PDFs: 28 s (1 tab).

    These are light test pages (books.toscrape.com, quotes.toscrape.com). Runs of the same inputs on earlier builds that day took 8–20 s, 23–35 s, 41–44 s and 26–30 s, so expect run-to-run differences of up to about 2.4×. Heavy pages take longer. More memory gives more tabs.

  • Run status: the run ends as SUCCEEDED whenever every page has a row, even if no page could be captured: each row's status and error say why, and the status message starts with "No page could be captured". Invalid input fails the run with no items.

  • Not supported: logins and cookies, URLs with user:password, protocols other than http and https. Pop-up windows are closed, never captured. selector is ignored for PDF, and maxHeight does not cut element captures.

Use it from your stack

No third-party API keys. You need an Apify account; the API, n8n, Make, Zapier and MCP use your Apify token.

  • API (waits for runs up to 300 s, then answers 408; start a normal run for long lists):
    curl -X POST "https://api.apify.com/v2/acts/klarto~website-screenshot-pdf/run-sync-get-dataset-items" \
    -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
    -d '{"urls": ["https://books.toscrape.com/"]}'
  • Python (pip install apify-client, version 3):
    from apify_client import ApifyClient
    client = ApifyClient("<YOUR_APIFY_TOKEN>")
    run = client.actor("klarto/website-screenshot-pdf").call(run_input={"urls": ["https://books.toscrape.com/"]})
    print([i["fileUrl"] for i in client.dataset(run.default_dataset_id).iterate_items()])
  • n8n: the Apify node → Run an Actor, Actor klarto/website-screenshot-pdf. Then read fileUrl from the dataset items.
  • Make, Zapier: the Apify app, with the Actor klarto/website-screenshot-pdf.
  • MCP / AI agents: https://mcp.apify.com?tools=klarto/website-screenshot-pdf. Each item has status, error and a direct fileUrl.

FAQ

Can it capture pages behind a login? No. There is no login or cookie input, so you get what a logged-out visitor sees.

Does it get past bot protection or CAPTCHAs? No. If the site answers with HTTP 403 or 429, the page is free. If it shows a challenge page with HTTP 200, that page is what you get, and it is charged as a capture.

Does it click "Accept" on cookie banners? No. It hides 29 common banner containers with CSS. Banners with other markup stay visible, and so can banners on pages whose Content Security Policy blocks the added CSS.

Why is my page blocked? The site's robots.txt does not allow KlartoScreenshot or all bots on that path, or robots.txt failed. If it is your own site, turn off respectRobotsTxt.

Why is my full page cut off? It is taller than maxHeight. Raise it up to 16,000 CSS px.

How long do the file links work? Until your plan's data retention removes the run's unnamed key-value store. Copy files you need to keep.

Can I render many HTML documents? One per run. Start several runs, or host the files and pass their URLs.

Can it reach my intranet or localhost? No. Private, local and reserved addresses are refused. A private URL in your list fails with error; refused page resources are listed in the item's note.

Fair use and licences

  • Capture only pages you own or may capture, and respect the sites' terms. Keep respectRobotsTxt on for sites that are not yours.
  • On desktop devices the browser sends Chromium's own user agent with "HeadlessChrome" changed to "Chrome"; on tablet and mobile an iPad or iPhone Safari user agent. Each ends with KlartoScreenshot/0.1 (+https://apify.com/klarto), so site owners can identify or block it. robots.txt is read as KlartoScreenshot/0.1 (+https://apify.com/klarto).
  • No Apify or residential proxies, no CAPTCHA solving, no stealth plugins, no logins.
  • Built with Chromium (BSD-style licence plus third-party licences), Playwright for Python (Apache-2.0), the Apify SDK and client (Apache-2.0), HTTPX (BSD-3-Clause) and Protego (BSD-3-Clause).

Ready-made examples

Saved inputs for common jobs: open one and run it as it is, or change the input first.

Support

Questions, or a page that fails? Open an issue on the Actor page. We aim to answer within a week.