Free Screenshot API: How to Capture Website Screenshots Programmatically
Capturing website screenshots programmatically is one of the most common needs for developers building dashboards, monitoring tools, link previews, or automated reports. In this guide, we'll walk you through how to use a free screenshot API to capture pixel-perfect website screenshots with just an API call.
Why You Need a Screenshot API
Taking a screenshot of a website sounds simple — just open a browser and hit "Print Screen," right? But when you need to automate this process at scale, things get complicated fast. You need to:
- Spin up and manage headless browser instances (Puppeteer, Playwright)
- Handle JavaScript rendering, lazy loading, and dynamic content
- Deal with timeouts, memory leaks, and zombie processes
- Scale infrastructure to handle concurrent requests
- Manage Chrome/Chromium updates and security patches
A screenshot API like Rendly handles all of this for you. You send an HTTP request, you get back an image. No infrastructure to manage, no browser to maintain.
Getting Started with Rendly's Free Screenshot API
Rendly offers a generous free tier with 100 screenshots per month — perfect for side projects, prototyping, or small-scale automation. Here's how to get started:
Step 1: Get Your API Key
Sign up at rendly.io and grab your API key from the dashboard. It takes about 30 seconds.
Step 2: Make Your First Screenshot
Here's a simple curl command to capture a screenshot:
curl -X POST https://rendly.io/api/v1/screenshots \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"format": "png",
"width": 1280,
"height": 720
}' \
--output screenshot.png
That's it. One request and you have a crisp, full-page screenshot.
Step 3: Customize Your Screenshots
Rendly gives you fine-grained control over the output:
{
"url": "https://example.com",
"format": "png",
"width": 1920,
"height": 1080,
"full_page": true,
"wait_for": 3000,
"device_scale_factor": 2
}
Parameters include viewport dimensions, format (PNG/JPEG/WebP), full-page capture, wait time for dynamic content, device scale factor for retina screenshots, and more.
Code Examples
Python
import requests
response = requests.post(
"https://rendly.io/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.io/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)
Common Use Cases for a Screenshot API
Here are some popular ways developers use screenshot APIs:
- Link previews — Show thumbnail previews of URLs in chat apps or social platforms
- Website monitoring — Capture periodic screenshots for visual regression testing
- PDF generation — Render HTML pages as images for reports and invoices
- Social sharing — Generate OG images from web pages dynamically
- Archiving — Save visual snapshots of web pages for compliance or records
- Competitive analysis — Track changes on competitor websites over time
Free Tier vs Paid Plans
Rendly's free tier includes 100 renders per month, which is enough for many use cases. If you need more, paid plans start at just $9/month for 1,000 renders. All plans include the same API features — no artificial limitations on the free tier.
Why Rendly Over Self-Hosted Solutions?
Running your own Puppeteer/Playwright instance seems appealing until you deal with the operational overhead. Here's what you avoid with Rendly:
- No Docker containers to manage
- No memory leaks from zombie Chrome processes
- No security patches to apply
- No scaling headaches under load
- Sub-second response times with global CDN caching
Getting Started Today
Ready to capture your first screenshot? Sign up for free and start making API calls in under a minute. No credit card required.
Check out the full API documentation for advanced features like webhooks, async rendering, and template-based image generation.
Ready to get started?
Try Rendly free — 100 renders/month, no credit card required.
Sign up for free →