Quickstart
Send a URL and its options as JSON, get back the address of the image. A first screenshot in three steps.
1. Get an API key
Sign up (the Free plan has 500 renders a month), then make a key on the API keys page of your account. It starts with pp_ and is shown once, with its signing secret: keep both on your server. Authentication has the details.
2. Take a screenshot
Send POST /v3/shot with the page's URL and any options as JSON, and your key in the Authorization header. wait holds the request open until the render is done, up to the seconds you give. This one asks for a 480 x 360 thumbnail of python.org and saves it:
import requests
shot = requests.post(
"https://api.pagepeeker.com/v3/shot",
headers={"Authorization": "Bearer YOUR_KEY"},
json={"url": "https://www.python.org/", "width": 480, "height": 360, "wait": 30},
).json()
if shot["status"] == "done":
with open("python-org.jpg", "wb") as f:
f.write(requests.get(shot["url"]).content)
<?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/', 'width' => 480, 'height' => 360, 'wait' => 30]),
CURLOPT_RETURNTRANSFER => true,
]);
$shot = json_decode(curl_exec($http), true);
if (($shot['status'] ?? '') === 'done') {
file_put_contents('python-org.jpg', file_get_contents($shot['url']));
}
import { writeFile } from "node:fs/promises";
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/", width: 480, height: 360, wait: 30 }),
});
const shot = await res.json();
if (shot.status === "done") {
const image = await fetch(shot.url);
await writeFile("python-org.jpg", Buffer.from(await image.arrayBuffer()));
}
curl https://api.pagepeeker.com/v3/shot \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.python.org/", "width": 480, "height": 360, "wait": 30}'
# then download the "url" of the answer
curl -o python-org.jpg https://api.pagepeeker.com/v3/files/962d605ee1df39be70f8a3b70a197199-ce1edc4934302edf.jpeg
3. Read the answer
done, status 200: the image's address is in url, with what the render found on the page. queued, status 202: not done within wait; ask again with GET /v3/shot/{id}. failed, status 200: the page couldn't be rendered, and reason says why.
{
"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"
}
Every field is described on POST /v3/shot.
Next
- Screenshots: the whole flow, with asking again while a render is queued.
- Signed links: a screenshot in an
<img>tag, with no code on your server at view time. - All endpoints, each with every parameter, field and status code.
- Limits and Errors and failures, before you go live.