SnapDat API

Send a URL, get back an image. Three endpoints, one API key, plain JSON in and PNG or JPEG out.

Base URLhttps://www.snapdat.io

Quickstart

1

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.

2

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
3

Open screenshot.png. That's it.

Authentication

Every request to /screenshot, /og-card and /usage needs your key as a Bearer token:

Header
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.

POST

/screenshot

Renders a public URL in a real Chromium browser and returns the image.

Body (JSON)

FieldDescriptionDefault
urlrequiredstringThe page to capture. Must be a public http or https address.—
viewportstringdesktop (1280×800), tablet (768×1024) or mobile (390×844).desktop
widthintegerCustom width in pixels. Overrides the viewport's width.—
heightintegerCustom height in pixels. Overrides the viewport's height.—
full_pagebooleanCapture the whole scrolling page instead of just the first screen.false
formatstringpng or jpeg.png

Example: full-page mobile JPEG

cURL
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

200 raw image bytesContent-Type image/png or image/jpeg
POST

/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)

FieldDescriptionDefault
urlrequiredstringThe page to build the card from.—

Example

cURL
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

200 PNG image, 1200×630Content-Type image/png
GET

/usage

How many requests you've used this calendar month. Checking usage doesn't count against your limit.

cURL
curl https://www.snapdat.io/usage \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

200 · application/json
{
  "plan": "free",
  "used": 42,
  "limit": 100,
  "remaining": 58
}

Errors

Errors come back as JSON with a detail field explaining what went wrong.

400
Bad request

The URL couldn't be loaded or isn't allowed (private networks are blocked).

401
Unauthorized

Missing Authorization header, or the key is wrong.

403
Suspended

The account is inactive, usually a failed payment.

422
Invalid body

A field is missing or the wrong type. detail names it.

429
Limit reached

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.

Free
$0 / mo

100 requests a month

Pro
$19 / mo

2,000 requests a month

Scale
$49 / mo

10,000 requests a month

Sign up free →  ·  Prefer clicking through it? Try the OpenAPI explorer.