API Reference

Documentation

Everything you need to capture screenshots, generate PDFs, and extract web content via a simple REST API.

Base URL

https://urlsnap.dev

All endpoints require an API key passed as a query parameter: ?key=YOUR_API_KEY

Authentication — Pass your API key as a query parameter on every request:
GET https://urlsnap.dev/api/screenshot?url=https://example.com&key=snp_xxxx
Get your free API key →

Endpoints

GET
/api/screenshot
Capture a full-page or viewport screenshot of any URL. Returns PNG image.
Free · Starter · Pro
GET
/api/pdf
Generate a PDF from any URL or raw HTML content. Returns PDF file.
Free · Starter · Pro
GET
/api/extract
Extract clean Markdown or plain text from any URL. Full JS rendering.
Starter · Pro only

GET /api/screenshot

Capture a screenshot of any URL. Returns a PNG image directly (binary).

Example
GET https://urlsnap.dev/api/screenshot?url=https://github.com&key=snp_xxxx
ParameterTypeRequiredDescription
urlstringrequiredThe URL to screenshot
keystringrequiredYour API key
widthintegeroptionalViewport width in px (default: 1280)
heightintegeroptionalViewport height in px (default: 800)
full_pagebooleanoptionalCapture full page scroll height (default: false)
delayintegeroptionalWait ms after load before capture (default: 0)
formatstringoptionalImage format: png or jpeg (default: png)
Code Examples
// 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

GET /api/pdf

Generate a PDF from any URL. Returns a PDF file directly (binary).

Example
GET https://urlsnap.dev/api/pdf?url=https://github.com&key=snp_xxxx
ParameterTypeRequiredDescription
urlstringrequiredThe URL to convert to PDF
keystringrequiredYour API key
formatstringoptionalPage size: A4, Letter, etc. (default: A4)
landscapebooleanoptionalLandscape orientation (default: false)
delayintegeroptionalWait ms after load (default: 0)
POST /api/pdf — HTML to PDF

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>

Plans & Rate Limits

Free
$0
20 req/day
Screenshot + PDF
Starter
$9/mo
500 req/day
+ Extract API
Pro
$29/mo
5,000 req/day
All endpoints

Rate limit resets daily at midnight UTC. Exceeded requests return HTTP 429.

/api/extract — Web Page to Markdown
Full JavaScript rendering → clean Markdown or plain text. Perfect for AI pipelines, content ingestion, and scraping. Starter+ plan.
View Extract Docs →

Ready to start?

Get your free API key in seconds — no credit card required.

Get Free API Key View Pricing