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.

GETPOSThttps://apibox.io.vn/v1/image-metadata

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

NameInTypeRequiredDefault
filebodyfilenoThe image: multipart field file, raw binary body, or base64 in file_base64. Max 5/20/50 MB (Free/Starter/Pro).
urlbody|querystringnoPublic URL of the image to fetch, instead of uploading.
rawbody|querybooleannofalseInclude 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"}'

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

Start with 1,000 free requests every month. Get free API key →