get
https://www.virustotal.com/api/v3/urls//dom_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 DOM captured during the latest URL analysis, wrapped in a JSON response:
{
"data": "https://vturlscreenshot.commondatastorage.googleapis.com/u-af2c53e..."
}Use this endpoint instead of GET /urls/{id}/dom when you need the link itself rather than the HTML bytes.
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 HTML file.
Examples
Get the DOM for URL ID "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e".
import requests
id = "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e"
url = f"https://www.virustotal.com/api/v3/urls/{id}/dom_url"
headers = {
"accept": "application/json",
"x-apikey": <api-key>
}
response = requests.get(url, headers=headers)