Capture and receive full-page website screenshots in JSON format with base64 encoding. This method is highly efficient for integrating with various APIs and automation tools, providing a seamless way to include screenshot data in your workflows.
Utilizing JSON for screenshot data is beneficial when working with tools such as Microsoft Power Automate and Zapier. This format facilitates easier manipulation and integration of image data in automated processes.
For instance, Add Screenshot's demo on our home page showcases how JSON responses are used to dynamically display screenshots, making it a versatile option for developers and businesses.
Full-page screenshots provide a complete view of a website's appearance, capturing everything visible without truncation. Here are a few reasons why full-page screenshots in JSON format are advantageous:
Full-page screenshots can be invaluable in various scenarios:
The following example demonstrates how to request a full-page PNG screenshot and receive it encoded in base64 format within a JSON response:
// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=YOUR_API_KEY
&json=true
&url=example.com
Your API key can be found on the API Keys page. Need an API Key? Sign up to get started.
For internal applications, replace YOUR_API_KEY with your own unique API Key.
For public facing websites or hotlinks, generate a signed URL.
Sample JSON response for a PNG image:
{ "image": "data:image/png;base64,iVBORw0KGgoAAA..." }
Similarly, you can request a full-page JPEG screenshot and receive it in base64 encoded JSON format:
// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=YOUR_API_KEY
&format=jpeg
&json=true
&url=example.com
Your API key can be found on the API Keys page. Need an API Key? Sign up to get started.
For internal applications, replace YOUR_API_KEY with your own unique API Key.
For public facing websites or hotlinks, generate a signed URL.
Sample JSON response for a JPEG image:
{ "image": "data:image/jpeg;base64,/9j/4AAQSkZJ..." }
Here's a code snippet that shows how to use jQuery to request a full-page screenshot and dynamically update an image element with the ID "imgscreenshot":
$.ajax({
dataType: "json",
url: https://api.addscreenshots.com/screenshots?apikey=YOUR_API_KEY&json=true&url=example.com
})
.done(function (response) {
$("#imgscreenshot").attr("src", response.image);
}