URL to Screenshot API

The simplest way to capture website screenshots. One endpoint, intuitive query parameters, instant PNG/JPEG/PDF output.

One Endpoint, Zero Complexity

SnapAPI's entire API is a single endpoint:

GET https://apisnap.dev/api/screenshot?url=https://example.com

Add your API key to the Authorization header, and you get back a PNG image. No SDKs, no webhooks, no multi-step workflows, no WebSocket connections. Just a plain HTTP GET request that returns a binary image.

This works with curl, fetch, requests, HttpClient, or any HTTP client in any programming language.

Complete Parameter Reference

Required:

  • url — Target URL to screenshot (URL-encoded)

Format & Quality:

  • format — png (default), jpeg, or pdf
  • quality — JPEG quality 1-100 (default: 80)

Viewport:

  • width — 320-3840 (default: 1280)
  • height — 200-2160 (default: 800)
  • deviceScaleFactor — 1-3 (default: 1, use 2 for retina)

Rendering:

  • full_page — true/false, capture entire scrollable page
  • dark_mode — true/false, emulate dark color scheme
  • delay — 0-10000ms, wait after page load
  • selector — CSS selector for element-specific capture

Response headers:

  • X-Usage-Remaining — Monthly screenshots remaining
  • X-Screenshot-Width / X-Screenshot-Height — Rendered dimensions

Start Capturing Screenshots Today

100 free screenshots per month. No credit card required. API key delivered instantly.

Get Started Free

Curl Examples

# Basic screenshot
curl -H "Authorization: Bearer snap_xyz" \
  "https://apisnap.dev/api/screenshot?url=https://github.com" -o github.png

# Full-page PDF in dark mode
curl -H "Authorization: Bearer snap_xyz" \
  "https://apisnap.dev/api/screenshot?url=https://stripe.com&format=pdf&full_page=true&dark_mode=true" \
  -o stripe.pdf

# JPEG thumbnail at mobile width
curl -H "Authorization: Bearer snap_xyz" \
  "https://apisnap.dev/api/screenshot?url=https://example.com&format=jpeg&quality=70&width=375&height=667" \
  -o mobile.jpg

# Screenshot specific element
curl -H "Authorization: Bearer snap_xyz" \
  "https://apisnap.dev/api/screenshot?url=https://example.com&selector=.hero-section" \
  -o hero.png

Error Handling

HTTP status codes from the API:

  • 200 OK — Success. Body is binary image. Check Content-Type header.
  • 400 Bad Request — Invalid URL or parameters. Body is JSON with error message.
  • 401 Unauthorized — Missing or invalid API key.
  • 429 Too Many Requests — Monthly quota exceeded.
  • 500 Server Error — Unexpected error. Retry after a few seconds.

Failed requests (non-200) don't count against your monthly quota.

Frequently Asked Questions

Use encodeURIComponent() in JavaScript, urllib.parse.quote() in Python, or url.QueryEscape() in Go. The url parameter value must be properly encoded.
15 second timeout. Most screenshots complete in 1-3 seconds. Heavy pages with lots of JavaScript may take 5-10 seconds.
Technically yes, but don't expose your API key in client-side code. Use a server-side proxy endpoint instead.
No. Each request generates a fresh screenshot. Pages can change between requests, so results may differ slightly.