Skip to content

Screenshots ​

Set screenshot: true to capture the rendered page as a PNG. The image is stored as a file artifact (not inlined in the JSON), and the response references it by a safe id.

json
{ "url": "https://example.com", "jsRendering": true, "screenshot": true }

Response (files fragment):

json
{
  "files": [
    { "id": "3f6f1a2c-…", "type": "screenshot", "mime_type": "image/png", "size_bytes": 48213 }
  ]
}

Very tall pages ​

A full-page capture is taken whenever the page fits the browser's single-surface limit of 16384 px of document height. Taller pages are captured as the visible viewport instead.

A browser cannot render one surface beyond that height, so a "full page" capture of a taller document would be clipped anyway. The price does not depend on which capture is taken: a screenshot costs the render price and adds nothing on top (request cost).

If you need the whole of a very tall page, capture it in sections with page interactions (scroll, then screenshot).

Enable rendering

Screenshots come from the browser runtime, so pair screenshot: true with jsRendering: true. Combine with page interactions to capture the page after a scenario (post-login, post-scroll).

Downloading the image ​

Screenshots download through the same secure token flow as any file artifact: mint a short-lived token, then stream the bytes. Nothing about the underlying object storage is ever exposed.

bash
# 1. Issue a short-lived download token for the screenshot file id
curl -X POST "https://api.scrapeit.io/api/v1/files/SCREENSHOT_FILE_ID/download-token" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# → { "data": { "token": "…", "expires_at": "…" } }

# 2. Download the PNG with the token in the x-download-token header
curl -L -o screenshot.png \
  -H "x-download-token: DOWNLOAD_TOKEN" \
  "https://api.scrapeit.io/api/v1/files/SCREENSHOT_FILE_ID/download"
python
import os
import requests

BASE = "https://api.scrapeit.io/api/v1"
headers = {"Authorization": f"Bearer {os.environ['SCRAPEIT_ACCESS_TOKEN']}"}

# 1. Scrape with a screenshot
scrape = requests.post(
    f"{BASE}/scrape/web",
    json={"url": "https://example.com", "jsRendering": True, "screenshot": True},
    headers={"x-api-key": os.environ["SCRAPEIT_API_KEY"]},
).json()["data"]
file_id = next(f["id"] for f in scrape["files"] if f["type"] == "screenshot")

# 2. Token, then download
token = requests.post(f"{BASE}/files/{file_id}/download-token", headers=headers).json()["data"]["token"]
image = requests.get(f"{BASE}/files/{file_id}/download", headers={"x-download-token": token})
open("screenshot.png", "wb").write(image.content)

In the dashboard API Playground, the SCREENSHOT tab renders the captured image inline - it fetches the bytes through this same token flow and shows them as a blob: object URL, so the raw download URL never leaks.

ScrapeIt Web Scraping API documentation. Managed web scraping services: www.scrapeit.io.