[Python] Virustotal API - Get list of All Subdomains

Discussão em 'Python' iniciado por Stack, Maio 15, 2025.

  1. Stack

    Stack Membro Participativo

    I'm looking to get the list of all subdomains of a URL, uisng the Virustotal API

    Running Google.com as an example through their website, I can see that Virustotal registers a total of 3.2k subdomains for Google.com https://www.virustotal.com/gui/domain/google.com/relations -> subdomains screenshot

    Using the API, however, I get a list of only 100 subdomains.

    import vt
    import requests

    url = 'https://www.virustotal.com/vtapi/v2/domain/report'

    params = {'apikey':'MY_API_KEY','domain':'google.com'}

    response = requests.get(url, params=params)

    print(response.json())


    Is there an option to get ALL the subdomains in the response?

    I tried the V2 and V3 API, crosschecked with their online GUI to confirm that my code wasn't return all available output

    Continue reading...

Compartilhe esta Página