Free Screenshot API for Developers
Need to capture website screenshots programmatically? Whether you're building link previews, generating thumbnails for a CMS, testing responsive layouts, or creating visual reports — you need a screenshot API that's fast, flexible, and doesn't cost a fortune.
Most screenshot APIs charge $29-99/month even for basic usage. We built a free screenshot API that gives you 50 credits with no signup, supports 5 viewport presets, full-page capture, dark mode, and CSS selector targeting.
Try it right now
Get an API key and take your first screenshot in under 30 seconds. No signup, no credit card.
Get Free API KeyQuick Start: 3 Steps
1. Get a free API key
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/keys/create
{
"key": "ss_abc123...",
"credits": 50,
"note": "50 free credits. Top up with USDC on Base.",
"check_balance": "GET /api/keys/balance with Authorization: Bearer YOUR_KEY"
}
2. Take a screenshot
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
3. Get the image
The response contains a download URL or base64-encoded image data. Use the /api/screenshot/json endpoint for inline base64:
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "viewport": "mobile"}'
{
"id": "scr_86071bdde86f087d",
"image": "iVBORw0KGgoAAAANSUhEUg...",
"format": "png",
"url": "https://example.com/",
"title": "Example Domain",
"viewport": {"width": 375, "height": 812},
"fullPage": false,
"size": 17299,
"takenAt": "2026-03-03T15:10:09.640Z"
}
Features
5 Viewport Presets
Desktop (1280x720), tablet (768x1024), mobile (375x812), 1080p, and 4K resolution.
Full-Page Capture
Capture the entire scrollable page, not just the visible viewport. Great for long landing pages.
Dark Mode
Force dark color scheme with darkMode: true. Tests how your site looks in dark mode.
CSS Selector
Capture a specific element using a CSS selector. Perfect for component screenshots.
Delay Control
Wait for JavaScript/animations to load before capturing with a custom delay (ms).
PNG & JPEG
Choose between lossless PNG for quality or JPEG for smaller file sizes.
API Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | — | Required. The URL to screenshot. |
viewport | string | desktop | One of: desktop, tablet, mobile, 1080p, 4k |
fullPage | boolean | false | Capture the full scrollable page |
format | string | png | Image format: png or jpeg |
darkMode | boolean | false | Emulate dark color scheme |
selector | string | — | CSS selector to capture a specific element |
delay | integer | 0 | Wait time in ms before capturing |
Code Examples
# Desktop screenshot
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com"}'
# Mobile viewport, full page, dark mode
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com", "viewport": "mobile", "fullPage": true, "darkMode": true}'
# Capture specific element
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com", "selector": ".application-main"}'
# Wait for dynamic content
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "delay": 3000}'
import requests
import base64
API = "https://agent-gateway-kappa.vercel.app/v1/agent-screenshot"
# Step 1: Get free API key
key_resp = requests.post(f"{API}/api/keys/create")
api_key = key_resp.json()["key"]
print(f"API Key: {api_key}")
headers = {"Authorization": f"Bearer {api_key}"}
# Step 2: Take screenshot (returns base64)
resp = requests.post(
f"{API}/api/screenshot/json",
headers=headers,
json={
"url": "https://news.ycombinator.com",
"viewport": "desktop",
"fullPage": True
}
)
data = resp.json()
# Step 3: Save to file
img_bytes = base64.b64decode(data["image"])
with open("screenshot.png", "wb") as f:
f.write(img_bytes)
print(f"Saved: {data['title']} ({data['size']} bytes)")
# Output: Saved: Hacker News (45123 bytes)
# Batch screenshots across viewports
for viewport in ["desktop", "tablet", "mobile"]:
resp = requests.post(
f"{API}/api/screenshot/json",
headers=headers,
json={"url": "https://example.com", "viewport": viewport}
)
img = base64.b64decode(resp.json()["image"])
with open(f"screenshot-{viewport}.png", "wb") as f:
f.write(img)
print(f"{viewport}: {len(img)} bytes")
const fs = require('fs');
const API = 'https://agent-gateway-kappa.vercel.app/v1/agent-screenshot';
async function captureScreenshot() {
// Step 1: Get free API key
const keyResp = await fetch(`${API}/api/keys/create`, { method: 'POST' });
const { key } = await keyResp.json();
console.log(`API Key: ${key}`);
// Step 2: Take screenshot
const resp = await fetch(`${API}/api/screenshot/json`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${key}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://github.com',
viewport: 'desktop',
darkMode: true
})
});
const data = await resp.json();
// Step 3: Save to file
const buffer = Buffer.from(data.image, 'base64');
fs.writeFileSync('screenshot.png', buffer);
console.log(`Saved: ${data.title} (${data.size} bytes)`);
}
captureScreenshot();
Use Cases
Link Previews & Social Cards
Automatically generate link preview thumbnails for your app. When a user pastes a URL, capture a screenshot and display it as a rich preview — like Slack, Discord, or Twitter do.
# Generate a link preview thumbnail
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "viewport": "desktop", "format": "jpeg"}'
Responsive Design Testing
Capture the same page across all 5 viewports to verify your responsive design. Automate visual regression tests in CI/CD pipelines.
# Compare desktop vs mobile rendering
for vp in desktop tablet mobile 1080p 4k; do
curl -s -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d "{\"url\": \"https://yoursite.com\", \"viewport\": \"$vp\"}" \
| python3 -c "import sys,json,base64; d=json.load(sys.stdin); open(f'$vp.png','wb').write(base64.b64decode(d['image']))"
echo "Captured $vp"
done
SEO & Competitor Monitoring
Take daily screenshots of competitor websites or your own SERP rankings. Track design changes, pricing updates, and content modifications over time.
Documentation & Reporting
Generate screenshots for documentation, status reports, or client presentations. Use fullPage: true to capture entire pages, or selector to grab specific UI components.
Dark Mode Testing
Test how your website looks in both light and dark modes without manually switching. The darkMode parameter emulates the prefers-color-scheme: dark media query.
# Compare light vs dark mode
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com", "darkMode": false}'
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-screenshot/api/screenshot/json \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com", "darkMode": true}'
Comparison: Screenshot APIs in 2026
| Feature | Agent Screenshot | ScreenshotOne | ScreenshotAPI.net | Urlbox |
|---|---|---|---|---|
| Free tier | 50 screenshots | 100/month | 100/month | 7-day trial |
| Signup required | No | Yes | Yes | Yes |
| Viewport presets | 5 (incl. 4K) | Custom only | Custom only | Custom only |
| Full-page capture | Yes | Yes | Yes | Yes |
| Dark mode | Yes | Yes | No | Yes |
| CSS selector | Yes | Yes | No | Yes |
| Base64 response | Yes | No | No | No |
| Paid plans from | $0.002/shot | $29/mo | $19/mo | $39/mo |
| API style | REST | REST | REST | REST |
Viewport Presets
| Preset | Width | Height | Use Case |
|---|---|---|---|
desktop | 1280px | 720px | Standard desktop browser |
tablet | 768px | 1024px | iPad, Android tablets |
mobile | 375px | 812px | iPhone, modern smartphones |
1080p | 1920px | 1080px | Full HD monitors |
4k | 3840px | 2160px | 4K displays, print-quality |
Build a Screenshot Automation Script
Here's a complete Python script that monitors a list of URLs and captures daily screenshots for visual change tracking:
import requests, base64, os
from datetime import datetime
API = "https://agent-gateway-kappa.vercel.app/v1/agent-screenshot"
# Get API key (save this, reuse across runs)
def get_key():
key = os.environ.get("SCREENSHOT_KEY")
if not key:
resp = requests.post(f"{API}/api/keys/create")
key = resp.json()["key"]
print(f"New key: {key} (save as SCREENSHOT_KEY env var)")
return key
# Capture screenshots for multiple URLs
def capture_batch(urls, viewport="desktop"):
key = get_key()
headers = {"Authorization": f"Bearer {key}"}
today = datetime.now().strftime("%Y-%m-%d")
os.makedirs(today, exist_ok=True)
for url in urls:
resp = requests.post(
f"{API}/api/screenshot/json",
headers=headers,
json={"url": url, "viewport": viewport, "fullPage": True}
)
data = resp.json()
slug = url.replace("https://", "").replace("/", "_")
path = f"{today}/{slug}.png"
with open(path, "wb") as f:
f.write(base64.b64decode(data["image"]))
print(f"[OK] {data['title']} -> {path}")
# Usage: monitor these sites daily
sites = [
"https://news.ycombinator.com",
"https://github.com/trending",
"https://producthunt.com",
]
capture_batch(sites)
Start capturing screenshots now
50 free screenshots. No signup, no credit card, no rate limits on the free tier.
Get Free API KeyFrequently Asked Questions
How many free screenshots do I get?
50 screenshots with each API key. No signup or credit card required. You can create multiple keys if needed. Paid credits cost $0.002 per screenshot (500 credits per USDC).
Do I need to sign up or create an account?
No. Just call POST /api/keys/create to get an API key instantly. No email, no OAuth, no registration form.
What format are screenshots returned in?
Two endpoints are available: /api/screenshot returns a download URL, and /api/screenshot/json returns the image as a base64-encoded string in JSON. Both support PNG and JPEG formats.
Can I capture dynamic/JavaScript-heavy pages?
Yes. The API uses a full headless Chromium browser, so JavaScript renders normally. Use the delay parameter (in milliseconds) to wait for animations, lazy-loaded content, or SPA hydration before capturing.
What's the maximum page size or timeout?
Pages are given up to 30 seconds to load. Full-page screenshots of very long pages (100+ viewport heights) may be limited to prevent memory issues. For most sites, full-page capture works perfectly.
Can I use this for automated testing / CI?
Absolutely. The API is designed for automation. Use it in CI/CD pipelines for visual regression testing — capture screenshots before and after deploys, then compare them programmatically or visually.
Is there a rate limit?
Free tier: 30 requests per minute. With an API key and credits: 120 requests per minute. More than enough for most use cases.
More Developer Tools
- Free Webhook Testing Tool — capture and inspect HTTP requests
- Free Crypto Price API — real-time token prices
- Build an AI Agent with Crypto Wallet
- Explore all 39+ APIs in the Clawdia catalog