man screenshot-api

Capture screenshots of any website with a simple POST request.

Quick Start

Get started in under 60 seconds:

  1. Sign up for a free account
  2. Copy your API key from the dashboard
  3. Make your first request:
$ curl -X POST https://your-domain.com/api/screenshot \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}' \ -o screenshot.png

Authentication

Include your API key in the request headers:

X-API-Key: your_api_key_here

Security

  • Never expose your API key in client-side code
  • Store keys in environment variables
  • Regenerate if compromised

Endpoints

POST /api/screenshot

POST /api/screenshot

Capture a screenshot. Returns binary image data.

GET /api/screenshot

GET /api/screenshot?url=https://example.com

Alternative for simple requests. Useful for embedding in img tags.

Request Parameters

Param Type Default Description
url string required URL to capture
width int 1920 Viewport width (100-3840)
height int 1080 Viewport height (100-2160)
fullPage bool false Capture entire scrollable page
format string png Output format (png, jpeg)
quality int 90 JPEG quality (1-100)

Example Request

{ "url": "https://example.com", "width": 1920, "height": 1080, "fullPage": false, "format": "png" }

Responses

Success

200 Returns binary image data.

Response Headers

Content-Type: image/png Content-Length: 245678 X-RateLimit-Remaining: 98 X-RateLimit-Reset: 1640995200

Error Codes

400 Bad Request

Invalid parameters or malformed URL.

401 Unauthorized

Missing or invalid API key.

403 Forbidden

Subscription inactive or payment failed.

429 Too Many Requests

Monthly limit reached or rate limit exceeded.

500 Server Error

Screenshot capture failed.

Code Examples

curl

$ curl -X POST https://your-domain.com/api/screenshot \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "fullPage": true}' \ -o screenshot.png

Node.js

const res = await fetch('https://your-domain.com/api/screenshot', { method: 'POST', headers: { 'X-API-Key': process.env.SCREENSHOT_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ url: 'https://example.com' }) }); const buffer = await res.arrayBuffer(); fs.writeFileSync('screenshot.png', Buffer.from(buffer));

Python

import requests import os response = requests.post( 'https://your-domain.com/api/screenshot', headers={'X-API-Key': os.environ['SCREENSHOT_API_KEY']}, json={'url': 'https://example.com'} ) with open('screenshot.png', 'wb') as f: f.write(response.content)

Rate Limits

Plan Monthly Per Second
Free 100 1
Starter 5,000 2
Pro 25,000 5
Business 100,000 10

Rate Limit Headers

  • X-RateLimit-Remaining — screenshots left this month
  • X-RateLimit-Reset — Unix timestamp when limit resets