ScreenshotAPI

Introduction

ScreenshotAPI is a fast, reliable API for capturing web page screenshots on demand. Get started in under a minute.

What is ScreenshotAPI?

ScreenshotAPI lets you capture pixel-perfect screenshots of any web page with a single HTTP request. Send a URL, get back an image — PNG, JPEG, or WebP. It's built for developers who need programmatic screenshot generation for OG images, thumbnails, visual regression testing, archival, and more.

Key features:

  • Simple REST API — One GET endpoint. Pass a URL, receive an image.
  • Multiple formats — PNG, JPEG, and WebP with configurable quality.
  • Full-page captures — Scroll the entire page or capture the viewport.
  • Dark mode support — Force prefers-color-scheme: dark on any page.
  • Smart waiting — Wait for network idle, specific selectors, or custom delays.
  • Credit-based pricing — Pay only for what you use. No monthly subscriptions.
  • Auto top-up — Never run out of credits with automatic replenishment.

Quick Start

Create an account

Sign up at screenshotapi.to/sign-up. You'll receive 5 free credits to start.

Generate an API key

Navigate to your dashboard and create a new API key. Copy it — you'll only see the full key once.

Take your first screenshot

curl "https://screenshotapi.to/api/v1/screenshot?url=https://example.com" \
  -H "x-api-key: sk_live_your_key_here" \
  --output screenshot.png
const response = await fetch(
  'https://screenshotapi.to/api/v1/screenshot?url=https://example.com',
  {
    headers: { 'x-api-key': 'sk_live_your_key_here' }
  }
)

const imageBuffer = await response.arrayBuffer()
import requests

response = requests.get(
    "https://screenshotapi.to/api/v1/screenshot",
    params={"url": "https://example.com"},
    headers={"x-api-key": "sk_live_your_key_here"}
)

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

Each successful screenshot request consumes 1 credit. Failed requests are not charged.

How It Works

  1. You send a GET request to /api/v1/screenshot with the target URL and optional parameters.
  2. ScreenshotAPI launches a headless Chromium browser, navigates to the URL, and waits for the page to load.
  3. A screenshot is captured with your specified dimensions, format, and rendering options.
  4. The binary image data is returned directly in the response body.

Screenshots are generated in real time and are not stored on our servers. The image is streamed back to you, and no copy is retained.

Response Headers

Every successful response includes useful metadata:

HeaderDescription
Content-TypeImage MIME type (image/png, image/jpeg, or image/webp)
x-credits-remainingYour remaining credit balance after this request
x-screenshot-idUnique identifier for this screenshot (useful for support)
x-duration-msTime taken to generate the screenshot in milliseconds

Next Steps

  • Authentication — Learn how to create and manage API keys
  • Credits — Understand the credit system and pricing
  • Screenshot API — Full parameter reference for the screenshot endpoint
  • JavaScript SDK — Use the typed JavaScript/TypeScript client

On this page