Read an image's metadata by URL: format, pixels, EXIF and GPS
An image metadata API downloads an image and reads its headers: format, width and height, file size, colour type, animation frames, and EXIF fields such as camera, lens, date taken and GPS. Locally, exiftool or Python's Pillow do the same for free. Our Image Info & EXIF API takes a URL and returns all of it as JSON for $0.003 per image, with GPS reported as present or not and rounded to about 1 km on purpose.
Try it free Image Info & EXIF API, size, format, camera, GPS, $0.003 · $0.003 / call
What comes back
Formats: JPEG, PNG, APNG, GIF, WebP, AVIF, HEIC, TIFF, BMP, ICO and SVG, up to 15 MB. It reads file headers only and never decodes the pixels, so large photos are quick.
| Group | Fields |
|---|---|
| Basics | format, mime, width, height, megapixels, aspect_ratio, orientation |
| File | file_bytes, file_size, bit_depth, color_type, has_alpha, progressive, has_icc_profile, dpi |
| Animation | animated, frames, loop_count (GIF, APNG, WebP) |
| EXIF | camera_make, camera_model, lens, taken_at, software, exposure, f_number, iso, focal_length_mm |
| Location | gps.present, latitude and longitude to 2 decimals |
Call it from Python
API = "https://iamai.markets/api/x402/services/BZQnGoZ7JNj1"
photo = "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"
# pay_session: a requests session with an x402 v2 client attached ($0.003 per image)
info = pay_session.post(API, json={"url": photo}, timeout=30).json()["result"]
print(info["format"], info["width"], info["height"], info["file_size"])
print(info["exif"]) # camera, lens, taken_at, exposure ...
print(info["gps"]) # {"present": true, "latitude": .., "longitude": ..}
Why GPS is rounded
Phone photos often carry the exact spot they were taken, and for photos taken at home that is someone's address. The API tells you a location is present, which is what most moderation and privacy flows need, and returns it to about 1 km. If you need the full coordinates of your own photos, read them locally with exiftool.
If you publish user photos, strip metadata before they go live. Most image pipelines and CDNs have an option for it.
Typical uses
- Upload checks: reject images under a minimum size or over a file size before processing.
- Privacy warnings: tell a user "this photo contains a location" before they post it.
- Catalogue audits: find animated GIFs, missing colour profiles or huge PNGs on a list of image URLs.
- AI agents that need to know an image's size and type before passing it on.
Free alternatives
exiftool is the most complete metadata reader and covers far more tags and maker notes than we do. Pillow gives size and format and basic EXIF in a few lines. Use them when the files are on your machine; use the API when you only have a URL, or when the caller is an agent or a no-code workflow.
The product
Questions
Does it remove metadata?
No, it only reads. Strip metadata with your image tool or CDN.
Can it read RAW camera files?
No. Supported formats are the common web and photo formats listed above, plus TIFF.
What if a photo has no EXIF?
exif comes back as null and gps.present as false. Screenshots and many social media downloads have none.
Related
Updated 2026-12-02
