Extract Image Metadata API
ApyHub
30 atoms
Base tier
About
This Utility API lets you fetch the metadata of the image such as height, width, size, format, quality and so on.
You can use the image metadata to edit the size of the image, crop the image, or compress the image.
Extracting metadata from an image can provide several other benefits, including identification, copyright protection, organization, data analysis, and preservation. It can help to identify and provide context for the image, organize images more effectively, analyze trends and patterns, and preserve the image for future use. Metadata can also be used for data analysis, such as tracking the popularity of certain types of images or analyzing trends over time.
Select API Endpoints
Input
API Playground
API Documentation
input file
POST
https://api.apyhub.com/processor/image/metadata/file
Request example
Method:
POST
Content Type:
multipart/form-data
Request Body
Attribute | Type | Mandatory | Description |
---|---|---|---|
image | File | Yes | the source image file |
Response
Attribute | Type | Description |
---|---|---|
data.BitDepth | Integer | The bit depth of the image |
data.ColorType | String | The color type of the image |
data.Compression | String | The compression type for the image |
data.Directory | String | The directory for the image (not relevant) |
data.ExifToolVersion | Decimal | The exif version |
data.FileAccessDate | String | The timestamp when the file was accessed |
data.FileInodeChangeDate | String | The timestamp for the change date |
data.FileModifyDate | String | The timestamp when the file was modified |
data.FilePermissions | String | The permissions for the file (linux type) |
data.FileSize | String | The file size |
data.FileType | String | The file type |
data.FileTypeExtension | String | The file extension |
data.Filter | String | The filter for the image |
data.ImageHeight | Integer | The height of the image |
data.ImageWidth | Integer | The width of the image |
data.ImageSize | String | The height and the width of the image |
data.Interlace | String | The interlace for the image |
data.MIMEType | String | The mime type of the image |
data.Megapixels | String | Image megapixels |
data.SRGBRendering | String | The SRGBRendering for the image |
data.SourceFile | String | The Source file information |
Sample Response
HTTP Response Codes
The method may return one of the following HTTP status codes:
Status Code | Description |
---|---|
200 | The request was successful. |
401 | Required authentication information is either missing or not valid for the resource. |
400 | Invalid input - the image file is corrupt. |
500 | If any unexpected error occurs while processing the request. |
Authentication
All API requests to ApyHub services need to be authenticated. Currently we support
tokens
or basic authentication
mechanisms.
You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".Points to note:
- Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
- Use the
apy-token
as the header parameter to pass the token. - Use the
Authorization
header to send the basic authentication credentials.
Error codes
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.
Table of contents