full_page=true captures the whole scrollable page instead of the viewport. Every response includes credits_used: the credits this call cost. Cost: 2 credits; setting country adds 5 (the page then loads through that country).
Parameters
name
type
description
urlrequired
string
Public http(s) URL of the page (a bare domain works too). Example: https://example.com
full_page
boolean
Capture the whole page, not only the visible part. Default: false
width
integer
Viewport width in pixels. Default: 1280
height
integer
Viewport height in pixels. Default: 800
format
png | jpeg
Image format. Default: png
quality
integer
JPEG quality. Default: 80
delay
integer
Extra milliseconds to wait after the page loaded. Default: 0
country
string
Two-letter country to view the page from. Default: US
import os, requests
res = requests.get(
"https://api.api.sh/web/v1/screenshot",
params={"url": "https://example.com"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json()
const url = new URL("https://api.api.sh/web/v1/screenshot");
url.searchParams.set("url", "https://example.com");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.