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.
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
| Header | Required | Value |
|---|---|---|
| Authorization | Yes, or X-API-Key | Bearer YOUR_KEY |
| Content-Type | Yes | application/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.
| Option | Description |
|---|---|
urlstringrequired | The page, http or https, up to 2,048 characters. |
viewport_widthintegeroptional | The browser window's width, 320 to 3,840. Default: |
viewport_heightintegeroptional | The browser window's height, 200 to 4,320. With both |
device_scale_factorintegeroptional |
|
full_pagebooleanoptional |
|
formatstringoptional |
|
qualityintegeroptional | 1 to 100, for |
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 |
delayintegeroptional | Seconds to wait after the page has loaded, 0 to 10. Default: |
wait_untilstringoptional | When the page counts as loaded: |
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: |
block_adsbooleanoptional | Blocks ads and trackers. Default: |
dark_modebooleanoptional | Asks the page for its dark theme ( |
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 |
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: |
freshbooleanoptional |
|
waitintegeroptional | Seconds to hold the request open for the render, 0 to 60. Not in signed links. Default: |
Response
| Field | Type | In | Description |
|---|---|---|---|
| id | string | all | The render's id, 32 hex characters. The same options give the same id. |
| status | string | all | done, queued or failed. |
| url | string | done | The image, to download with GET /v3/files/{name}. Its address never changes: a new render of the same page gets a new one. |
| rendered_at | string | done | When the render was made: ISO 8601, UTC. |
| final_url | string | done | Where the page ended up after redirects. |
| status_code | integer | done | The HTTP status the page answered with. |
| title | string | done | The page's title. Empty when it has none. |
| description | string | done | The page's meta description, up to 1,000 characters. Empty when it has none. |
| icon | string | done | The full address of the icon the page names in its HTML. Empty when it names none. |
| width | integer | done | The image's width, in pixels. |
| height | integer | done | The image's height, in pixels. |
| bytes | integer | done | The image's size. |
| expires_at | string | done | When the image is deleted: ISO 8601, UTC, 31 days after rendered_at. |
| reason | string | failed | Why, as a code: see Failed renders. Treat a code you don't know as render_failed. |
| message | string | failed | What happened, in words, for people. It may change: match on reason. |
| reason_url | string | failed | The reason's explanation, as GET /v3/reasons/{code} answers it. |
| failed_at | string | failed | When 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).
{
"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"
}
{
"id": "962d605ee1df39be70f8a3b70a197199",
"status": "queued"
}
{
"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
| Status | Answer | When |
|---|---|---|
| 200 | done | Rendered while the request waited, or a render with these options is in the cache, younger than cache_ttl. |
| 202 | queued | Queued, and not done within wait. |
| 200 | failed | The page couldn't be rendered. The same request is answered as failed for an hour, then rendered again. A failure costs no render. |
| 400 | error invalid_json | The body is not a JSON object. |
| 400 | error unknown_option | An option the API doesn't take, or wait or fresh in a signed link. fields names it. |
| 400 | error invalid_option | A wrong value, or no url. fields names each option with what it takes. |
| 400 | error url_blocked | The URL is on PagePeeker's list of URLs it does not render. |
| 400 | error host_not_found | The URL's domain does not exist. Answered at once: nothing is rendered, and it costs no render. |
| 401 | error missing_key | No key in Authorization: Bearer or X-API-Key. A key in the URL is not read. |
| 401 | error invalid_key | The key is not valid, or was revoked. |
| 402 | error over_quota | This period's renders are used up. Renders already in the cache are still answered. |
| 403 | error account_inactive | The account is not active. |
| 415 | error unsupported_media_type | The body of a POST is not application/json. |
| 429 | error rate_limited | Over 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())
<?php
$http = curl_init('https://api.pagepeeker.com/v3/shot');
curl_setopt_array($http, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://www.python.org/',
'full_page' => true,
'format' => 'webp',
'width' => 640,
'block_ads' => true,
'wait' => 30,
]),
CURLOPT_RETURNTRANSFER => true,
]);
$answer = json_decode(curl_exec($http), true);
echo curl_getinfo($http, CURLINFO_RESPONSE_CODE), "\n";
print_r($answer);
const res = await fetch("https://api.pagepeeker.com/v3/shot", {
method: "POST",
headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
url: "https://www.python.org/",
full_page: true,
format: "webp",
width: 640,
block_ads: true,
wait: 30,
}),
});
console.log(res.status, await res.json());
curl -i https://api.pagepeeker.com/v3/shot \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.python.org/", "full_page": true, "format": "webp", "width": 640, "block_ads": true, "wait": 30}'
The same call on the wire: python.org's whole page, 640 pixels wide, as WebP, without ads.
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
}
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"
}