5.2 EXIF Lookup

Request

Value

Method

GET

URL

https://api.metadefender.com/v3/hash/:hash/exif

Summary

Lookup EXIF of a hash by md5, sha1 or sha256. EXIF is an open standard for storing metadata in images, information like date and time when the image was taken, geolocation of device hardware ID. Most (but not all) of our image files have EXIF metadata information associated with them. The information varies depending on what was stored in the image. Some images have more metadata tags, others have only a few.

When doing a hash lookup, if the body of the response contains `exif: true`, it means that this particular hash has EXIF information associated and can be retrieved using this endpoint.

Request

HTTP URL parameters

 

Description

Example

:hash

The hash value for which you need exif info (MD5/SHA1/SHA256)

6E078FC7D85ADFFF1DE55EEBB5A79645D5998ADD

HTTP Header Parameters

 

Description

Allowed Values

Required

Authorization

give rights to use the endpoint (API Authentication Mechanisms)

apikey

YES

Response

HTTP Status Codes

Please refer to Status Codes for more information.

Body

Example of successful product info:

{
"success": true,
"data": {
"Megapixels": 0.05,
"ImageSize": "275x183",
"YCbCrSubSampling": "YCbCr4:2:0 (2 2)",
"ColorComponents": 3,
"BitsPerSample": 8,
"EncodingProcess": "Baseline DCT, Huffman coding",
"ImageHeight": 183,
"ImageWidth": 275,
"YResolution": 1,
"XResolution": 1,
"ResolutionUnit": "None",
"JFIFVersion": 1.01,
"MIMEType": "image/jpeg",
"FileTypeExtension": "jpg",
"FileType": "JPEG",
"FileSize": "13 kB",
"FileName": "images.jpeg",
"ExifToolVersion": 10.53
}
}

Example of the parameter being invalid:

{
"success": false,
"error": {
"code": 400064,
"messages": [
"The hash value is not valid"
]
}
}

Descriptions of response:

data

Object containing metadata extracted by the exiftool

Errors

Please refer to Errors for more information.

Sample code (Node.js)

var http = require("https");
 
var options = {
"method": "GET",
"hostname": [
"api",
"metadefender",
"com"
],
"path": [
"v3",
"hash",
"6E078FC7D85ADFFF1DE55EEBB5A79645D5998ADD",
"exif"
],
"headers": {
"Authorization": "apikey " + process.env.APIKEY
}
};
 
var req = http.request(options, function (res) {
var chunks = [];
 
res.on("data", function (chunk) {
chunks.push(chunk);
});
 
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
 
req.end();

Sample code (cURL)

curl -X GET \
https://api.metadefender.com/v3/hash/6E078FC7D85ADFFF1DE55EEBB5A79645D5998ADD/exif \
-H 'Authorization: apikey ${APIKEY}'