API Documentation

Complete reference for the ShotAPI screenshot API. Capture pixel-perfect screenshots with a simple HTTP request.

Quick Start

The simplest way to capture a screenshot is with a GET request:

curl "https://api.shotapi.io/screenshot?url=https://example.com&access_key=YOUR_KEY"

Authentication

ShotAPI supports four authentication methods. Choose the one that works best for your use case:

1. Query Parameter: access_key

https://api.shotapi.io/screenshot?url=example.com&access_key=YOUR_KEY

2. Query Parameter: api_key

https://api.shotapi.io/screenshot?url=example.com&api_key=YOUR_KEY

3. Authorization Header: Bearer

curl -H "Authorization: Bearer YOUR_KEY" \
  "https://api.shotapi.io/screenshot?url=example.com"

4. Custom Header: X-Api-Key

curl -H "X-Api-Key: YOUR_KEY" \
  "https://api.shotapi.io/screenshot?url=example.com"

Parameters

All parameters are passed as query parameters in the URL.

Parameter Type Default Description
url * string - Target URL to screenshot
format string png Output format: png, jpeg, webp, pdf
viewport_width number 1280 Viewport width in pixels
viewport_height number 1024 Viewport height in pixels
device_scale_factor number 1 Device pixel ratio (1-3)
full_page boolean false Capture full scrollable page
selector string - CSS selector to screenshot specific element
image_quality number 80 JPEG/WebP quality (0-100)
delay number 0 Wait time in milliseconds before capture
dark_mode boolean false Enable dark mode preference
block_ads boolean false Block ads and trackers
block_cookie_banners boolean false Hide cookie consent banners

Response

Content Types

Format Content-Type
png image/png
jpeg image/jpeg
webp image/webp
pdf application/pdf

Response Headers

X-RateLimit-Limit - Your total daily quota

X-RateLimit-Remaining - Remaining requests today

X-RateLimit-Reset - Unix timestamp when quota resets

Error Codes

Status 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

Rate Limits

Rate limits reset daily at midnight UTC. Limits are per API key.

Plan Price Daily Limit
Anonymous Free 10 requests/day
Free $0 100 requests/day
Starter $9/month 2,500 requests/day
Pro $29/month 10,000 requests/day

Code Examples

cURL

# Basic screenshot
curl "https://api.shotapi.io/screenshot?url=https://example.com&access_key=YOUR_KEY" \
  -o screenshot.png

# Full page with custom viewport
curl "https://api.shotapi.io/screenshot?url=https://example.com&access_key=YOUR_KEY&full_page=true&viewport_width=1920" \
  -o screenshot.png

# Screenshot specific element
curl "https://api.shotapi.io/screenshot?url=https://example.com&access_key=YOUR_KEY&selector=.hero-section" \
  -o screenshot.png

Node.js (fetch)

const fs = require('fs');

const API_KEY = 'YOUR_KEY';
const url = 'https://example.com';

const response = await fetch(
  `https://api.shotapi.io/screenshot?url=$encodeURIComponent(url)&format=png`,
  
    headers: 
      'Authorization': `Bearer $API_KEY`
    
  
);

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

Python (requests)

import requests

API_KEY = 'YOUR_KEY'
url = 'https://example.com'

response = requests.get(
    f'https://api.shotapi.io/screenshot',
    params=
        'url': url,
        'format': 'png',
        'full_page': 'true'
    ,
    headers=
        'Authorization': f'Bearer API_KEY'
    
)

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

Need help or have questions? Check out our guides or reach out through the dashboard.