Get started

Website Screenshot API

Transform any URL into an image with Abstract's Website Screenshot API
Get your free API key
Test it out
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Request

GET https://screenshot.abstractapi.com
?url=https://news.ycombinator.com
&width=1440&height=790&api_key=KndsqhGSD6672dhGS6

Response

Why 10,000+ developers love Abstract's APIs

Easy to implement and maintain

We built Abstract because most of the API's we've used aren't great for developers. That's why Abstract has excellent documentation, multiple easy to use libraries, and tutorials to get you started.

Speed and scale built into everything we do

Our APIs are built to power critical business processes and flows, so all our APIs are built for use at scale and at blazing speeds. These aren't just marketing phrases for, but fundamental features of our APIs.

Reliable uptime and great support

Developers trust Abstract because of our reliable uptime and excellent technical support that will help get you live quickly, keep you running smoothly, and resolve any issues you have fast.

Abstract's Website Screenshot API helps you take reliable, customizable screenshots of any URL

Powerful website to image API

Abstract's Website Screenshot API is designed with the right mix of power and simplicity: making it easy for you to the an image of any site, exactly how you want it, and when you want it.

A simple, fast, and reliable REST API

Abstract's Website Screenshot API is built to industry standards to make it easy for you to implement quickly and then forget it. We handle everything else so you can focus on your business.

Robust image rendering engine

The Website Screenshot API's powerful rendering engine handles anything you can throw at it, from HTML to CSS,  SVG to Webfonts, Graphs, Images, and more.

Highly customizable image options

Get the website screenshot image in any format (PNG, JPEG, etc) as well as sent or stored almost anywhere you like. The Website Screenshot API will adapt to your workflow.

Set view port, dimensions, and more

Get exactly the website screenshot you need with the ability to specify the screenshot's view port and dimensions. Take seamless screenshots for web, tablet, mobile, and more.

Inject custom CSS

Abstract's Website Screenshot API makes it easy to modify the target page by injecting custom CSS into the request. Add your own CSS and get the exact screenshot you want.

Set custom timing and delayed captures

The powerful customization continues, with the ability to add in capture delays and other custom timing to ensure you get the exact screenshot you want of the website.

Bank-level security for all queries

Security is very important to us, so all data that is sent to Abstract's Website Screenshot API and processed by Abstract is secured by 256-bit SSL encryption (HTTPS).

Website Screenshot API Documentation

Overview

Abstract's Website Screenshot API is a simple yet powerful REST API that allows you to request an image of a given URL. It accepts but does not require various customizations on the image capture and rendering, such as setting a capture delay, injecting custom CSS, and specifying the capture's view port.

REST

The Website Screenshot API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URL's and to use HTTP status codes to indicate errors.

HTTPS

The Website Screenshot API requires all communications to be secured TLS 1.2 or greater.

API Versions

All of Abstract's API are versioned. The Website Screenshot API is currently on Version 1.

Your API Key

Your API key is your unique authentication key to be used to access Abstract's Exchange Rate API. Note that each of Abstract's API has a unique API key, so you will need different keys to access the Website Screenshot and VAT Validation and Rates APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.

Base URL

https://webscreenshot.abstractapi.com/v1/

Using the Website Screenshot API

Abstract's Website Screenshot API only has two required parameters for the request, your unique API key and a single email:

https://webscreenshot.abstractapi.com/v1/
    ? api_key = YOUR_API_KEY
    & url = https://www.ft.com

Email Validation API - Request Parameters

PARAMETER

TYPE

DETAILS

api_key required

String

Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your Website Screenshot API key will not work for as your User AvatarAPI key, for example.

url required

String

