Screenshot Endpoint

POST /screenshot

Capture a screenshot of any URL. Returns the image binary data in the requested format.

Request

Headers

Header Required Description
X-API-Key Yes Your API key
Content-Type Yes Must be application/json

Body

JSON object with the following properties:

{
  "url": "https://example.com",
  "format": "png",
  "quality": 80,
  "fullPage": false,
  "device": "desktop",
  "width": 1920,
  "height": 1080,
  "scale": 1,
  "hideCookieBanners": true,
  "hidePopups": false,
  "blockAds": false,
  "blockRequests": []
}

See Parameters for detailed descriptions of each option.

Response

Success (200 OK)

Returns the screenshot as binary data with the appropriate content type:

  • image/png for PNG format
  • image/jpeg for JPEG format
  • image/webp for WebP format
  • application/pdf for PDF format

Response Headers

Header Description
X-RateLimit-Limit Requests allowed per window
X-RateLimit-Remaining Requests remaining in window
X-RateLimit-Reset Unix timestamp when window resets
X-Quota-Limit Monthly screenshot quota
X-Quota-Remaining Screenshots remaining this month
X-Quota-Reset Unix timestamp when quota resets

Example

curl -X POST "https://api.shotone.io/screenshot" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://github.com",
    "format": "png",
    "fullPage": true,
    "device": "desktop"
  }' \
  --output screenshot.png

Error Responses

See Error Codes for a complete list of error responses.