Image Metadata & EXIF API
Read image dimensions, format, EXIF camera data, capture settings and GPS location from JPEG, PNG, WebP, HEIC, AVIF, GIF and more – upload or URL.
The Image Metadata API inspects an image and returns everything useful about it: detected format and MIME type (from the file’s bytes, not its extension), width, height, megapixels and aspect ratio, file size and SHA-256, plus format details such as bit depth, colour type, interlacing, progressive JPEG or animation (PNG, GIF, WebP).
For JPEG, HEIC, AVIF, TIFF, PNG and WebP it parses EXIF, XMP and IPTC: camera make and model, lens, software, orientation, the capture date and settings (exposure time, f-number, ISO, focal length, flash, white balance) and GPS coordinates. has_exif, has_gps and has_xmp let you quickly decide whether to strip metadata before publishing a photo. Add raw=true for the full parsed EXIF tree.
Supported formats: JPEG, PNG, GIF, WebP, AVIF, HEIC, TIFF, BMP, ICO and SVG. Send the image as multipart field file, as the raw request body, as base64 in file_base64, or give a public url to fetch. Maximum file size depends on your plan: Free 5 MB, Starter 20 MB, Pro 50 MB.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
file | body | file | no | The image: multipart field file, raw binary body, or base64 in file_base64. Max 5/20/50 MB (Free/Starter/Pro). | |
url | body|query | string | no | Public URL of the image to fetch, instead of uploading. | |
raw | body|query | boolean | no | false | Include the full parsed EXIF/XMP/IPTC tree in exif. |
Example
curl -X POST "https://apibox.io.vn/v1/image-metadata" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"}'const res = await fetch('https://apibox.io.vn/v1/image-metadata', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/image-metadata",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/image-metadata');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"url":"https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"source": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg",
"file_name": "DSCN0010.jpg",
"size_bytes": 161713,
"sha256": "17307b1207eb6487d7908e9d154890b46e3d2e0192369cfd3f4c33d5a5af4035",
"format": "jpeg",
"mime_type": "image/jpeg",
"width": 640,
"height": 480,
"megapixels": 0.31,
"aspect_ratio": "4:3",
"orientation": "Horizontal (normal)",
"bit_depth": 8,
"components": 3,
"progressive": false,
"camera": {
"make": "NIKON",
"model": "COOLPIX P6000",
"lens": null,
"software": "Nikon Transfer 1.1 W"
},
"capture": {
"date_time": "2008-10-22T16:28:39.000Z",
"exposure_time": 0.013333333333333334,
"f_number": 5.9,
"iso": 64,
"focal_length": 24,
"flash": "Flash did not fire, compulsory flash mode",
"white_balance": "Auto"
},
"gps": {
"latitude": 43.46744833333334,
"longitude": 11.885126666663888,
"altitude": null
},
"has_exif": true,
"has_gps": true,
"has_xmp": false
}
Use cases
- Validate dimensions and format of user uploads before processing
- Detect and warn about GPS location in photos before they go public
- Extract capture date and camera data for photo galleries and DAM systems
- Check remote images (by URL) without downloading them yourself
FAQ
How do I find where a photo was taken?
Upload it and look at gps: latitude and longitude are returned when the camera stored a location. Many apps and social networks strip GPS data on upload, in which case has_gps is false.
Can I read metadata from an image URL?
Yes: /v1/image-metadata?url=https://example.com/photo.jpg (or POST {"url": ...}). The file is fetched by APIBox and counts against your plan’s size limit.
Is my uploaded image stored?
No. The file is processed in memory and discarded after the response; only its SHA-256 is returned to you.
Related APIs
PDF Metadata
Read PDF metadata: page count, title, author, creator, producer, dates, PDF version, encryption, form fields and the size of each page (A4, Letter…).
PDF₫Quote & Receipt PDF
Generate clean PDF quotations, receipts, orders and simple invoices from JSON, with Vietnamese text, VAT, totals in words and a VietQR code for payment.
M↓PDFMarkdown to PDF
Convert Markdown to a clean A4 / A5 / Letter PDF: headings, bold / italic, links, nested lists, quotes, code blocks, tables, page numbers, full Vietnamese support.