API Documentation

Everything you need to capture screenshots programmatically.

1 Quick Start

Get your first screenshot in under a minute.

cURL
curl "https://api.snapforge.techyowls.io/v1/screenshot?url=https://example.com" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output screenshot.png

That's it! The API returns a PNG image by default.

Base URL

https://api.snapforge.techyowls.io

All API endpoints are relative to this base URL.

2 Authentication

All requests require an API key sent via the Authorization header.

Header Format
Authorization: Bearer sk_live_xxxxxxxxxxxxx

API keys coming soon! Sign up to get notified when we launch.

Take Screenshot

GET /v1/screenshot

Captures a screenshot of the specified URL and returns it as an image or JSON response.

Parameters

Parameter Type Default Description
url* string - URL to capture (must be valid HTTP/HTTPS)
format string png Output format: png, jpeg, webp
width integer 1280 Viewport width (320-3840)
height integer 800 Viewport height (320-2160)
full_page boolean false Capture entire scrollable page
delay integer 0 Wait ms before capture (0-10000)
quality integer 80 JPEG/WebP quality (1-100)
response_type string binary binary (image) or json (base64 data URL)

* Required parameter

Response

Binary Response (default)

Returns the image directly with appropriate Content-Type header.

Headers
Content-Type: image/png
[binary image data]

JSON Response

When response_type=json, returns a base64-encoded data URL.

JSON Response
{
  "data_url": "data:image/png;base64,iVBORw0KGgo...",
  "format": "png",
  "width": 1280,
  "height": 720
}

Error Codes

All errors follow a consistent JSON format:

Error Response
{
  "error": {
    "code": "INVALID_URL",
    "message": "The provided URL is not valid"
  },
  "request_id": "req_abc123"
}
Code HTTP Description
UNAUTHORIZED 401 Invalid or missing API key
RATE_LIMITED 429 Too many requests
INVALID_URL 400 URL is not valid or blocked
INVALID_PARAMS 400 Parameter validation failed
TIMEOUT 408 Screenshot took too long
SCREENSHOT_FAILED 500 Failed to capture screenshot

Rate Limits

Plan Requests/min Concurrent
Free 10 2
Pro 60 10
Enterprise 120 20

Rate Limit Headers

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1701620400

Code Examples

cURL

Basic Screenshot
curl "https://api.snapforge.techyowls.io/v1/screenshot?url=https://github.com" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output github.png

JavaScript (Node.js)

Node.js
const response = await fetch(
  'https://api.snapforge.techyowls.io/v1/screenshot?url=https://github.com',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const buffer = await response.arrayBuffer();
fs.writeFileSync('screenshot.png', Buffer.from(buffer));

Python

Python (requests)
import requests

response = requests.get(
    'https://api.snapforge.techyowls.io/v1/screenshot',
    params={'url': 'https://github.com'},
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)

with open('screenshot.png', 'wb') as f:
    f.write(response.content)

Full Page Mobile Screenshot

cURL with options
curl "https://api.snapforge.techyowls.io/v1/screenshot?\
url=https://github.com&\
width=375&\
height=667&\
full_page=true&\
format=jpeg&\
quality=90" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --output mobile-full.jpg

Best Practices

Use appropriate viewport sizes

Desktop: 1280x800 | Mobile: 375x667 | Tablet: 768x1024 | Social OG: 1200x630

Add delay for dynamic content

For SPAs or pages with JavaScript animations, use delay=2000 to wait for content to load.

Handle errors gracefully

Check for rate limit headers and implement exponential backoff when you receive 429 errors.

Ready to get started?

Get your API key and start capturing screenshots in seconds.

Get API Key