get
https://www.virustotal.com/api/v3/threat_profiles//download/
Use this endpoint to export Indicators of Compromise (IoCs) associated with all Recommendations in a certain Threat Profile. Supported formats include JSON, CSV, and STIX.
Note that if the
/formatparameter is omitted, this endpoint defaults to JSON.
Please note that this endpoint only supports exports under 32 MB. For larger exports, use this endpoint instead.
Examples
Get 10 IoCs of each type that are associated with recommendations in my threat profile, in JSON format.
import requests
id = "dc2f47a9baa2460089cdd78f7339b19c"
limit = 10
url = f"https://www.virustotal.com/api/v3/threat_profiles/{id}/download?limit={limit}"
headers = {"x-apikey": <api-key>,"accept": "application/json"}
response = requests.get(url, headers=headers)Get all IoCs that are associated with recommendations in my threat profile, in CSV format.
import requests
id = "dc2f47a9baa2460089cdd78f7339b19c"
format = "csv"
url = f"https://www.virustotal.com/api/v3/threat_profiles/{id}/download/{format}"
headers = {"x-apikey": <api-key>,"accept": "application/json"}
response = requests.get(url, headers=headers) 200200
