Screenshots API

Last modified: October 20, 2021Author: Jakub Pomykała

This endpoint allows you to take a screenshot of any website. Screenshot image will be automatically uploaded to S3 bucket, and you will receive link which could be used anywhere.

POST Endpoint

https://api.bannerly.io/api/v1/screenshots

Example request

curl 
    --location 
    --request POST 'https://api.bannerly.io/api/v1/screenshots' \
    --header 'X-API-KEY: <API_KEY>' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "url": "https://bannerly.io"
        "width": 1366,
        "height": 768,
    }'

Request body

  • url (required) - website URL of which Bannerly should take a screenshot
  • height (required) - screenshot height
  • width (required) - screenshot width,
  • expires (optional) - add expiration time in seconds for the image, available values from 1 to 604800
  • waitTime (optional) - add wait time in milliseconds before taking a screenshot, available values from 500 to 5000
  • webhookUrl (optional) - send response to the given webhookUrl as POST request

Example response

{
  "requestId": "ed39c85ac41f4c54b95e4caaad4ebff8",
  "href": "https://cdn.bannerly.io/.../image.png",
  "request": {
    "width": 1366,
    "height": 768,
    "url": "https://bannerly.io"
  }
}