Welcome to ScreenshotAPI.dev: Your Gateway to Effortless Screenshot Capturing

Mon Nov 13 2023

Introduction

Embrace the power of ScreenshotAPI.dev, a cutting-edge solution designed to seamlessly convert URLs and HTML content into various visual formats, including PNG, PDF, and more. Tailored for versatility, our API is perfect for a range of applications, from creating visual backups of web content to automating the generation of visual reports.

Quick Start

Dive into ScreenshotAPI.dev with ease. Here’s a snapshot of how to initiate your first API request:

Example Request:

GET https://api.screenshotapi.dev/screenshot?url=https://example.com&access_key=<your access key>

Expected Output:

  • A pristine screenshot of the specified website

Register now to receive your unique access key and start your journey with high-quality screenshots.

Request Types

ScreenshotAPI.dev supports both GET and POST HTTP requests to cater to diverse integration needs:

GET Request for a Quick Snapshot:

https://api.screenshotapi.dev/screenshot?[parameters]

Use this for straightforward requests, where you can specify screenshot options in the URL.

POST Request for Custom Needs:

POST https://api.screenshotapi.dev/screenshot
Content-Type: application/json
{
    ...[parameters]
}

Opt for a POST request when your screenshot requirements are more detailed, specifying parameters in the JSON body.

Access Key Management

Include your access key in GET query strings, POST request bodies, or as an X-Access-Key header for flexible authentication.

Dynamic Response Handling

The response from ScreenshotAPI.dev adapts to your specified parameters. Opt for various output formats like PNG or raw HTML.

Effortlessly embed screenshots in your web pages:

<img src="https://api.screenshotapi.dev/screenshot?url=example.com&access_key=<your access key>" alt="Example.com Screenshot">

Error Insights

Encounter an issue? Our API communicates errors transparently, aligning with HTTP status codes and providing detailed JSON responses:

Sample Error Response:

GET https://api.screenshotapi.dev/screenshot?[parameters]

Content-Type: application/json
{
    "error": {
        "code": "unique_error_code",
        "message": "Specific error explanation"
    }
}

Every error comes with a clear message and code, guiding you towards quick resolution.