ScreenXshot

  • Documentation
  • Pricing
Getting Started

Getting Started

Quick start guide for the ScreenXshot API

First Glance with ScreenXshot API

Welcome to the ScreenXshot API! This guide will help you get up and running quickly with our API service.

Prerequisites

  • An API key (obtain this from your dashboard)
  • Any HTTP client (cURL, Postman, or your preferred programming language)

Quick Start

1. Authentication

First, make sure you have your API key. You'll need to include this in every request as a query parameter:

http GET /api/screenshot?apiKey=your_api_key

2. Your First Screenshot

Here's a minimal example to capture your first screenshot:

http GET /api/screenshot?url=https://example.com&outputType=png&apiKey=your_api_key

This will return a PNG image of the specified webpage.

3. Token System

Each successful API request consumes one token from your account. Make sure to:

  • Monitor your token usage in the dashboard
  • Set up alerts for low token balance
  • Purchase additional tokens before running out

Next Steps

Explore these resources to make the most of the API:

API Parameters

Usage Examples

API Overview

Code Examples

JavaScript/Node.js

const response = await fetch(
  'https://api.example.com/api/screenshot?' + 
  new URLSearchParams({
    url: 'https://example.com',
    outputType: 'png',
    apiKey: 'your_api_key'
  })
);
 
const screenshot = await response.blob();

Python

import requests
 
params = {
    'url': 'https://example.com',
    'outputType': 'png',
    'apiKey': 'your_api_key'
}
 
response = requests.get('https://api.example.com/api/screenshot', params=params)
screenshot = response.content

cURL

curl "https://api.example.com/api/screenshot?url=https://example.com&outputType=png&apiKey=your_api_key" \
  --output screenshot.png

Common Use Cases

  • Website monitoring
  • Automated testing
  • Content archiving
  • Social media previews
  • PDF generation

For more detailed examples, check out our examples page which shows how to use advanced features like watermarking, viewport customization, and geolocation spoofing.

Next

Overview

On this page

First Glance with ScreenXshot APIPrerequisitesQuick Start1. Authentication2. Your First Screenshot3. Token SystemNext StepsCode ExamplesJavaScript/Node.jsPythoncURLCommon Use Cases