← Back to API overview

API Documentation

Base URL: https://snap.dog/api/v1

Authentication

All API requests require a Bearer token in the Authorization header. Get your API key from the dashboard.

curl https://snap.dog/api/v1/jobs \
  -H "Authorization: Bearer sk_live_your_key_here"

Create a Capture

POST/api/v1/capture

Submit a URL for screenshot capture. Returns immediately with a job ID.

Request Body

urlstringYesThe URL to capture (http/https)
modestringNo"visible" (default) or "full_page"

Headers

AuthorizationstringYesBearer sk_live_...
Content-TypestringYesapplication/json
Idempotency-KeystringNoClient-generated UUID to prevent duplicate jobs on retries

Response (202 Accepted)

{
  "id": "aBcDeFgHiJ",
  "status": "queued",
  "url": "https://example.com",
  "created_at": "2026-04-16T12:00:00.000Z",
  "poll_url": "/api/v1/jobs/aBcDeFgHiJ"
}

Examples

curl
curl -X POST https://snap.dog/api/v1/capture \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'
Node.js (fetch)
const res = await fetch('https://snap.dog/api/v1/capture', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ url: 'https://example.com' }),
});
const job = await res.json();
console.log(job.id); // "aBcDeFgHiJ"
Python (requests)
import requests

resp = requests.post(
    "https://snap.dog/api/v1/capture",
    headers={"Authorization": "Bearer sk_live_..."},
    json={"url": "https://example.com"},
)
job = resp.json()
print(job["id"])  # "aBcDeFgHiJ"

Get Job Details

GET/api/v1/jobs/:id

Retrieve the status and screenshot URLs for a capture job.

Response (200 OK — when succeeded)

{
  "id": "aBcDeFgHiJ",
  "url": "https://example.com",
  "mode": "visible",
  "status": "succeeded",
  "created_at": "2026-04-16T12:00:00.000Z",
  "completed_at": "2026-04-16T12:00:15.000Z",
  "screenshots": {
    "desktop": {
      "url": "/api/v1/jobs/aBcDeFgHiJ/screenshots/desktop",
      "thumbnail_url": "/api/v1/jobs/aBcDeFgHiJ/screenshots/desktop/thumbnail",
      "width": 1440,
      "height": 1024
    },
    "tablet_landscape": { "..." },
    "tablet_portrait": { "..." },
    "mobile": { "..." }
  }
}

Polling Pattern

Jobs typically complete in 15–35 seconds. Poll every 2–3 seconds untilstatus is "succeeded" or "failed". While status is "processing", the screenshots object grows as each viewport finishes — desktop is usually first (~5–10s).

List Jobs

GET/api/v1/jobs

Paginated list of your capture jobs.

Query Parameters

pageintegerNoPage number (default: 1)
limitintegerNoResults per page, max 100 (default: 20)
statusstringNoFilter: queued, processing, succeeded, failed

Download Screenshots

GET/api/v1/jobs/:id/screenshots/:variant

Download the screenshot image (PNG) for a specific variant. Variants: desktop, tablet-landscape, tablet-portrait, mobile.

GET/api/v1/jobs/:id/screenshots/:variant/thumbnail

Download the WebP thumbnail (smaller file size, ideal for previews).

Rate Limits

Captures100 / dayPer user account
API requests10 / minutePer API key

Rate limit headers are included in every response:X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Error Handling

All errors follow a consistent format:

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Daily limit of 100 captures exceeded.",
    "retry_after": 3600
  }
}

Error Codes

UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403No access to this resource
NOT_FOUND404Job or screenshot not found
INVALID_REQUEST400Malformed request body
INVALID_URL422URL validation failed
RATE_LIMITED429Rate limit exceeded
SERVICE_BUSY503Queue is full, try again later