The URL to get the screenshot of. Note that this parameter should include the full HTTP Protocol (http:// or https://).

capture_full_page

Boolean

If true the request will capture the entire height and width of the page. Defaults to true.

width

Integer

The width in pixels of the view port to use to capture the image.

height

Integer

The height in pixels of the view port to use to capture the image.

delay

Integer

The time in seconds to wait between loading the page and taking the screenshot.

css_injection

String

A CSS string to inject into the website before capturing the image.

user_agent

String

The User Agent to use when capturing the screenshot.

export_format

String

The image format to use for the screenshot. Can be jpeg or png, and defaults to jpeg.

Response and Error Codes

Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.

CODE

TYPE

DETAILS

200

OK

Everything worked as expected.

400

Bad request

Bad request

401

Unauthorized

The request was unacceptable. Typically due to the API key missing or incorrect.

500

Internal Server Error

The request could not be completed due to an error on the server side.

503

Service Unavailable

The server was unavailable.

Frequently Asked Questions
about Abstract's Website Screenshot API

What is the Screenshot API?

Abstract’s Screenshot API is a simple, powerful, and lightweight REST API that takes a URL or raw HTML and returns high quality images in a variety of formats, such as JPEG, PNG, and GIF. We’ve carefully designed the API to be as useful to the casual and novice user as it is to the large team or organization with more complex needs.

How does the Screenshot API work?

Ultimately we’ve built the Screenshot API to optimize for high image resolution as well as the overall speed and reliability of the API itself. To that end we’ve built a powerful proprietary rendering engine specifically for the purpose of converting HTML to an image in just a few seconds.

Does the target website need to be publicly available to use the Screenshot API?

Nope! We also support you sending us the raw HTML rather than the site’s public URL, and we can use that to convert the page to an image or other format for you.

Does the website screenshot API support screenshots from different locations?

This is not supported at the moment, but it's something that's high on our roadmap for the next version. We know that content can change depending on the IP geolocation of the visitor, and we plan to make this configurable so you can get multiple views of a given site.

What is your privacy policy?

We take data security and privacy very seriously. Abstract makes money by charging subscriptions for our API’s, not by selling your data. You can learn more about this by reading our privacy policy. The only way to access your cached screenshots is with your own API key.

What are some common use cases for taking a screenshot of a website or HTML page?

There are tons of use cases for the Screenshot API, both for personal and commercial projects, and both internal-facing as well as for a company’s end users. Some examples of projects requiring a screenshot API include:

  1. Multiple device testing and QA: since our Screenshot API allows you to sent the device type and user agent for the image capture, you can use it to regularly check sites as different devices and browsers to ensure that everything looks like it should.
  2. Regular website snapshots: our Screenshot API can help you capture recurring images of a website and save them to a variety of image formats. For example, does content change depending on the public holidays or the user's IP geolocation? In many cases it does and the Screenshot API can help log that.
  3. Embedded previews of websites: if your product or service allows users to add or edit something on their website, it can be very helpful for conversion if you show those users what that page looks like with your service added.
  4. Web monitoring for SEO backlinks, banner ads, and other such placements: if you provide backlinking or other similar services to your clients, using a web screenshot API to take regular screenshots of those pages is a great way to verify users are getting the value from those links or ads that they have paid for.
  5. Security checks and related flows: if you’re not allowing a user to visit a certain site, image, or email out of security concerns, you could create a safe image of that HTML document with the Screenshot API to give users a preview of it. Just as it is best practice to validate emails and validate phone numbers, so should you visually validate a URL before allowing a user to navigate to it.

These are just a few examples of applications we've seen. However, we really do like to see what unique and creative solutions you can create with the Screenshot API. If you have a creative implementation that you'd like to share with us (and get some free credits in exchange for a mention or case study), then email us at team [at] abstractapi.com.

Developers around the world love Abstract's Screenshot API

We monitor hundreds of thousands of web pages and take screenshots for our core services and our end users. We originally looked at building this in house, but it ended up being incredibly costly and time consuming. Thankfully we found Abstract's Screenshot API that does everything out of the box.

Chris Stanley, Scope

These types of recurring web screenshots were a "nice to have plus" in our roadmap, but we always pushed it back because we really didn't want to maintain something that had to account for load times, user agents, cookie banners, etc. Abstract lets us do all that and delight our users without the cost!

Matt Chapman, Developer

We have pretty through fraud, risk, and compliance needs around maintaining a history of web's evolution by taking screenshots of certain pages at certain intervals. We've been blown away at the level of flexibility and customization that Abstract's Screenshot API gives us to covert HTML to an image,

Michelle Elkins, PayPaper

Website Screenshot API Changelog

Last Updated on 

June 27, 2020

June 27, 2020

 - 

Expanded ability to detect and selectively remove ads

June 26, 2020

 - 

Improved response time on pages with heavy Javascript

GET STARTED

Get 1,000 free credits
per month.

Experience the power of Abstract APIs
with free credits every month.
Get free API key

Frequently Asked Questions
About Subscription & Pricing

What does the API cost?

Each of our API's has a free plan as well as several paid options, which offer a greater number of requests, a higher level of data quality, and greater speed for higher prices. Please see the page above or sign into your account to view pricing for each API.

Do you have a free trial or free options for your API's?

Absolutely! We want you to try before you buy. Each of our API's has a free tier with a generous usage allowance for you to try the product out and verify that the speed and data quality work for you.

What payment options do you offer?

We use Stripe to accept payment via major debit and credit cards (Visa, Mastercard, American Express). If you cannot use those payment methods, then contact us at team at abstractapi.com to arrange for an alternative payment method.

Can I upgrade or downgrade my subscription?

Yes, you can upgrade or downgrade your subscription at any time by visiting your dashboard. If you upgrade in the middle of a billing cycle, you will be charged a pro-rated amount for your new plan through the end of the billing cycle.

Can I cancel at any time?

Yes, all of our subscriptions are month to month. You can cancel at any time, and you will not be charged again at the end of your billing cycle.

How can I cancel my subscription?

You can cancel your subscription at any time from your dashboard. Once canceled, your subscription will be active until the end your current billing cycle, and then it will be automatically moved to the free plan.

What happens if I go over my monthly quota for requests?

If your API usage exceeds the monthly limit set by your plan, then you will be charged a fee for each call over your limit. At the end of your billing period, your usage will reset again.

What if I need more requests or something else that's not offered in your plans?

We do offer enterprise plans with custom features and pricing in limited circumstances. If our public pricing plans don't work for you, then contact us (team at abstractapi.com) and we'll work something out.

Do you offer any discounts?

While we don't normally offer discounts, we do make exceptions for certain types of users and use cases. If you are a student or are engaged in academic work, or are working on a non-profit or open source project, we're happy to offer you discounts for our API's. Just email us at team at abstractapi.com.

Do you offer discounts for annual or quarterly payments?

All of our plans are currently paid month to month. We will be launching annual plans at a discount soon. If you're interested in an annual plan in the meantime, just contact us and we'll set you up.

What happens if my payment method expires?

We will typically attempt to charge your payment method up to three times after it fails. If we're still unable to collect payment, then your subscription will be automatically canceled and you'll be moved to the free plan.

Can I use the API's for a commercial project?

Yes, a paid tier of our API may be used in conjunction with a commercial project. The free tiers of our API's may not be used in commercial projects.