get
https://www.virustotal.com/api/v3/analyses//screenshot
This endpoint returns the rendered screenshot captured by Google TI's browser at the end of a URL 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 Analysis ID "u-109b1fe44b83bfdeaeee0d238e041915b6d71f6ce4b91f8f9ad79eac3ac7d27f-6d2fb381".
import requests
id = "u-109b1fe44b83bfdeaeee0d238e041915b6d71f6ce4b91f8f9ad79eac3ac7d27f-6d2fb381"
local_filename = "screenshot.png"
url = f"https://www.virustotal.com/api/v3/analyses/{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) 200200
400400
