Capture Your Web page with Python Power.

Website screenshot API use case.

Very often webmasters require to obtain webpages screenshots for certain domain and there is a very useful online service for web developers and SEO professionals on "WhoisXML API" that provides Domain & IP Data Intelligence for Greater Enterprise Security and RESTful APIs that we will use.

Using it's APIs you can perform many handy data requests, for example you can get a webpeges screenshots for a certain website - don't forget to get your API KEY. In the following example the simple use of screenshot API is shown, using additional parameters you can change the output image type, size, quality, etc...

Webpage screenshot.

Coding: The Silent Symphony. - Updated: 2024-05-18 by Andrey BRATUS, Senior Data Analyst.

This Python script below will use information from "WhoisXML API" and provide you a result image without the need to use a web browser.
Making websites screenshots can be easily automated now !

Python code to make a Webpage screenshot:

# screenshot of any web page with one API
import requests
from PIL import Image

website = ''

APIKEY ='at_ZUVkrukr4Uhhhsfq2j6dyv2VhFGWYV'
screenshot_request_url = f'{APIKEY}&url={website}&credits=DRS'

r = requests.get(screenshot_request_url)

with open("screenshot_image.jpg", "wb") as f:

print(f'Screenshot for {website} domain. \n')
img ='screenshot_image.jpg')

Making Webpage screenshot output:

page screenshot output.

See also related topics: