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

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

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

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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}

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Anti-malware
Difficulty Intermediate
Listing details not endpoint-verified

Related Tags

Recipes Using VirusTotal

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

Similar APIs

View All →