Everything you need to capture screenshots, generate PDFs, and extract web content via a simple REST API.
All endpoints require an API key passed as a query parameter: ?key=YOUR_API_KEY
GET https://urlsnap.dev/api/screenshot?url=https://example.com&key=snp_xxxxCapture a screenshot of any URL. Returns a PNG image directly (binary).
GET https://urlsnap.dev/api/screenshot?url=https://github.com&key=snp_xxxx
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | required | The URL to screenshot |
| key | string | required | Your API key |
| width | integer | optional | Viewport width in px (default: 1280) |
| height | integer | optional | Viewport height in px (default: 800) |
| full_page | boolean | optional | Capture full page scroll height (default: false) |
| delay | integer | optional | Wait ms after load before capture (default: 0) |
| format | string | optional | Image format: png or jpeg (default: png) |
// Node.js
const res = await fetch('https://urlsnap.dev/api/screenshot?url=https://example.com&key=snp_xxxx');
const buffer = await res.arrayBuffer();
fs.writeFileSync('screenshot.png', Buffer.from(buffer));# Python
import requests
r = requests.get('https://urlsnap.dev/api/screenshot', params={'url': 'https://example.com', 'key': 'snp_xxxx'})
open('screenshot.png', 'wb').write(r.content)# cURL curl "https://urlsnap.dev/api/screenshot?url=https://example.com&key=snp_xxxx" -o screenshot.png
Generate a PDF from any URL. Returns a PDF file directly (binary).
GET https://urlsnap.dev/api/pdf?url=https://github.com&key=snp_xxxx
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | required | The URL to convert to PDF |
| key | string | required | Your API key |
| format | string | optional | Page size: A4, Letter, etc. (default: A4) |
| landscape | boolean | optional | Landscape orientation (default: false) |
| delay | integer | optional | Wait ms after load (default: 0) |
POST raw HTML in the request body to generate a PDF from custom HTML.
POST https://urlsnap.dev/api/pdf?key=snp_xxxx Content-Type: text/html <!DOCTYPE html> <html><body><h1>Hello World</h1></body></html>
Rate limit resets daily at midnight UTC. Exceeded requests return HTTP 429.
Get your free API key in seconds — no credit card required.
Get Free API Key View Pricing