Docs menu
Endpoints

Take a screenshot

Renders a page with the options you give, or answers from the cache when a render with the same options is younger than cache_ttl. With wait, holds the request open until the render is done.

POSThttps://api.pagepeeker.com/v3/shot

Authentication

Your API key, in Authorization: Bearer YOUR_KEY or X-API-Key: YOUR_KEY: see Authentication. The request counts toward your requests per minute.

Request

HeaderRequiredValue
AuthorizationYes, or X-API-KeyBearer YOUR_KEY
Content-TypeYesapplication/json

The body is a JSON object of these options. Only url is required. How values are written and what changes the render's id: Options.

OptionDescription
urlstringrequired

The page, http or https, up to 2,048 characters. https:// is added when there is no scheme.

viewport_widthintegeroptional

The browser window's width, 320 to 3,840. Default: 1280.

viewport_heightintegeroptional

The browser window's height, 200 to 4,320. With both width and height, it is worked out from them: leave it out. Default: 1024.

device_scale_factorintegeroptional

1, 2 or 3: pixels per CSS pixel, for sharp images on high-density screens. Default: 1.

full_pagebooleanoptional

true for the whole page, not just the window. The page is scrolled first, so images that load on scroll are in. Cut at 16,383 pixels of image. Default: false.

formatstringoptional

jpeg, png or webp. Default: "jpeg".

qualityintegeroptional

1 to 100, for jpeg and webp only. Default: 80.

widthintegeroptional

The image resized to this width, 16 to 3,840: a thumbnail. Alone, it keeps the capture's proportions. Default: none, the capture's width.

heightintegeroptional

The image resized to this height, 16 to 16,383. With width, the window takes their proportions, so the image is exactly that box. With full_page, the page is cut at this height. Default: none, the capture's height.

delayintegeroptional

Seconds to wait after the page has loaded, 0 to 10. Default: 0.

wait_untilstringoptional

When the page counts as loaded: load, domcontentloaded, networkidle0 (no requests for half a second) or networkidle2 (at most two). If it isn't reached, the page is captured anyway. Default: "networkidle2".

wait_for_selectorstringoptional

A CSS selector to wait for before the capture, up to 255 characters. If it doesn't appear in 30 seconds, the render fails as a timeout. Default: none.

block_cookie_bannersbooleanoptional

Answers the page's cookie banner as a visitor would, rejecting, so the capture has no banner. Default: true.

block_adsbooleanoptional

Blocks ads and trackers. Default: false.

dark_modebooleanoptional

Asks the page for its dark theme (prefers-color-scheme: dark). Default: false.

user_agentstringoptional

The browser's User-Agent, up to 512 printable characters. PagePeeker's robot signature is added at its end. Default: Chrome's.

accept_languagestringoptional

The languages the browser asks for, as en-US,en;q=0.9, up to 100 characters. Sites that go by the visitor's address may still answer in German: the robot renders from Germany. Default: none.

cache_ttlintegeroptional

How old a cached render may be to be answered, in seconds, 3,600 to 2,592,000 (an hour to 30 days). Default: 86400, a day.

freshbooleanoptional

true renders the page again, whatever the cache holds. Not in signed links. Default: false.

waitintegeroptional

Seconds to hold the request open for the render, 0 to 60. Not in signed links. Default: 0.

Response

FieldTypeInDescription
idstringallThe render's id, 32 hex characters. The same options give the same id.
statusstringalldone, queued or failed.
urlstringdoneThe image, to download with GET /v3/files/{name}. Its address never changes: a new render of the same page gets a new one.
rendered_atstringdoneWhen the render was made: ISO 8601, UTC.
final_urlstringdoneWhere the page ended up after redirects.
status_codeintegerdoneThe HTTP status the page answered with.
titlestringdoneThe page's title. Empty when it has none.
descriptionstringdoneThe page's meta description, up to 1,000 characters. Empty when it has none.
iconstringdoneThe full address of the icon the page names in its HTML. Empty when it names none.
widthintegerdoneThe image's width, in pixels.
heightintegerdoneThe image's height, in pixels.
bytesintegerdoneThe image's size.
expires_atstringdoneWhen the image is deleted: ISO 8601, UTC, 31 days after rendered_at.
reasonstringfailedWhy, as a code: see Failed renders. Treat a code you don't know as render_failed.
messagestringfailedWhat happened, in words, for people. It may change: match on reason.
reason_urlstringfailedThe reason's explanation, as GET /v3/reasons/{code} answers it.
failed_atstringfailedWhen the render failed: ISO 8601, UTC.

