VirusTotal API

Anti-malware / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

VirusTotal scans files and URLs against 70+ antivirus engines in one API call. Great for beginners building security tools or link-safety checkers.

💡

Beginner Tip

Free tier allows 4 requests/minute. Cache results locally to avoid burning your quota on repeated scans.

Available Data

case counts and statistics
vaccination data
geographic breakdown
historical trend data
Use case: Integrate virustotal file/url analysis data into web and mobile applications

Example Response

JSON Response
{
  "url": "https://example.com",
  "safe": true,
  "threat_level": "none",
  "categories": [
    "clean"
  ],
  "scan_date": "2025-01-15T10:00:00Z"
}

Field Reference

data.attributes.stats.malicious Count of antivirus engines that flagged the resource as malicious
data.attributes.stats.harmless Count of engines that found the resource safe
data.attributes.status Analysis state: queued, in-progress, or completed
data.id Unique analysis ID used to poll for results
data.attributes.last_analysis_date Unix timestamp of the most recent completed scan

Implementation Example

const url = "https://www.virustotal.com/en/documentation/public-api/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

403 Forbidden API key missing or passed incorrectly as a query param
Pass your key as a header: x-apikey: YOUR_KEY (not as a query string param)
429 Too Many Requests Exceeded free tier rate limit of 4 requests/minute
Add a 15-second delay between calls or upgrade to premium
Analysis result not ready Polling the results endpoint too soon after submission
Wait 15-30 seconds after submitting a file/URL before polling /analyses/{id}

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Anti-malware
Difficulty Intermediate
Verified: 2026-04-07

Recipes Using VirusTotal

Build something with this API. Each recipe includes step-by-step instructions and code outlines.

Similar APIs

View All →