How to Capture Website Screenshots with an API
Taking automated screenshots of websites is a common requirement for developers building monitoring tools, generating reports, or creating visual archives. In this guide, we'll show you how to capture pixel-perfect screenshots using the WebTools API.
Why Use a Screenshot API?
Running your own headless browser (Puppeteer, Playwright, Selenium) is:
- Resource-intensive โ Chromium uses 200โ500MB of RAM per instance
- Complex to maintain โ Browser updates, font rendering, dependency management
- Hard to scale โ Concurrent requests can crash your server
A screenshot API handles all of this for you. One HTTP request โ one screenshot.
Getting Started
First, sign up for a free API key. You get 100 free requests per month โ no credit card required.
Basic Usage
cURL
curl "https://tools.f5rvoice.com/api/v1/screenshot?url=https://github.com&apikey=YOUR_KEY" -o screenshot.png
Python
import requests
response = requests.get("https://tools.f5rvoice.com/api/v1/screenshot", params={
"url": "https://github.com",
"apikey": "YOUR_KEY"
})
with open("screenshot.png", "wb") as f:
f.write(response.content)
print(f"Screenshot saved! Status: {response.status_code}")
Node.js
const fs = require('fs');
const response = await fetch(
`https://tools.f5rvoice.com/api/v1/screenshot?url=https://github.com&apikey=YOUR_KEY`
);
const buffer = await response.arrayBuffer();
fs.writeFileSync('screenshot.png', Buffer.from(buffer));
Advanced Options
| Parameter | Default | Description |
|---|---|---|
width |
1280 | Viewport width (320โ3840) |
height |
720 | Viewport height (240โ2160) |
format |
png | png, jpeg, or webp |
fullPage |
false | Capture the entire scrollable page |
delay |
0 | Wait N milliseconds before capture |
Full-Page Screenshot with Custom Size
curl "https://tools.f5rvoice.com/api/v1/screenshot?url=https://news.ycombinator.com&width=1920&height=1080&fullPage=true&apikey=YOUR_KEY" -o full.png
Common Use Cases
- Visual regression testing โ Compare screenshots before and after deployments
- Social media previews โ Generate OG image thumbnails dynamically
- Client reports โ Include website screenshots in PDF reports
- Web archiving โ Capture periodic snapshots of competitor websites
- Content moderation โ Screenshot user-submitted links for review
Rate Limits
The free plan includes 100 requests/month. Need more? Check out our pricing plans starting at $9.99/month for 5,000 requests.
Conclusion
With the WebTools Screenshot API, capturing website screenshots is as simple as making an HTTP GET request. No Chromium installations, no dependency nightmares, no scaling worries.
Ready to try WebTools API?
Get 100 free requests per month. No credit card required.
Get Free API Key โ