Learn R Programming

virustotal: R Client for the VirusTotal Public API v2.0 and v3.0

Use VirusTotal, a Google service that analyzes files and URLs for viruses, worms, trojans etc., provides category of the content hosted by a domain from a variety of prominent services, provides passive DNS information, among other things.

This package supports both VirusTotal API v2.0 (legacy) and v3.0 (current). The v3.0 API provides richer data including IoC relationships, sandbox dynamic analysis, static file information, YARA rules, and more comprehensive threat intelligence.

API Rate Limits:

  • Public API: 500 requests/day, 4 requests/minute
  • Premium API: No daily or rate limitations

Supported Operations:

  • Files: Upload, scan, get reports, download, comments, votes, relationships
  • URLs: Submit for analysis, get reports, comments, votes, relationships
  • Domains: Get reports, comments, votes, relationships, WHOIS data
  • IP Addresses: Get reports, comments, votes, relationships, passive DNS

See https://www.virustotal.com for more information.

Installation

To get the current released version from CRAN:

install.packages("virustotal")

To get the current development version from GitHub:

install.packages("devtools")
devtools::install_github("themains/virustotal", build_vignettes = TRUE)

Usage

To learn about how to use the package, read the vignette. Or launch the vignette within R:

# Using virustotal
vignette("using_virustotal", package = "virustotal")

License

Scripts are released under the MIT License.

Copy Link

Version

Install

install.packages('virustotal')

Monthly Downloads

162

Version

0.5.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Gaurav Sood

Last Published

December 16th, 2025

Functions in virustotal (0.5.0)

get_url_votes

Retrieve votes for a URL
get_url_relationships

Retrieve relationships for a URL
post_file_votes

Add a vote to a file
post_url_votes

Add a vote to a URL
post_ip_comments

Add a comment to an IP address
print.virustotal_domain_report

Print method for domain reports
post_file_comments

Add a comment to a file
post_ip_votes

Add a vote for a IP address
rescan_file

Request rescan of a file
post_domain_votes

Add a vote for a hostname or domain
post_url_comments

Add a comment to a URL
is_rate_limit_initialized

Check if rate limiting is properly initialized
sanitize_domain

Sanitize domain input
reset_rate_limit

Reset rate limiting state
print.virustotal_response

Print method for VirusTotal responses
scan_url

Submit URL for scanning
rate-limiting

Rate Limiting for VirusTotal API
validate_vt_response

Validate VirusTotal response structure
rate_limit_legacy

Legacy rate limiting function
sanitize_ip

Sanitize IP address input
virustotal-classes

S3 Classes for VirusTotal Responses
security-utilities

Security Utilities for VirusTotal Package
scan_file

Submit a file for scanning
set_key

Set VirusTotal API Key
rate_limit

Modern rate limiting implementation
sanitize_url

Sanitize URL input
summary.virustotal_response

Summary method for VirusTotal responses
print.virustotal_file_report

Print method for file reports
sanitize_hash

Sanitize hash input
url_report

Get URL Report
print.virustotal_error

Print method for VirusTotal errors
sanitize_file_path

Sanitize file path input
virustotal_domain_report

Create a VirusTotal domain report
utilities

Utility Functions for VirusTotal Package
virustotal_info

Print package information and configuration status
virustotal_POST

POST for the Current V3 API
virustotal_GET

GET for the Current V3 API
virustotal_file_scan

Create a VirusTotal file scan result
virustotal_url_scan

Create a VirusTotal URL scan result
virustotal_check

Request Response Verification
virustotal_file_report

Create a VirusTotal file report
virustotal_auth_error

Create an authentication error
virustotal-package

virustotal: Access Virustotal API
virustotal2_POST

POST for V2 API
virustotal-errors

VirusTotal API Error Classes
virustotal_error

Create a VirusTotal API error
virustotal_validation_error

Create a validation error
virustotal_rate_limit_error

Create a rate limit error
virustotal_version

Get package version information
virustotal_ip_report

Create a VirusTotal IP report
virustotal2_GET

Base POST AND GET functions. Not exported.
cleanup_temp_files

Clean up temporary files and directories
add_comments

Add comments on Files and URLs
get_domain_comments

Retrieve comments for an Internet domain
get_domain_info

Retrieve information about an Internet domain
domain_report

Get Domain Report
file_report

Get File Scan Report
download_file

Download a file from VirusTotal
get_file_comments

Retrieve comments for a file
get_ip_comments

Retrieve comments for an IP address
get_ip_votes

Retrieve votes for an IP address
get_file_relationships

Retrieve relationships for a file
get_file_download_url

Get download URL for a file
get_ip_info

Retrieve information about an IP address
get_file_votes

Retrieve votes for a file
get_domain_votes

Retrieve votes for an Internet domain
get_domain_relationship

Retrieve related objects to an Internet domain
get_file_upload_url

Get file upload URL for large files
post_domain_comments

Add a comment to an Internet domain
get_url_comments

Retrieve comments for a URL
ip_report

Get IP Address Report
get_rate_limit_status

Get current rate limit status
create_safe_temp_dir

Create a safe temporary directory for file operations
is_safe_environment

Check if running in a safe environment
format_file_size

Convert file size to human readable format
init_rate_limit

Initialize rate limiting state
is_api_key_configured

Check if API key is properly configured
as.data.frame.virustotal_response

Convert VirusTotal response to data.frame