How do I create a screenshot via API?

POST

You can create a screenshot by sending a POST request to /screenshots with a website URL, and a height and width.

GET 

You can poll the GET request to the /screenshots/:uid endpoint for status updates and retrieve the Screenshot object referenced by its uid.

Using Webhooks

A webhook allows you to be notified when the screenshot is rendered. Use the webhook_url parameter to tell Bannerbear where to POST the full Screenshot object, once the rendering is completed. The screenshot object will be posted to your webhook as JSON.

Using a synchronous request

As an alternative to polling the GET endpoint or using webhooks, you can generate screenshots synchronously. This is where your API request is held open until the media file has finished generating. The API will then respond with the completed screenshot object. To make a synchronous request, use the synchronous base URL ( https://sync.api.bannerbear.com ). The API required attributes / parameters function the same as normal.

Check the API Reference ↗ page for more information on this.

Need Help?

Contact us anytime

Customer Support