Overview
Screenshotlayer is a web service that offers a REST API for capturing screenshots of websites. Developers can integrate this API into their applications to programmatically generate images of web pages, ranging from full-page captures to specific viewport sizes. The service aims to simplify the process of converting live web content into static images, abstracting away the complexities of browser automation and rendering.
The API is designed for a variety of use cases, including creating visual archives of web pages, generating website thumbnails for directories or search results, and monitoring visual changes on websites over time. For instance, a content management system could use Screenshotlayer to automatically create a preview image whenever a new URL is added. Similarly, an analytics platform might capture daily screenshots of client websites to track design updates or content shifts.
Developers interact with Screenshotlayer by sending HTTP GET requests to a specific endpoint, including parameters for the target URL, access key, and various screenshot options. These options allow for granular control over the output, such as specifying the image format (JPG, PNG), quality, viewport width and height, and a delay before the screenshot is taken to allow page content to load fully. This flexibility makes it suitable for handling dynamic web content rendered by JavaScript frameworks.
The service handles the underlying browser rendering engine, providing a consistent output across different requests without requiring developers to manage headless browsers or complex rendering environments. This can be particularly beneficial for applications requiring large-scale screenshot generation, where managing individual browser instances would be resource-intensive. For example, a web crawler indexing millions of pages might use Screenshotlayer to generate a visual snapshot for each indexed page without incurring significant server overhead for browser automation.
Screenshotlayer was founded in 2017 and is part of the apilayer suite of APIs. It offers a free tier for initial testing and development, with paid plans scaling based on the volume of API requests. The API's documentation provides examples in multiple programming languages, facilitating integration into diverse development environments.
Key features
- Full-page and viewport captures: Capture either the entire scrollable content of a webpage or a specific area defined by viewport width and height.
- Customizable image output: Specify image format (JPG, PNG), quality, and even introduce a delay before capture to ensure dynamic content loads.
- URL-to-image conversion: Convert any publicly accessible URL into an image file via a simple API call.
- HTTP/HTTPS support: Securely capture screenshots from both HTTP and HTTPS websites.
- Authentication options: Basic HTTP authentication can be passed for accessing pages behind a login.
- Callback URL functionality: Define a URL to which Screenshotlayer can send a notification once a screenshot has been processed and is ready. This is useful for asynchronous processing.
- Error handling: The API returns specific error codes and messages to help developers diagnose issues with requests or target URLs.
Pricing
Screenshotlayer offers a free tier and various paid plans structured around API request volumes. Pricing is subject to change; developers should consult the official Screenshotlayer pricing page for the most current details.
| Plan | Monthly Requests | Price (USD/month) | Key Features |
|---|---|---|---|
| Free | 250 | $0 | Basic API access, standard features |
| Basic | 3,000 | $9.99 | Increased request volume, priority support |
| Professional | 15,000 | $29.99 | Higher request volume, advanced rendering options (if available) |
| Business | 75,000 | $99.99 | Significant request volume, dedicated support |
| Enterprise | Custom | Custom | High volume, custom features, dedicated infrastructure |
Pricing as of 2026-05-28.
Common integrations
Screenshotlayer is a standalone API, but it can be integrated into various systems and workflows:
- Web archiving solutions: Used to periodically capture visual snapshots of web pages for historical records or compliance.
- Content management systems (CMS): Automatically generate preview images for articles, blog posts, or external links.
- SEO tools: Create visual representations of competitor websites or search result pages.
- Monitoring and analytics platforms: Track visual changes on client or competitor websites over time.
- Custom web applications: Integrate screenshot functionality directly into bespoke applications requiring visual representation of URLs.
- Workflow automation platforms: Connect with services like Tray.io or Zapier to automate screenshot generation as part of larger business processes, such as generating reports with visual proof.
Alternatives
- ApiFlash: Offers a screenshot API with features like full-page capture, custom resolutions, and ad blocking capabilities.
- ScreenshotAPI.net: Provides a screenshot API for capturing web pages, supporting custom viewports, delays, and various output formats.
- Browserless: Offers a service for running headless Chrome/Puppeteer in the cloud, allowing for custom screenshot automation and broader browser interactions. In contrast to direct screenshot APIs, Browserless offers more granular control over the browser session itself, enabling complex interactions beyond simple page captures, as detailed in their Browserless examples on GitHub.
Getting started
To begin using Screenshotlayer, you first need to obtain an API access key from their documentation. Once you have your key, you can make a simple HTTP GET request to their API endpoint, providing the URL you wish to screenshot and your access key. The API will return the screenshot as an image file.
Here's an example in Python using the requests library:
import requests
ACCESS_KEY = 'YOUR_ACCESS_KEY'
TARGET_URL = 'https://apispine.com'
api_url = f"http://api.screenshotlayer.com/api/capture?access_key={ACCESS_KEY}&url={TARGET_URL}&fullpage=1"
try:
response = requests.get(api_url, stream=True)
response.raise_for_status() # Raise an exception for HTTP errors
# Save the screenshot to a file
with open('apispine_screenshot.png', 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print(f"Screenshot of {TARGET_URL} saved as apispine_screenshot.png")
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
if response is not None:
print(f"Response content: {response.text}")
This Python script fetches a full-page screenshot of https://apispine.com and saves it as apispine_screenshot.png. Remember to replace 'YOUR_ACCESS_KEY' with your actual API key.
Additional parameters can be added to the API request URL to customize the screenshot. For instance, to specify a particular width and height for the viewport, or to set a delay before the capture, you would include parameters like &viewport=1280x800 or &delay=3. The Screenshotlayer API documentation provides a comprehensive list of available parameters and their usage, along with further code examples in other languages such as PHP, Node.js, and cURL.