Need to capture website screenshots programmatically? Whether you're building a link preview tool, a site monitoring dashboard, or an automated reporting system — a URL to image API lets you do it with a single HTTP request.
URLSnap is a hosted screenshot API that converts any public URL to a PNG or JPEG image. No Puppeteer to install, no headless Chrome to maintain, no server required.
Here's how easy it is to take a screenshot of any website:
# One-line screenshot with curl
curl "https://urlsnap.dev/api/screenshot?url=https://github.com&apiKey=YOUR_KEY" \
--output screenshot.png
That's it. One HTTP request, one PNG file. Works from any language, any environment, any platform.
Get your API key in 30 seconds and start capturing screenshots immediately.
Get Free API Key View DocsShow thumbnail screenshots when users share URLs — like social media link cards.
Capture periodic screenshots of your site to detect visual regressions automatically.
Archive visual snapshots of web pages for audit trails, compliance, or journalism.
Screenshot competitor product pages to track pricing and layout changes over time.
Generate preview images of articles or products to embed in email newsletters.
Capture dashboard screenshots and embed them in Slack/email reports automatically.
| Parameter | Description | Default |
|---|---|---|
| url | The website URL to screenshot (required) | — |
| apiKey | Your API key (required) | — |
| width | Viewport width in pixels | 1280 |
| height | Viewport height in pixels | 800 |
| full | Capture full scrollable page (true/false) | false |
| format | Output format: png or jpeg | png |
| quality | JPEG quality 1–100 (jpeg only) | 90 |
| delay | Wait N ms after page load (for animations/async) | 0 |
const fs = require('fs');
async function screenshotUrl(url) {
const apiUrl = `https://urlsnap.dev/api/screenshot?url=${encodeURIComponent(url)}&apiKey=YOUR_KEY&full=true`;
const res = await fetch(apiUrl);
const buffer = Buffer.from(await res.arrayBuffer());
fs.writeFileSync('screenshot.png', buffer);
console.log('Saved screenshot.png');
}
screenshotUrl('https://example.com');
import requests
def screenshot_url(url):
api_url = f"https://urlsnap.dev/api/screenshot?url={url}&apiKey=YOUR_KEY&full=true"
response = requests.get(api_url)
response.raise_for_status()
with open("screenshot.png", "wb") as f:
f.write(response.content)
print("Saved screenshot.png")
screenshot_url("https://example.com")
<?php
function screenshotUrl($url) {
$apiUrl = "https://urlsnap.dev/api/screenshot?url=" . urlencode($url) . "&apiKey=YOUR_KEY&full=true";
$imageData = file_get_contents($apiUrl);
file_put_contents("screenshot.png", $imageData);
echo "Saved screenshot.png\n";
}
screenshotUrl("https://example.com");
package main
import (
"io"
"net/http"
"net/url"
"os"
)
func screenshotUrl(targetURL string) error {
apiURL := "https://urlsnap.dev/api/screenshot?url=" + url.QueryEscape(targetURL) + "&apiKey=YOUR_KEY&full=true"
resp, err := http.Get(apiURL)
if err != nil { return err }
defer resp.Body.Close()
f, _ := os.Create("screenshot.png")
defer f.Close()
io.Copy(f, resp.Body)
return nil
}
By default, URLSnap captures what's visible in the viewport (1280×800). Adding ?full=true captures the entire scrollable page — perfect for long landing pages, articles, or documentation.
# Viewport screenshot (1280x800, what you see above the fold)
https://urlsnap.dev/api/screenshot?url=https://example.com&apiKey=KEY
# Full-page screenshot (entire scrollable content)
https://urlsnap.dev/api/screenshot?url=https://example.com&full=true&apiKey=KEY
# Mobile viewport screenshot
https://urlsnap.dev/api/screenshot?url=https://example.com&width=390&height=844&apiKey=KEY
URLSnap uses a real headless Chromium browser under the hood. This means JavaScript executes, React/Vue components render, and dynamic content loads — just like a real browser.
For pages with animations or async data fetching, use the delay parameter to wait for the content to finish loading:
# Wait 2 seconds after page load for async content
https://urlsnap.dev/api/screenshot?url=https://myapp.com&delay=2000&apiKey=KEY
delay=1000 and only increase if your screenshots are missing dynamic content.
Need to screenshot the mobile version of a site? Just set the viewport to phone dimensions:
# iPhone 14 Pro dimensions
https://urlsnap.dev/api/screenshot?url=https://example.com&width=393&height=852&apiKey=KEY
# Samsung Galaxy S23
https://urlsnap.dev/api/screenshot?url=https://example.com&width=360&height=780&apiKey=KEY
URLSnap also supports PDF generation from any URL — same simple API, returns a PDF file instead of an image:
GET https://urlsnap.dev/api/pdf?url=https://example.com&apiKey=YOUR_KEY
See the HTML to PDF API guide for full documentation and examples.
All plans include full-page screenshots, PDF generation, custom viewport sizes, and JavaScript rendering.
Free API key in 30 seconds. 20 screenshots/day at no cost — no credit card required.
Get Free API Key View PricingA URL to image API is a REST service that accepts a website URL and returns a screenshot of that page as a PNG or JPEG image. You make one HTTP GET request and receive image bytes back. No browser or headless Chrome required on your server.
Yes. URLSnap uses headless Chromium under the hood — the same engine as Google Chrome. React, Vue, Angular, and other JavaScript frameworks render correctly. Use ?delay=N if your page loads data asynchronously.
Most screenshots complete in 2–5 seconds, depending on how fast the target page loads. Simple static pages can complete in under 1 second. Complex pages with many third-party scripts or slow CDNs may take longer.
PNG (default) and JPEG. Use ?format=jpeg&quality=85 for smaller file sizes when you don't need transparency. PNG is better for screenshots with text and UI elements.
No — URLSnap is a cloud service and can only access publicly reachable URLs. For internal pages, you'd need a self-hosted headless browser solution like Puppeteer.
Yes — the free plan gives you 20 screenshots per day with no credit card required. Sign up and get your API key in under 30 seconds.