3. Private scanning with MetaDefender Cloud APIs

For all its commercial users, MetaDefender Cloud provides the ability to scan files privately. This private scanning feature is available through the MetaDefender Cloud APIs and MetaDefender Chrome Extension. All files scanned in private mode are not stored or shared, although scan results will remain available in the MetaDefender Cloud database.

During the file transfer from the client (i.e. an application that integrates with MetaDefender Cloud APIs, command line tool, or any other form of integration), the given file has to be stored in temporary storage by MetaDefender Cloud in order to be forwarded to underlying MetaDefender Core servers for file scanning. After the completion of the scanning process, the scan result is stored in the database and file is permanently removed from our storage.

Example of an API request with private scanning

In order to use the private scanning feature, clients have to send all requests on POST /v2/file endpoint with header samplesharing. This flag is only available to users who have purchased access to private scanning through the MetaDefender API. If '0', scanned files will not be stored or shared by MetaDefender, although hashed results will remain available.

var request = require('request');
var fs = require("fs");
var formData = {
file: fs.createReadStream(__dirname + '/file')
url: 'https://api.metadefender.com/v4/file',
formData: formData,
headers: {
apikey: process.env.APIKEY,
samplesharing: 0
function(err, httpResponse, body) {
if (err) {
return console.error('upload failed:', err);


When files are being scanned in private mode, they are not available for later rescan and must be uploaded again in order to obtain another scan result.