File Metadata
Extract Metadata
Create a task to extract metadata from files. Under the hood, this is using exiftool. You can use this operation to get the number of pages of PDFs or to get the resolution of images/videos.
The metadata operation does not consume any conversion credits.
Task Parameters
metadata.The input task name(s) for this task.
The current format of the file, e.g. pdf. If not set, the extension of the input file is used as input format.
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs
Example Response
You can find an example result of of the metadata extraction of a PDF below:
{
"data": {
"id": "9a160154-58e2-437f-9b6b-19d63b1f59e3",
"tag": "myjob-123",
"status": "finished",
"created_at": "2018-09-19T14:42:58+00:00",
"started_at": "2018-09-19T14:42:58+00:00",
"tasks": [
{
"id": "c85f3ca9-164c-4e89-8ae2-c08192a7cb08",
"operation": "metadata",
"status": "finished",
"message": null,
"created_at": "2018-09-19T14:42:58+00:00",
"started_at": "2018-09-19T14:42:58+00:00",
"ended_at": "2018-09-19T14:42:58+00:00",
"depends_on_tasks": {},
"engine": "exiftool",
"engine_version": "12.07",
"payload": {
"input": "73df1e16-fd8b-47a1-a156-f197babde91a",
"input_format": "pdf"
},
"result": {
"metadata": {
"SourceFile": "zombies.pdf",
"ExifToolVersion": 12.07,
"FileName": "zombies.pdf",
"Directory": ".",
"FileSize": "169 kB",
"FileModifyDate": "2020:08:18 14:04:31+00:00",
"FileAccessDate": "2020:10:07 14:15:45+00:00",
"FileInodeChangeDate": "2020:08:18 14:04:31+00:00",
"FilePermissions": "rw-r--r--",
"FileType": "PDF",
"FileTypeExtension": "pdf",
"MIMEType": "application/pdf",
"PDFVersion": 1.4,
"Linearized": "Yes",
"Author": "Doug",
"CreateDate": "2014:05:14 13:14:52-05:00",
"ModifyDate": "2014:05:14 13:36:57-05:00",
"XMPToolkit": "Adobe XMP Core 5.2-c001 63.139439, 2010/09/27-13:37:26 ",
"Producer": "ScanSoft PDF Create! 7",
"CreatorTool": "Microsoft Word - CONPLAN 8888-11 ... Pentagon Zombie Plan ... Counter Zombie Dominance 2011",
"MetadataDate": "2014:05:14 13:36:57-05:00",
"Format": "application/pdf",
"Title": "Microsoft Word - CONPLAN 8888-11 ... Pentagon Zombie Plan ... Counter Zombie Dominance 2011",
"Creator": "Doug",
"DocumentID": "uuid:406c2972-c2bd-4470-95ad-1bfb6efb5258",
"InstanceID": "uuid:c4d76637-aaa4-4e08-8a28-149644c2400c",
"PageMode": "UseNone",
"PageCount": 31
}
}
}
]
}
}
Write Metadata
Create a task to write file metadata. Under the hood, this is using exiftool. You can use this operation to write any XMP or IPTC metadata, such as Author, Title, Copyright etc. You can find an example request to set PDF metadata below.
Possible metadata keys include Title, Author, Creator, Producer. You can find all possible properties in the exiftool documentation.
Task Parameters
metadata/write.The input task name(s) for this task.
The current format of the file, e.g. pdf. If not set, the extension of the input file is used as input format.
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Object of metadata to write.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs