Need to capture website screenshots programmatically? Whether you're building link previews, monitoring dashboards, or automating reports — here's how.
The Problem with DIY Screenshots
Running your own headless browser sounds appealing until you deal with:
- Spinning up Puppeteer/Playwright instances
- Memory leaks from zombie Chrome processes
- Handling timeouts and dynamic content
- Scaling for concurrent requests
- Keeping Chromium updated and patched
A screenshot API handles all of this. Send a request, get an image.
curl
curl -X POST https://rendly-api.fly.dev/api/v1/screenshots \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://github.com",
"format": "png",
"width": 1280,
"height": 720
}' \
--output screenshot.png
Python
import requests
response = requests.post(
"https://rendly-api.fly.dev/api/v1/screenshots",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"url": "https://github.com",
"format": "png",
"width": 1280,
"height": 720
}
)
with open("screenshot.png", "wb") as f:
f.write(response.content)
Node.js
const response = await fetch("https://rendly-api.fly.dev/api/v1/screenshots", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://github.com",
format: "png",
width: 1280,
height: 720
})
});
const buffer = await response.arrayBuffer();
fs.writeFileSync("screenshot.png", Buffer.from(buffer));
Ruby
require "rendly"
client = Rendly::Client.new(api_key: "YOUR_API_KEY")
screenshot = client.screenshot(
url: "https://github.com",
format: "png",
width: 1280,
height: 720
)
File.write("screenshot.png", screenshot)
Customization Options
| Parameter | Description |
|---|---|
width / height
|
Viewport dimensions |
format |
PNG, JPEG, or WebP |
full_page |
Capture entire scrollable page |
wait_for |
Wait ms for dynamic content |
device_scale_factor |
2x for retina screenshots |
Common Use Cases
- Link previews — thumbnail cards in chat apps
- Visual monitoring — periodic regression testing
- Report generation — render HTML as images
- Social sharing — dynamic OG images
- Competitive analysis — track site changes
- Archiving — compliance snapshots
Free Tier
100 screenshots/month. No credit card. Same features as paid plans.
Paid plans start at $9/month for 1,000 renders.
Rendly — Screenshot & image generation API. Built with Rails 8 + Playwright. Try the interactive playground to test it live.
Top comments (0)