With the Screenshot API, you can easily capture website screenshots and upload the images directly to your AWS S3 bucket. Automating the process of taking large volumes of screenshots from multiple URLs, sitemaps, text files, or an entire domain has never been easier. With just a single Screenshot API call, you can save time and hassle by having all your screenshots automatically uploaded to your S3 bucket. This streamlined process will help you stay organized and keep all your website screenshots in one easily accessible location. Plus, with AWS S3, you can rest assured that your screenshots will be stored securely and available whenever you need them. Capture website screenshots and upload them to your AWS S3 bucket effortlessly with the Screenshot API.
Parameter | Required | Description |
---|---|---|
s3 | Required |
The name of the bucket Write objects access must be granted to the Add Screenshots AWS account in order to upload screenshots List object access (optional) is required if you'd like to compare screenshots and track screenshot changes over time Canonical ID: e40d2ee9bcddcfe78812400f4d034ef88c80a2a18b0095a7f1cbcf542d391a2c |
public | Optional |
Add the "public-read" (see AWS ACL permissions) to the image
The default is false (no public access) |
metadata | Optional | Add descriptive metadata properties to the screenshot |
file | Optional |
The name or pattern for the file without the extension The default is a unique identifier (see pattern examples) |
folder | Optional | The folder name or pattern for the file (see pattern examples) |
html | Optional | When set to true, the HTML markup will be uploaded too |
Write objects access is required to allow the Add Screenshots account to upload screenshots to your S3 bucket.
List objects access is required to read images when using the screenshot comparison feature to track changes over time.
It is easy to revoke access at any time too.
The example below shows how to take a real-time website screenshot and store the image in an S3 bucket "my-demo-screenshots" in the "images" folder with the file name "website.png". The optional &html=true parameter will upload the "website.html" file to the S3 bucket as well.
// Line breaks added for readability
https://api.addscreenshots.com/screenshots
?apikey=YOUR_API_KEY
&s3=my-demo-screenshots
&folder=images
&file=website
&html=true
&url=https://www.youtube.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.
The API response will include a link to the screenshot in your S3 bucket as shown below:
{ "success": true, "message": "Screenshots completed.", "storage_provider": "s3", "images": [ { "file": "website.png", "request_url": "youtube.com", "page_url": "https://www.youtube.com/", "image_url": "https://my-demo-screenshots.s3.amazonaws.com/images/website.png", "html_url": "https://my-demo-screenshots.s3.amazonaws.com/images/website.html", "size": 1622727 } ] }
The example below shows how to take multiple screenshots using a POST request and upload the images to an S3 bucket
"my-demo-screenshots", where the screenshots are stored in the folder {domain}
(pattern) with the filename {filepath}
(pattern).
POST https://api.addscreenshots.com/screenshots/bulk/multi?apikey=YOUR_API_KEY { "urls": [ "https://www.apple.com/ipad/", "https://www.apple.com/iphone/", "https://www.apple.com/watch/", "https://www.bbc.com/news/world", "https://www.bbc.com/news/technology", "https://www.tomshardware.com/news/raspberry-pi", "https://www.tomshardware.com/best-picks" ], "s3": "my-demo-screenshots", "file": "{filepath}", "folder": "{domain}", "quality": "80" }
The API response will include the number of screenshots as shown below:
{ "message": "The screenshots are being processed.", "jobId": "536b69dbefa240d493330ae5de1c0d46", "screenshots": 7 }
Look for the Job ID on the Usage Logs page to track the request.
The folders and file names as they appear in S3 storage:
Additional metadata will be written to the screenshot image when the "metadata" parameter is set to true.
To view the metadata, click on the image in the S3 bucket, click on the "Properties" tab and select "Metadata" as shown below.
The metadata may contain information such as:
When the "public" access option is set to true then anyone can access the screenshot from your S3 bucket if they know the URL.
The "Block all public access" permission must be set to Off when using the public=true parameter to avoid an "Access Denied" error.