Base URL: https://api.sitegrab.dev
Quickstart · Authentication · Endpoints · Pricing · Code Examples · Status Codes · Rate Limiting
Get started in 30 seconds:
# Step 1: Get a free API key curl -X POST https://api.sitegrab.dev/v1/keys -H 'Content-Type: application/json' -d '{"tier":"free"}' # → Returns {"api_key":"lf_...","tier":"free","limit":50} # Step 2: Take your first screenshot curl -X POST https://api.sitegrab.dev/v1/screenshot -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"url":"https://example.com"}' --output screenshot.png
That's it. Your free tier gives you 50 screenshots/month with 10 requests/minute rate limit. Check usage anytime at https://api.sitegrab.dev/v1/usage.
Include your API key in one of these ways:
# Option 1: Authorization header curl -H 'Authorization: Bearer YOUR_API_KEY' 'https://api.sitegrab.dev/v1/screenshot?url=https://example.com' # Option 2: X-API-Key header curl -H 'X-API-Key: YOUR_API_KEY' 'https://api.sitegrab.dev/v1/screenshot?url=https://example.com' # Option 3: Query parameter (GET only) curl 'https://api.sitegrab.dev/v1/screenshot?url=https://example.com&key=YOUR_API_KEY'
Health check endpoint. Returns API status and version.
curl 'https://api.sitegrab.dev/v1/health'
Capture a screenshot of a webpage. Returns the screenshot file directly or a JSON response with status.
curl -X POST https://api.sitegrab.dev/v1/screenshot \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"format": "png",
"full_page": true
}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The webpage URL to capture (must start with http:// or https://) |
| format | string | No | Output format: png, jpeg, or pdf (default: png) |
| full_page | boolean | No | Capture full-page screenshot (default: true) |
| viewport | string | No | Viewport size, e.g. "1920x1080" (default: "1280x720") |
| delay_ms | number | No | Wait milliseconds before capture (default: 0) |
Simple GET endpoint for easy embedding. Same parameters as POST but via query string.
curl "https://api.sitegrab.dev/v1/screenshot?url=https://example.com&format=png" \ -H "Authorization: Bearer YOUR_API_KEY"
Get your current usage statistics and plan limits.
curl 'https://api.sitegrab.dev/v1/usage' -H 'Authorization: Bearer YOUR_API_KEY'
Create a Stripe Checkout session for subscription signup.
curl -X POST https://api.sitegrab.dev/v1/checkout \
-H "Content-Type: application/json" \
-d '{"tier": "pro"}'
Tiers: starter ($9/mo), pro ($19/mo), business ($49/mo)
Create a new API key. No authentication required for free tier.
curl -X POST https://api.sitegrab.dev/v1/keys -H 'Content-Type: application/json' -d '{"tier": "free"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| tier | string | No | Key tier: free, starter, pro, business (default: free) |
| customer_id | string | No | Optional identifier for your records |
| Tier | Price | Screenshots/mo | Rate Limit |
|---|---|---|---|
| Free | $0 | 50 | 10 req/min |
| Starter | $9/mo | 500 | 60 req/min |
| Pro | $19/mo | 2,000 | 120 req/min |
| Business | $49/mo | 10,000 | 300 req/min |
import requests
API_KEY = "your_api_key_here"
API_URL = "https://api.sitegrab.dev/v1/screenshot"
response = requests.post(API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
json={"url": "https://example.com", "format": "png"}
)
print(response.json())
const API_KEY = "your_api_key_here";
const API_URL = "https://api.sitegrab.dev/v1/screenshot";
const response = await fetch(API_URL, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ url: "https://example.com", format: "png" })
});
const data = await response.json();
console.log(data);
curl -X POST https://api.sitegrab.dev/v1/screenshot \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "png", "full_page": true}'
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
url := "https://api.sitegrab.dev/v1/screenshot"
body := json.encode({"url": "https://example.com", "format": "png"})
req := http.post(url, "application/json", body)
req.headers["Authorization"] = "Bearer your_api_key_here"
resp := req.send()
print(resp.body())
}
require 'net/http'
require 'json'
uri = URI('https://api.sitegrab.dev/v1/screenshot')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri)
request['Authorization'] = 'Bearer your_api_key_here'
request['Content-Type'] = 'application/json'
request.body = {url: 'https://example.com', format: 'png'}.to_json
response = http.request(request)
puts response.body
$apiKey = 'your_api_key_here';
$url = 'https://api.sitegrab.dev/v1/screenshot';
$options = [
'method' => 'POST',
'headers' => [
'Authorization' => 'Bearer ' . $apiKey,
'Content-Type' => 'application/json'
],
'body' => json_encode(['url' => 'https://example.com', 'format' => 'png'])
];
$response = wp_remote_get($url, $options);
echo $response['body'];
| Code | Meaning |
|---|---|
| 200 | Success — screenshot captured and returned |
| 202 | Accepted — request queued (VPS rendering), check back later |
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — missing or invalid API key |
| 429 | Rate limit exceeded — slow down your requests |
| 500 | Server error — try again later |
Rate limits are enforced per API key. Headers included in every response:
X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1702224000
Questions? Issues? Email [R#dnsOg] or check https://sitegrab.dev.