get
https://www.virustotal.com/api/v3/urls//screenshot
See URL identifiers from more information about how to generate a valid URL identifier for a URL.
This endpoint returns the rendered screenshot captured by Google TI's browser during the latest analysis.
The response 302 Found redirects to a short-lived (5 minutes) signed URL pointing at the PNG file in Google Cloud Storage. Follow redirects in your HTTP client to retrieve the image bytes.
Examples
Check if a screenshot is available for URL ID "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e".
import requests
id = "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e"
local_filename = "screenshot.png"
url = f"https://www.virustotal.com/api/v3/urls/{id}/screenshot"
headers = {
"accept": "application/json",
"x-apikey": <api-key>
}
response = requests.get(url, headers=headers)
response.raise_for_status()
with open(local_filename, 'wb') as f:
f.write(response.content)
