Quickstart
PagePeeker's current API: send a URL and its options as JSON, get back the address of the image.
Your API key
v3 uses its own API keys, which start with pp_. Send yours in the Authorization header, as Bearer YOUR_KEY, or in X-API-Key. Never in the URL.
With the key you get a signing secret, for signed links. Both are shown once: keep them on your server.
Take a screenshot
POST /v3/shot with the options as JSON. wait holds the request open until the render is done, up to the seconds you give. The answer has the image's address in url.
import requests
shot = requests.post("https://api.pagepeeker.com/v3/shot",
headers={"Authorization": "Bearer YOUR_KEY"},
json={"url": "https://example.com/", "width": 480, "height": 360, "wait": 30}).json()
if shot["status"] == "done":
with open("capture.jpg", "wb") as f:
f.write(requests.get(shot["url"]).content)
$shot = json_decode(file_get_contents("https://api.pagepeeker.com/v3/shot", false, stream_context_create(['http' => [
'method' => 'POST',
'header' => "Authorization: Bearer YOUR_KEY\r\nContent-Type: application/json",
'content' => json_encode(['url' => 'https://example.com/', 'width' => 480, 'height' => 360, 'wait' => 30]),
'ignore_errors' => true,
]])), true);
if (($shot['status'] ?? '') === 'done') {
file_put_contents('capture.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://example.com/", width: 480, height: 360, wait: 30 }),
});
const shot = await res.json();
if (shot.status === "done") {
const image = await fetch(shot.url);
await writeFile("capture.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://example.com/", "width": 480, "height": 360, "wait": 30}'
# then download the "url" of the answer
curl -o capture.jpg "https://api.pagepeeker.com/v3/files/9a3f0c2e5b7d41e8a6c3f2d1e0b9a8c7-4f2a9c1e7b3d5a60.jpeg"
Every call is HTTPS: on plain HTTP the API refuses the request, as your key has already gone out in clear.
What comes back
done with status 200 and the image's url, queued with status 202 if the render is not done yet, or failed with the reason. A queued render is asked about with GET /v3/shot/{id}: see Screenshots.
{
"id": "9a3f0c2e5b7d41e8a6c3f2d1e0b9a8c7",
"status": "done",
"url": "https://api.pagepeeker.com/v3/files/9a3f0c2e5b7d41e8a6c3f2d1e0b9a8c7-4f2a9c1e7b3d5a60.jpeg",
"rendered_at": "2026-11-16T12:00:00Z",
"final_url": "https://example.com/",
"status_code": 200,
"title": "Example Domain",
"width": 1280,
"height": 1024,
"bytes": 81234
}
Next
- Options: the window, full pages, formats, waiting for the page, cookie banners and ads, the cache.
- Signed links: an image in an
<img>tag, with no code on your server at view time. - Limits and usage and Errors and failures.