Screencap.site API documentation
Screencap.site turns any public URL into a pixel-perfect screenshot or thumbnail with a single HTTP request. There is no SDK to install — every capture is one authenticated GET to /api/capture, and the response is the image. This guide covers everything from your first capture to the full parameter and error reference.
Getting started
- Create a free account — the Hobby plan includes 1,000 captures per month at no cost.
- Open your dashboard and generate an API key. It starts with
sk_live_and is shown in full only once. - Call the capture endpoint with your key and a target URL:
curl -H "Authorization: Bearer sk_live_YOUR_KEY" \
"https://screencap.site/api/capture?url=https://wikipedia.org&w=1280&h=720" \
--output screenshot.pngThat writes a 1280×720 PNG of wikipedia.org to screenshot.png. That's the whole API.
Authentication
Every request must be authenticated with an API key. You can send it two ways:
- Authorization header (recommended):
Authorization: Bearer sk_live_… - Query parameter:
?key=sk_live_…— convenient for embedding directly in an<img>tag, but it exposes the key to anyone who can read the URL. Prefer a server-side proxy for production.
Keys begin with the sk_live_ prefix. We store only a hash of each key, so if you lose it you must create a new one. A missing or invalid key returns 401 Unauthorized.
Taking a screenshot
The single endpoint is GET https://screencap.site/api/capture. Provide the url you want to capture, plus an optional width and height. The response body is the rendered image; its Content-Type header (for example image/jpeg or image/png) tells you the exact type returned.
From JavaScript / Node:
const res = await fetch(
"https://screencap.site/api/capture?url=https://wikipedia.org&w=1280&h=720",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
if (!res.ok) throw new Error("Capture failed: " + res.status);
const buffer = Buffer.from(await res.arrayBuffer());Or embed a capture straight into a page (key visible — only for trusted contexts):
<img
src="https://screencap.site/api/capture?url=https://wikipedia.org&w=600&h=400&key=sk_live_YOUR_KEY"
alt="Screenshot of wikipedia.org"
/>API reference
GET /api/capture — authenticate with your API key (see Authentication), then pass the target url and, optionally, the pixel dimensions. On success you get 200 and the image bytes.
| Parameter | Default | Description |
|---|---|---|
url | — | Required. The public http(s) URL to capture. Private, internal and loopback addresses are rejected (see the SSRF note below). |
width / w | 1280 | Capture width in pixels (1–4000). |
height / h | 720 | Capture height in pixels (1–4000). |
Rendering is performed by an upstream capture service, so each capture is returned at the requested dimensions as a standard web image; the exact type is given by the response's Content-Type header. Requests to private or loopback hosts are blocked at validation to prevent server-side request forgery (SSRF).
Managing API keys
Create, name and revoke keys from your dashboard. A few rules worth knowing:
- The full key is displayed once, at creation — copy it then and store it securely.
- We keep only a hash, so we can never show you an existing key again.
- Each key records a last used time, so you can spot keys that are safe to rotate out.
- Revoking a key takes effect immediately; in-flight requests with that key start returning
401. - Use a separate key per environment (local, staging, production) so you can rotate one without touching the others.
Plans & quotas
| Plan | Price | Monthly captures | Support |
|---|---|---|---|
| Hobby | Free | 1,000 | Community support, no card required. |
| Pro | $29/mo | 50,000 | Email support, higher volume. |
| Scale | Custom | Custom | Contractual SLA and invoicing. |
Every capture is recorded against your account, and your dashboard shows your recent captures and running usage so you can track it against your plan's monthly allowance. During the current release these allowances are applied as fair use rather than a hard cut-off — if you expect to exceed them, get in touch and we'll set you up.
Billing
The Hobby plan is free and needs no payment details. Paid plans (Pro and Scale) are sold and billed by Website Holding B.V. as the merchant of record, so your statement shows Website Holding and invoicing and taxes are handled centrally. To move up from the free plan, contact us and we'll activate it for your account.
Troubleshooting & errors
On success the API responds 200 with the image bytes. When something goes wrong, the endpoint uses standard HTTP status codes — here is what each means and how to fix it:
| Status | Meaning | How to fix |
|---|---|---|
200 | Success | The body is your image. |
400 | Bad request | A parameter is invalid — a malformed URL, or a width/height outside the 1–4000 range. |
401 | Unauthorized | The API key is missing or invalid. Check the Authorization header or key parameter. |
403 | Forbidden target | The URL resolves to a private, internal or loopback address and is blocked. Use a public URL. |
502 | Upstream failure | The renderer could not load the page. Retry, or check the page loads in a browser. |
504 | Timeout | The page took longer than 25 seconds to render. Retry, or simplify the target page. |
Still stuck? Our support team can help, and the frequently asked questions answer the most common issues.