Get a URL's latest analysis DOM

📘

See URL identifiers from more information about how to generate a valid URL identifier for a URL.

This endpoint returns the rendered DOM that the browser captured during the latest analysis.

The response 302 Found redirects to a short-lived (5 minutes) signed URL pointing at the HTML artifact in Google Cloud Storage. Follow redirects to download the file.

Examples

Get the DOM for URL ID "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e".

import requests

id = "c9d09bb06e6b480d98faca5b84f6b87fdb2bafe2cd91b1957ee0a1ee56c6628e"
local_filename = "dom.html"
url = f"https://www.virustotal.com/api/v3/urls/{id}/dom"

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 ID

Headers
string
required

Your API key

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json