Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Public (free) API: 4 requests per minute and 500 per day, and it must not be used in commercial products or services or in business workflows that do not contribute new files. Premium keys lift both.
- Everything you submit or query joins the VirusTotal dataset, visible to its community and partners: never send sensitive or personal data (private URLs with tokens, internal hostnames).
Endpoints
Get a file report
- 404 means VirusTotal has never seen the file; nothing is uploaded by this call.
Get a URL report
- Build the id with base64.urlsafe_b64encode(url.encode()).decode().strip(’=’); VirusTotal canonicalises it.
Get an analysis
- Poll until the analysis is complete; mind the 4-per-minute public limit.