apyhub
Back
▣ DATA EXTRACTION · FILE MANIPULATION

Extract Image Metadata API

Hosted on ApyHub

What it does

The Image Metadata API reads the information stored inside an image file. Upload a photo or send its URL, and get back its metadata as JSON: format, dimensions, and file size, plus the EXIF details cameras and phones save, such as camera make and model, date taken, orientation, and GPS location when available. It works with JPEG, PNG, WebP, TIFF, and other common formats.

Use it to check image dimensions and format before storing uploads, sort a photo library by date or camera, read where a photo was taken, or review what personal information an image contains before publishing it.

Photos often include GPS coordinates and device details. To strip them before sharing, use the Remove Image Metadata API. For video files, use the Video Metadata API.

You can start on ApyHub's free tier with no card required.

▣ ENDPOINT 01 / 02
POST
input file
https://api.eu.apyhub.com/apyhub/extract-image-metadata/multi-part/download

QUICKSTART

GUIDE

Quickstart

Upload an image file to extract its metadata.

curl -X POST "https://api.eu.apyhub.com/apyhub/extract-image-metadata/multi-part/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.jpg"

What you'll get back

Returns a JSON object with a data object containing image metadata keyed by ExifTool tag name. The documented fields include items like FileType, MIMEType, ImageWidth, and ImageHeight; additional ExifTool tags may also appear depending on the file.

{
  "data": {
    "FileType": "JPEG",
    "MIMEType": "image/jpeg",
    "ImageWidth": 640,
    "ImageHeight": 427
  }
}
TRY ITLIVE · 30 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Image file to inspect (JPEG, PNG, WebP, TIFF, etc.).

About this endpoint

What it does

Uploads an image file and returns extracted ExifTool metadata as JSON. The request body must include an image binary file, and the response wraps the metadata under a data object.

Request Body

ParameterTypeDescription
imageBinaryImage file to inspect. Accepted examples include JPEG, PNG, WebP, TIFF, etc. The value is sent as binary file content.

Response

Returns a JSON object with a required data object field. data contains ExifTool metadata keyed by tag name; the schema documents a set of common image attributes, and additional ExifTool tags may also appear depending on the source image.

ParameterTypeDescription
dataObjectExifTool metadata keyed by tag name. The documented fields below may be present depending on the image format, and additional tags can also appear.
data.FilterStringThe filter for the image.
data.BitDepthIntegerThe bit depth of the image.
data.FileNameStringBase name of the input file, without extension, set by the service.
data.FileSizeStringThe file size.
data.FileTypeStringThe file type.
data.MIMETypeStringThe MIME type of the image.
data.ColorTypeStringThe color type of the image.
data.DirectoryStringThe directory for the image. This is a server temp path and is not relevant to clients.
data.ImageSizeStringThe image dimensions in WxH format.
data.InterlaceStringThe interlace mode for the image.
data.ImageWidthIntegerThe width of the image in pixels.
data.MegapixelsStringImage megapixels. ExifTool may return this value as either a string or a number.
data.SourceFileStringThe source file information, with the base name set by the service.
data.CompressionStringThe compression type for the image.
data.ImageHeightIntegerThe height of the image in pixels.
data.SRGBRenderingStringThe sRGB rendering intent for the image.
data.FileAccessDateStringThe timestamp when the file was accessed.
data.FileModifyDateStringThe timestamp when the file was modified.
data.ExifToolVersionNumberThe ExifTool version used to extract metadata.
data.FilePermissionsStringThe file permissions in Linux-style format.
data.FileTypeExtensionStringThe file extension.
data.FileInodeChangeDateStringThe timestamp for the inode change date.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 02
POST
input url
https://api.eu.apyhub.com/apyhub/extract-image-metadata/url/download

QUICKSTART

GUIDE

Quickstart

Send a public image URL to extract its metadata.

curl -X POST "https://api.eu.apyhub.com/apyhub/extract-image-metadata/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.jpg"}'

What you'll get back

Returns a JSON object with a data object containing image metadata fields such as FileName, FileType, MIMEType, ImageWidth, and ImageHeight. The data object may include additional ExifTool tags depending on the image.

{
  "data": {
    "FileName": "sample",
    "FileType": "JPEG",
    "MIMEType": "image/jpeg",
    "ImageWidth": 640,
    "ImageHeight": 427
  }
}
TRY ITLIVE · 30 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Provide url.
Publicly accessible image URL.

About this endpoint

What it does

Downloads the image at the provided public URL and returns extracted ExifTool metadata as JSON. The request body supplies the image URL, and the response wraps the metadata fields under data.

Request Body

ParameterTypeDescription
urlStringPublicly accessible image URL. Must be a valid URI.

Response

Returns a JSON object with a data object field containing ExifTool metadata keyed by tag name. The documented response fields include file, image, and extraction attributes such as FileName, FileType, MIMEType, ImageWidth, and ImageHeight; additional ExifTool tags may also appear depending on the source image.

ParameterTypeDescription
dataObjectExifTool metadata keyed by tag name under data. Documented fields are listed below; additional tags may appear depending on the image format and source file.
data.FilterStringThe filter for the image.
data.BitDepthIntegerThe bit depth of the image.
data.FileNameStringBase name of the input file (without extension), set by the service.
data.FileSizeStringThe file size.
data.FileTypeStringThe file type.
data.MIMETypeStringThe MIME type of the image.
data.ColorTypeStringThe color type of the image.
data.DirectoryStringThe directory for the image (server temp path; not relevant to clients).
data.ImageSizeStringThe height and width of the image (WxH).
data.InterlaceStringThe interlace mode for the image.
data.ImageWidthIntegerThe width of the image in pixels.
data.MegapixelsStringImage megapixels; ExifTool may return a string or number.
data.SourceFileStringThe source file information (base name set by the service).
data.CompressionStringThe compression type for the image.
data.ImageHeightIntegerThe height of the image in pixels.
data.SRGBRenderingStringThe sRGB rendering intent for the image.
data.FileAccessDateStringThe timestamp when the file was accessed.
data.FileModifyDateStringThe timestamp when the file was modified.
data.ExifToolVersionNumberThe ExifTool version used to extract metadata.
data.FilePermissionsStringThe permissions for the file (Linux-style).
data.FileTypeExtensionStringThe file extension.
data.FileInodeChangeDateStringThe timestamp for the inode change date.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.