The tool that we recommend the most is Phil Harvey’s exiftool (exiftool.org).
How you install the exiftool software depends on your operating system and environment. Here are some installation instructions.
It has extensive documentation and you can also run exiftool with no arguments for a complete list of available options with examples.
Simple exiftool command-line examples
To get you started quickly, here are some examples of things that can be done with it regarding IPTC metadata:
View all embedded metadata for an image file
exiftool <image file name>
This will simply display all metadata (IPTC, Exif and other formats) that can be extracted from the file.
View a single metadata property for an image file
Exiftool can extract any single property from a media file. To find out which tag to use, first consult the IPTC Photo Metadata Standard Specification to get the XMP tag used,
$ exiftool -XMP-iptcExt:digitalsourcetype IPTC-PhotometadataRef-Std2021.1.jpg Digital Source Type : http://cv.iptc.org/newscodes/digitalsourcetype/softwareImage
Another example:
$ exiftool -struct -XMP-photoshop:Credit IPTC-PhotometadataRef-Std2021.1.jpg Credit : Credit Line (ref2021.1)
{meta|get:'xmp:digitalsourcetype'}}
View the full XMP data for an image file
This displays the native internal structure of the XMP packet within an image file. This is usually only used for debugging purposes or if you are curious about how this metadata is actually stored inside the file.
$ exiftool -b -xmp IPTC-PhotometadataRef-Std2021.1.jpg <?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.34'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <rdf:Description rdf:about='' xmlns:Iptc4xmpCore='http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/'> Iptc4xmpCore:AltTextAccessibility rdf:Alt <rdf:li xml:lang='x-default'>This is the Alt Text description to support accessibility in 2021.1</rdf:li> </rdf:Alt> </Iptc4xmpCore:AltTextAccessibility> <Iptc4xmpCore:CountryCode>R21</Iptc4xmpCore:CountryCode> [... much more data snipped for brevity ...] </xmpRights:UsageTerms> <xmpRights:WebStatement>http://www.WebStatementOfRights.org/2021.1</xmpRights:WebStatement> </rdf:Description> </rdf:RDF> </x:xmpmeta>