5.2 EXIF Lookup
Request |
Value |
Method |
GET |
URL |
https://api.metadefender.com/v4/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 the "additional_info" field (array) containing the "exif", it means that this particular hash has EXIF information associated and can be retrieved using this endpoint.
additional_info: [
"exif"
]
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 |
apikey |
gives 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:
{
"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:
{
"error"
: {
"code"
:
404003
,
"messages"
: [
"The hash was not found"
]
}
}
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"
: [
"v4"
,
"hash"
,
"6E078FC7D85ADFFF1DE55EEBB5A79645D5998ADD"
,
"exif"
],
"headers"
: {
"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/v4/hash/6E078FC7D85ADFFF1DE55EEBB5A79645D5998ADD/exif \
-H
"apikey: ${APIKEY}"