get
https://www.virustotal.com/api/v3/urls//screenshot_url
See URL identifiers from more information about how to generate a valid URL identifier for a URL.
This endpoint returns the short-lived signed URL of the PNG screenshot captured during the latest URL analysis, wrapped in a JSON response:
{
"data": "https://vturlscreenshot.commondatastorage.googleapis.com/u-af2c53e..."
}Use this endpoint if you only need the screenshot link. If you prefer to stream the image bytes directly, GET /urls/{id}/screenshot
Note that the signed URL is valid for 5 minutes. If the link expires, you must request the endpoint again to generate a new one. The underlying asset is an image/png file.
Examples
Check if a screenshot is available for URL ID "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e".
import requests
id = "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e"
url = f"https://www.virustotal.com/api/v3/urls/{id}/screenshot_url"
headers = {
"accept": "application/json",
"x-apikey": <api-key>
}
response = requests.get(url, headers=headers)
