Screenshots of any URL, over a simple HTTP API
Send a URL from your server and get back an image. PagePeeker renders the page in Chrome, then serves the image from its cache.
The Free plan has 500 renders a month and every feature. Start free.
import requests
# Waits up to 30 seconds for the capture, then gives its address
shot = requests.post("https://api.pagepeeker.com/v3/shot",
headers={"Authorization": "Bearer YOUR_KEY"},
json={"url": "https://nasa.gov", "width": 480, "height": 360, "wait": 30}).json()
with open("capture.jpg", "wb") as f:
f.write(requests.get(shot["url"]).content)
// Waits up to 30 seconds for the capture, then gives its address
$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://nasa.gov', 'width' => 480, 'height' => 360, 'wait' => 30]),
]])), true);
file_put_contents("capture.jpg", file_get_contents($shot['url']));
import { writeFile } from "node:fs/promises";
// Waits up to 30 seconds for the capture, then gives its address
const shot = await (await fetch("https://api.pagepeeker.com/v3/shot", {
method: "POST",
headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://nasa.gov", width: 480, height: 360, wait: 30 }),
})).json();
await writeFile("capture.jpg", Buffer.from(await (await fetch(shot.url)).arrayBuffer()));
curl https://api.pagepeeker.com/v3/shot \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://nasa.gov", "width": 480, "height": 360, "wait": 30}'
# {"id": "...", "status": "done", "url": "https://api.pagepeeker.com/v3/files/....jpeg", ...}
Try it on a page
Enter an address and pick a size. The request at the top of the page changes to match.
Made through the same API your code calls.
- Size
- 480 x 360
- Format
- JPEG
- Cached for
- 1 day
- Renders used
- 1
What happens to a request
Rendering a page takes seconds, and your code should not have to sit waiting. The API answers at once and renders in the background.
You ask for a URL
From your server, with your API key in the Authorization header and the options as JSON. Any language that can make an HTTP request will do.
POST /v3/shotChrome renders the page
The API answers at once with the render's id, or waits for it up to the seconds you give in wait. Ask GET /v3/shot/{id} to know when it's done.
{"status":"queued"}The image is cached and served
The answer gives the image's address. The same request gets it straight away for a day, or for as long as you set in cache_ttl, up to 30 days.
{"status":"done","url":"..."}Any size, five drawn here at true size
Ask for a width and height and get that exact box. Full page captures, phone and tablet widths, and sharper 2x and 3x images are options of the same request.
- t90 x 68
- s120 x 90
- m200 x 150
- l400 x 300
- x480 x 360
What developers build with it
Report images
Render your own dashboards and drop them into emails, PDFs and slides.
Link previews
Show what a link leads to before anyone clicks it, in feeds, comments and search results.
Site directories
Give every listing, template or customer site in your product its own picture.