A queued answer has id and status only. Every answer carries your limit headers. New fields may be added: ignore the ones you don't know (Versioning).

200, done
{
  "id": "962d605ee1df39be70f8a3b70a197199",
  "status": "done",
  "url": "https://api.pagepeeker.com/v3/files/962d605ee1df39be70f8a3b70a197199-ce1edc4934302edf.jpeg",
  "rendered_at": "2026-12-03T09:40:21Z",
  "final_url": "https://www.python.org/",
  "status_code": 200,
  "title": "Welcome to Python.org",
  "description": "The official home of the Python Programming Language",
  "icon": "https://www.python.org/static/favicon.ico",
  "width": 480,
  "height": 360,
  "bytes": 26762,
  "expires_at": "2027-01-03T09:40:21Z"
}
202, queued
{
  "id": "962d605ee1df39be70f8a3b70a197199",
  "status": "queued"
}
200, failed
{
  "id": "a961c88297a355deda57fea09df415d7",
  "status": "failed",
  "reason": "timeout",
  "message": "The selector did not appear in 30 seconds",
  "reason_url": "https://api.pagepeeker.com/v3/reasons/timeout",
  "failed_at": "2026-12-03T09:41:02Z"
}

Status codes

StatusAnswerWhen
200doneRendered while the request waited, or a render with these options is in the cache, younger than cache_ttl.
202queuedQueued, and not done within wait.
200failedThe page couldn't be rendered. The same request is answered as failed for an hour, then rendered again. A failure costs no render.
400error invalid_jsonThe body is not a JSON object.
400error unknown_optionAn option the API doesn't take, or wait or fresh in a signed link. fields names it.
400error invalid_optionA wrong value, or no url. fields names each option with what it takes.
400error url_blockedThe URL is on PagePeeker's list of URLs it does not render.
400error host_not_foundThe URL's domain does not exist. Answered at once: nothing is rendered, and it costs no render.
401error missing_keyNo key in Authorization: Bearer or X-API-Key. A key in the URL is not read.
401error invalid_keyThe key is not valid, or was revoked.
402error over_quotaThis period's renders are used up. Renders already in the cache are still answered.
403error account_inactiveThe account is not active.
415error unsupported_media_typeThe body of a POST is not application/json.
429error rate_limitedOver your requests a minute. Retry-After says when to try again.

Every endpoint can also answer 403 https_required, 405 method_not_allowed, 500 internal_error. What each error means and what to do about it: Errors and failures.

Example

import requests

res = requests.post(
    "https://api.pagepeeker.com/v3/shot",
    headers={"Authorization": "Bearer YOUR_KEY"},
    json={
        "url": "https://www.python.org/",
        "full_page": True,
        "format": "webp",
        "width": 640,
        "block_ads": True,
        "wait": 30
    },
)
print(res.status_code, res.json())

The same call on the wire: python.org's whole page, 640 pixels wide, as WebP, without ads.

Request
POST /v3/shot HTTP/1.1
Host: api.pagepeeker.com
Authorization: Bearer YOUR_KEY
Content-Type: application/json

{
  "url": "https://www.python.org/",
  "full_page": true,
  "format": "webp",
  "width": 640,
  "block_ads": true,
  "wait": 30
}
Answer
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
RateLimit-Limit: 10
RateLimit-Remaining: 9
RateLimit-Reset: 42
RateLimit-Policy: "minute";q=10;w=60
RateLimit: "minute";r=9;t=42
X-PP-Renders-Used: 124
X-PP-Renders-Limit: 500

{
  "id": "a6afb0840d826a5c79bccdf0f185e9ca",
  "status": "done",
  "url": "https://api.pagepeeker.com/v3/files/a6afb0840d826a5c79bccdf0f185e9ca-71963d1193f95bc4.webp",
  "rendered_at": "2026-12-03T09:40:24Z",
  "final_url": "https://www.python.org/",
  "status_code": 200,
  "title": "Welcome to Python.org",
  "description": "The official home of the Python Programming Language",
  "icon": "https://www.python.org/static/favicon.ico",
  "width": 640,
  "height": 1338,
  "bytes": 63220,
  "expires_at": "2027-01-03T09:40:24Z"
}