Get a URL analysis 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)

Path Params
string
required

URL analysis ID. Must match the format u-<sha256>-<suffix>. File analyses do not have a screenshot.

Headers
string
required

your API key

Responses
200

200

400

400

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!