DEV Community

Siftwright
Siftwright

Posted on

Full-page website screenshots and PDFs from Python or curl, billed per capture

Screenshots and PDFs of web pages are a common chore: link previews, visual regression checks, archiving a page as evidence, feeding page images to a vision model. Running your own headless browser works, but you end up maintaining Chromium, fonts and timeouts. Here is a small pay-per-result alternative, with the real output of a test run.

I am building Pageframe, an Apify Actor that captures full-page PNG/JPEG screenshots or print-ready PDFs. It costs $0.0015 per successful capture, and failed URLs are not charged.

The input

{
  "urls": ["https://example.com"],
  "format": "png",
  "fullPage": true,
  "viewportWidth": 1280,
  "viewportHeight": 800,
  "deviceScaleFactor": 1,
  "blockCookieBanners": true,
  "delaySec": 0
}
Enter fullscreen mode Exit fullscreen mode

Other options: format can be png, jpeg or pdf (with pdfPageFormat A4, A3, Letter or Legal), deviceScaleFactor 2 or 3 gives retina captures, waitForSelector waits for an element before capturing, and blockCookieBanners makes a best-effort click on common consent buttons.

From Python

from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("siftwright/pageframe-screenshots").call(run_input={
    "urls": ["https://example.com"],
    "format": "png",
    "fullPage": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item["status"], item["fileUrl"])
Enter fullscreen mode Exit fullscreen mode

From curl

curl -X POST "https://api.apify.com/v2/acts/siftwright~pageframe-screenshots/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com"],"format":"pdf","pdfPageFormat":"A4"}'
Enter fullscreen mode Exit fullscreen mode

Real output

This is the dataset item from an actual run on Apify, capturing https://example.com:

{
  "url": "https://example.com",
  "status": "ok",
  "format": "png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/iSfPTldM2Pvavg8Ac/records/capture-1791797595722-zokzr1.png",
  "sizeBytes": 71152,
  "durationMs": 289
}
Enter fullscreen mode Exit fullscreen mode

The run billed one capture event (plus Apify's tiny per-run start fee). The image itself is stored in the run's key-value store at fileUrl.

Honest limits

  • Pages behind a login are not supported.
  • Cookie banner dismissal is best-effort; unusual consent widgets may still show.
  • Heavy pages that load content late may need waitForSelector or delaySec.

Use it from an AI agent

Every Siftwright Actor works through Apify's MCP server, so an agent can call Pageframe as a tool. There is also a free tool page at siftwright.com if you just want to try one capture first.

Feedback or a missing option? Write to support@siftwright.com.

Top comments (0)