Clearshot API screenshot tool

How to take URL screenshots with Python

using python to capture screenshots

Taking a screenshot of a website/URL using Python is simple. You can make the request in the Clearshot screenshot API using the Python “requests” module. 

In the headers, you pass through your Clearshot access token, and set the content type for the relevant response type you want to receive. In the example below, we want a json response. Passing the URL and the json parameter in the body payload will take a screenshot of the URL and return a json formatted response containing the screenshot resource and any other relevant information. 

For further documentation, parameters and error codes, you can check out the full documentation here

					import requests
import json

headers = {
  "Authorization": "Bearer [-- YOUR ACCESS TOKEN HERE --]",
  "Accept": "application/json"
payload = {
  "url": "",
  "json": "true"

url = ''

response =, headers = headers, params = {}, data = json.dumps(payload))

Ready to get started?
Share on whatsapp
Share on email
Share on linkedin
Share on facebook
Share on twitter