Introduction
SnapAPI is a production-ready screenshot API that allows you to capture screenshots of any website programmatically. Our infrastructure is optimized for speed, reliability, and scale.
The API is RESTful, uses standard HTTP methods, and returns responses in binary image formats. All requests must be authenticated using your API key.
New to SnapAPI?
Get started with 1,000 free screenshots per month. No credit card required.
Authentication
All API requests require authentication via your API key. You can find your API key in your dashboard.
Keep Your API Key Secret
Never share your API key publicly or commit it to version control. Treat it like a password.
Quick Start
Here's a simple example to get you started. Replace YOUR_API_KEY with your actual API key:
This will capture a screenshot of example.com and save it as screenshot.png.
Screenshot Endpoint
Captures a screenshot of the specified URL and returns the image in binary format.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | The URL of the website to capture |
apiKey |
string | Yes | Your API authentication key |
width |
integer | No | Viewport width (default: 1280, max: 3840) |
height |
integer | No | Viewport height (default: 720, max: 2160) |
fullPage |
boolean | No | Capture full page scroll (default: false) |
format |
string | No | Image format: png, jpeg (default: png) |
Responses
Success (200 OK): Returns the screenshot image in binary format.
Content-Type: image/png or image/jpeg
Error Codes
| Code | Description |
|---|---|
400 |
Bad Request - Missing or invalid parameters |
401 |
Unauthorized - Invalid or missing API key |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error - Something went wrong on our end |
Code Examples
cURL
JavaScript (Fetch API)
Python
Node.js (Axios)
Rate Limits
Rate limits vary by plan:
| Plan | Monthly Limit | Rate Limit |
|---|---|---|
| Free | 1,000 requests | 10 requests/minute |
| Starter | 5,000 requests | 30 requests/minute |
| Growth | 25,000 requests | 100 requests/minute |
| Pro | 100,000 requests | 500 requests/minute |
Best Practices
Secure Your API Key
Store your API key in environment variables, not in your code. Use backend requests to keep your key secret.
Handle Rate Limits
Implement exponential backoff when you receive 429 errors. Monitor your usage in the dashboard.
Cache Screenshots
Cache screenshots when possible to reduce API calls and improve response times for your users.
Need Help?
Can't find what you're looking for? Our support team is here to help.