How to read an image's EXIF, GPS and other metadata with an API

POST an image URL to /v1/image/metadata. It returns the format, dimensions and, when present, EXIF (camera, lens, dates, exposure, orientation), GPS coordinates, XMP, IPTC, comments and PNG text keys.

Request

Only the URL or image_base64 is needed. Input is a public image URL (up to 10 MB) or image_base64 (up to 10 MB decoded; a data:image/...;base64, prefix is fine). Every string is cleaned and capped at 300 characters. Malformed EXIF adds a warnings entry instead of failing.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/image/metadata \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"}'

Response

Response (example from the API spec, trimmed)
{
  "operation": "metadata",
  "input": {
    "format": "jpeg",
    "width": 640,
    "height": 480,
    "bytes": 161713,
    "frames": 1,
    "animated": false,
    "has_alpha": false
  },
  "source_url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg…",
  "final_url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg…",
  "metadata": {
    "mode": "RGB",
    "dpi": [300.0, 300.0],
    "icc": {
      "present": false
    },
    "exif": {
      "present": true,
      "tag_count": 56,
      "make": "NIKON",
      "model": "COOLPIX P6000",
      "software": "Nikon Transfer 1.1 W",
      "datetime": "2008:11:01 21:15:07",
      "datetime_original": "2008:10:22 16:28:39",
      "orientation": 1,
      "exposure_time": 0.013333,
      "f_number": 5.9,
      "iso": 64,
      "focal_length_mm": 24.0,
      "focal_length_35mm": 112
    },
    "gps": {
      "present": true,
      "latitude": 43.4674483,
      "longitude": 11.8851267,
      "date": "2008:10:23"
    },
    "xmp": {
      "present": true,
      "bytes": 4000
    },
    "iptc": {
      "present": false,
      "keywords": []
    },
    "comments": [],
    "text_chunks": [],
    "warnings": [],
    "progressive": false
  },
  "untrusted_content": true,
  "notes": [],
  "source": {
    "library": "Pillow",
    "license": "MIT-CMU (HPND)",
    "url": "https://python-pillow.org"
  }
}

Limits and caveats

Privacy. The example image carries a GPS position. Photos from phones often include the location where they were taken. Images and positions are processed for the answer only; Tanod does not log or store them.

Untrusted strings. Comments and text fields are set by whoever made the file and can contain anything, including instructions aimed at an AI agent. The response carries untrusted_content: true.

Metadata can be edited or faked, so it is not proof of when, where or how a photo was taken.

Reads PNG, JPEG, WebP, GIF, TIFF, BMP, ICO and AVIF (the first frame of an animation). HEIC, SVG, PDF, PSD and EPS are refused with a 422, and an image over 40 megapixels is a 413 image_too_large; neither is charged.

Price and free allowance

USD 0.002 per call, paid in USDC on Base with x402. 3 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared by every image operation. MCP tool: image_metadata at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: How to remove EXIF and GPS metadata from an image with an API, How to compute a perceptual hash and compare two images with an API, How to extract the dominant colors and palette of an image with an API. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.