POST/v1/screenshots
Screenshot a public web page
Loads the page in a real browser and captures the viewport, the full page, or one element. Private and local addresses are refused.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"url": "https://apidirectory.com/",
"width": 1280,
"height": 800,
"full_page": false,
"hide": [
".cookie-banner"
]
}
REQUEST
curl -X POST "https://api.imageapis.com/v1/screenshots" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://apidirectory.com/",
"width": 1280,
"height": 800,
"full_page": false,
"hide": [
".cookie-banner"
]
}'
import requests
r = requests.post("https://api.imageapis.com/v1/screenshots", headers={"X-API-Key": "YOUR_KEY"}, json={
"url": "https://apidirectory.com/",
"width": 1280,
"height": 800,
"full_page": False,
"hide": [
".cookie-banner"
]
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.imageapis.com/v1/screenshots", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "https://apidirectory.com/",
"width": 1280,
"height": 800,
"full_page": false,
"hide": [
".cookie-banner"
]
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200With response=binary: the file itself, with X-Image-Id and X-Image-Url headers
201Created
{
"id": "shot_9pxk3mz7dqwb2hnt4vce",
"object": "screenshot",
"status": "completed",
"url": "https://img.imageapis.com/i/shot_9pxk3mz7dqwb2hnt4vce.png",
"source_url": "https://apidirectory.com/",
"final_url": "https://apidirectory.com/",
"title": "APIDirectory",
"http_status": 200,
"format": "png",
"width": 1280,
"height": 800,
"scale": 1,
"bytes": 212044,
"units": 1,
"created": "2026-10-10T18:12:00Z",
"completed": "2026-10-10T18:12:03Z",
"expires": "2026-11-09T18:12:00Z"
}
202Accepted: rendering in the background; the record has status pending and the webhook gets the finished one
{
"id": "shot_9pxk3mz7dqwb2hnt4vce",
"object": "screenshot",
"status": "completed",
"url": "https://img.imageapis.com/i/shot_9pxk3mz7dqwb2hnt4vce.png",
"source_url": "https://apidirectory.com/",
"final_url": "https://apidirectory.com/",
"title": "APIDirectory",
"http_status": 200,
"format": "png",
"width": 1280,
"height": 800,
"scale": 1,
"bytes": 212044,
"units": 1,
"created": "2026-10-10T18:12:00Z",
"completed": "2026-10-10T18:12:03Z",
"expires": "2026-11-09T18:12:00Z"
}