Webhooks are an excellent way to automate workflow and send website screenshots to your web apps automatically. With the Screenshot API, you can easily send a base64 encoded screenshot to your own custom REST API webhook, Microsoft Flow, Power Automate & Azure Functions, Zapier and many more.
Automating the process of taking large volumes of screenshots from multiple URLs, sitemaps, text files or an entire domain, and notifying your webhook can be achieved with a single Screenshot API call. This saves you time and streamlines the process, making it easier to stay organized and keep all your screenshots in one place.
Integrate your web apps with the Screenshot API today and start sending website screenshots to your webhook endpoint automatically!
{ "file": "website.png", "image": "data:image/png;base64,iVBORw0KGgoAAA...", "html": "data:text/html;base64,iVBORw0KGgoAAA...", "mimetype": "image/png", "metadata": { "request_url": "youtube.com", "page_url": "https://www.youtube.com/", "size": 1622727 } }
Parameter | Required | Description |
---|---|---|
webhook | Required | The URL to the webbhook end point. For example: https://demo.example.com/screenshot |
webhookheaders | Optional | Include optional headers to the webhook such as an authentication token. |
metadata | Optional | Add descriptive metadata properties to webhook body |
file | Optional | The name or pattern for the file without the extension The default is a unique identifier (see pattern examples) |
html | Optional | When set to true, a "html" property will be included in the webhook request with the base64 encoded HTML markup |
The example below shows how to take a real-time website screenshot and send the image (base64 encoded) to a webhook with the file name "website.png".
// Line breaks added for readability https://api.addscreenshots.com/screenshots
?apikey=YOUR_API_KEY
&file=website
&html=false
&url=youtube.com
&webhook=https://example.com/api/webhook
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 the path of the image on your FTP server as shown below:
{ "success": true, "message": "Screenshots completed.", "storage_provider": "webhook", "images": [ { "file": "website.png", "request_url": "youtube.com", "page_url": "https://www.youtube.com/", "size": 1622727 } ] }
The example below shows how to take multiple screenshots using a POST request and call a webhook with custom headers for each image using 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" ], "webhook": "https://example.com/api/webhook", "webhookheaders": { "my-header": "my value", "my-second-header": "my second value" }, "metadata": true, "html": false, "file": "{filepath}", "quality": "80" }
The API response will include the number of screenshots as shown below:
{ "message": "The screenshots are being processed.", "jobId": "536b69dbefa240d493330ae5de1c0d47", "screenshots": 7 }
Look for the Job ID on the Usage Logs page to track the request.
Additional metadata will be included in the screenshot event when the "metadata" parameter is set to true.
The metadata may contain information such as: