SnapDat API
Send a URL, get back an image. Three endpoints, one API key, plain JSON in and PNG or JPEG out.
Quickstart
Sign up at snapdat.io/signup. Your key appears instantly and is emailed to you. The free plan is 100 requests a month, no card.
Make your first screenshot:
curl -X POST https://www.snapdat.io/screenshot \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}' \ --output screenshot.png
import requests r = requests.post( "https://www.snapdat.io/screenshot", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={"url": "https://example.com"}, timeout=60, ) r.raise_for_status() with open("screenshot.png", "wb") as f: f.write(r.content)
import { writeFile } from "node:fs/promises"; const res = await fetch("https://www.snapdat.io/screenshot", { method: "POST", headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://example.com" }), }); if (!res.ok) throw new Error(await res.text()); await writeFile("screenshot.png", Buffer.from(await res.arrayBuffer()));
Open screenshot.png. That's it.
Authentication
Every request to /screenshot, /og-card and /usage needs your key as a Bearer token:
Authorization: Bearer YOUR_API_KEY
Keep your key on the server. Anyone holding it can spend your monthly requests. Lost it? Sign up again with the same email and we'll resend it.
/screenshot
Renders a public URL in a real Chromium browser and returns the image.
Body (JSON)
| Field | Description | Default |
|---|---|---|
| urlrequiredstring | The page to capture. Must be a public http or https address. | — |
| viewportstring | desktop (1280×800), tablet (768×1024) or mobile (390×844). | desktop |
| widthinteger | Custom width in pixels. Overrides the viewport's width. | — |
| heightinteger | Custom height in pixels. Overrides the viewport's height. | — |
| full_pageboolean | Capture the whole scrolling page instead of just the first screen. | false |
| formatstring | png or jpeg. | png |
Example: full-page mobile JPEG
curl -X POST https://www.snapdat.io/screenshot \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://stripe.com", "viewport": "mobile", "full_page": true, "format": "jpeg"}' \ --output stripe-mobile.jpg
Response
image/png or image/jpeg/og-card
Builds a 1200×630 social preview card from a page's Open Graph tags (title, description, image). The size X, LinkedIn and Slack expect.
Body (JSON)
| Field | Description | Default |
|---|---|---|
| urlrequiredstring | The page to build the card from. | — |
Example
curl -X POST https://www.snapdat.io/og-card \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://your-blog.com/post"}' \ --output og-card.png
Response
image/png/usage
How many requests you've used this calendar month. Checking usage doesn't count against your limit.
curl https://www.snapdat.io/usage \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{
"plan": "free",
"used": 42,
"limit": 100,
"remaining": 58
}
Errors
Errors come back as JSON with a detail field explaining what went wrong.
The URL couldn't be loaded or isn't allowed (private networks are blocked).
Missing Authorization header, or the key is wrong.
The account is inactive, usually a failed payment.
A field is missing or the wrong type. detail names it.
You've used this month's requests. Upgrade, or wait for the 1st.
Plans & limits
Limits reset on the 1st of each month. Every successful /screenshot or /og-card call counts as one request.
100 requests a month
2,000 requests a month
10,000 requests a month
Sign up free → · Prefer clicking through it? Try the OpenAPI explorer.