Content file types and formats

 

 

 

 

Click the Content Options tab and select the options under Files to choose the file types and formats for downloading content; for example, specific video renditions or NITF-formatted stories. In addition to saving content files, you can also choose to download metadata for individual content items or the entire feed. For more information, see Rendition DUIDs.

 

 Tip

 

For best performance, select only necessary file types and formats.

 

 

 

Metadata

Downloading metadata files

 Tip

 

You can download metadata in addition to content files if you are interested in leveraging AP metadata to get the most out of the content delivered by the AP. For example, you can use AP category codes and other AP classification metadata to search or group content in your own systems. Learn more >>

 

 

 

Content metadata is returned in the JSON format and/or as XML in the NewsML-G2 format. For more information, see Content metadata fields.

Downloading metadata files is optional. Typically, you will need to write a custom script to post-process the downloaded metadata files.

  • If you post-process JSON metadata files, you would typically choose to download either multiple content items in the same JSON file (JSON: Feed Files) or one content item per file (JSON: Item Files).  

  • XML files in the NewsML-G2 format contain one content item per file. For more information, see XML: Item Files (NewsML-G2).

  • If you are interested in processing metadata for associated items (linked media and/or AP Top Headline stories), select Associated Item Files in addition to one of the other JSON and/or NewsML-G2 XML file options.

JSON: Feed Files

Select this option to save feed files in JSON format (multiple content items are included in each feed file).

By default, feed files are saved in the <Agent Directory>/feeds folder. The file name format is feed_<yyyyMMdd_HHmmss>_seq_<sequenceNumber>.json where <yyyyMMdd_HHmmss> is the date and time when the file was downloaded, and <sequenceNumber> is a unique sequential number that identifies each feed item.

JSON: Item Files

Select this option to save item metadata files in JSON format (one content item per file).

By default, the item metadata files are saved below the <Agent Directory>/content directory. The default file name format is <ItemID>--<Version>--<ContentID>-item.json.

If you are downloading video files and select the <OriginalFileName>--<PartialContentID>.<ext> option on the Content Save Options tab in conjunction with the JSON: Item Files option, the original file name (if available for the video rendition) will be applied to the JSON item metadata files. For example, if the originalfilename value for the video rendition is 4329116_Portugal Virus UK Travel_0_Preview.mp4, the JSON item metadata file name would be 4329116_Portugal Virus UK Travel_0-item.json.

JSON: Embed NITF Text

If you are running the latest version of the agent and have selected to download JSON item files, you can select the JSON:Embed NITF Text option to embed the following in the NITF format at the end of the JSON item files:

  • Story body (for text) in "nitf_story"

  • Captions for pictures, graphics and video in "nitf_caption"

  • Video scripts and/or shotlists in "nitf_script" and/or "nitf_shotlist"

 

  Notes

 

  • You do not need to select the NITF: Story Body, NITF: Caption, NITF: Script and/or NITF: Shotlist options under Text to embed NITF into JSON item files.

  • Any quotation marks in the embedded NITF XML are escaped with a backslash ("\") to allow the NITF to be embedded within the JSON.

 

 

 

{// JSON Example: Embedded NITF Caption"nitf_caption""<?xml version=\"1.0\" encoding=\"utf-8\"?><nitf version=\"-//IPTC//DTD NITF 3.4//EN\" change.date=\"October 18, 2006\" change.time=\"19:30\"><head><docdata><doc-id regsrc=\"AP\"/><date.issue norm=\"20200211T161026Z\"/><\/docdata><\/head> <body><body.head><hedline><hl1 id=\"headline\">United Nations Palestinians<\/hl1><\/hedline><distributor>The Associated Press<\/distributor><\/body.head><body.content><block id=\"Caption\"><p>Palestinian President Mahmoud Abbas speaks during a Security Council meeting at United Nations headquarters, Tuesday, Feb. 11, 2020. (AP Photo/Seth Wenig)<\/p><\/block><\/body.content><\/body><\/nitf>"}

XML: Item Files (NewsML-G2)

If you are running the latest version of the agent, you can select this option to save item metadata files as XML in the NewsML-G2 format (one content item per file).

By default, the item metadata files are saved below the <Agent Directory>/content directory. The default file name format is <ItemID>--<Version>--<ContentID>-item.xml.

If you are downloading video files and select the <OriginalFileName>--<PartialContentID>.<ext> option on the Content Save Options tab in conjunction with the XML: Item Files (NewsML-G2) option, the original file name (if available for the video rendition) will be applied to the NewsML-G2 item metadata files. For example, if the originalfilename value for the video rendition is 4329116_Portugal Virus UK Travel_0_Preview.mp4, the NewsML-G2 item metadata file name would be 4329116_Portugal Virus UK Travel_0-item.xml.

XML: Embed NITF Text

If you are running the latest version of the agent and have selected to download NewsML-G2 XML item files, you can also select the XML: Embed NITF Text option to embed the following NITF-formatted renditions in the <inlineXML> elements in the NewsML-G2 item files: story body (for text), captions (for pictures, graphics and video) and scripts and/or shotlists (for video). The <inlineXML> elements are embedded in addition to the <remoteContent> elements that contain links to these renditions.

 

  Note

 

You do not need to select the NITF: Story Body, NITF: Caption, NITF:Script and/or NITF: Shotlist options under Text to embed NITF into NewsML-G2 XML item files.

 

 

 

 

NewsML-G2 Example: Embedded NITF Caption

<inlineXML contenttype="application/nitf+xml" wordcount="202">
  <nitf version="-//IPTC//DTD NITF 3.4//EN"xmlns="http://iptc.org/std/NITF/2006-10-18/">
    <body>
      <body.head>
        <headline>
          <hl1>Police in Cincinnati are asking the public for help in identifying the man who poured red paint on the block-long "Black Lives Matter" mural in front of city hall</hl1>
        </headline>
      </body.head>
      <body.content>
        <block>
          <p>CINCINNATI (AP) — Police in Cincinnati are asking the public for help in identifying the man who poured red paint on the block-long "Black Lives Matter" mural in front of city hall.</p>           ...
        </block>
      </body.content>
    </body>
  </nitf>
</inlineXML>

Associated Item Files (Linked Media and Top Headline Stories)

Select this option if you are interested in downloading metadata for any of the following associated items:

  • Linked media (for example, pictures and video linked to text stories).

  • AP Top Headline stories (individual Top Headline stories are delivered as associated items of the Top Headline parent item; for example, "AP Top News at 8:50 p.m. EDT", that identifies all of these stories)

  • Media linked to Top Headline stories.

The format of the associated item files (JSON and/or NewsML-G2 XML) will match the selected format of the metadata files. For example, if you select JSON: Item Files and Associated Item Files, the associated item files will be downloaded in the JSON format, and if you select XML: Item Files (NewsML-G2) and Associated Item Files, the associated item files will be downloaded in the NewsML-G2 XML format.

By default, the associated item metadata files are saved below the <Agent Directory>/content directory. The file name format of the JSON associated item files is <ItemID>--<Version>--<ContentID>-associated_item.json. The file name format of the NewsML-G2 XML associated item files <ItemID>--<Version>--<ContentID>-associated_item.xml.

Text

Text renditions (renditions of textual content) are the NITF version of a story and textual descriptions of the media (for example, an image caption or a video script). Learn more >>

NITF: Story Body

Select this option to save NITF-formatted stories.

If available, inline links are always included in NITF-formatted stories; for example:

<block id="Main">
  <p>
BARCELONA, Spain (AP) - The rallying cry erupted, almost precisely, after 17 minutes and 14 seconds of soccer in the match between Barcelona and Malaga.</p>
  <p><a href=
"https://www.youtube.com/watch?v=vMCg84QWNhs">"In! In-de! In-de-pen-den-ci-a!"</a></p>
  <p>
It rolled around and around the Camp Nou stadium like a tide, from behind one of the goals into a frothing chorus of thousands of voices.</p>
    ... 
</block>

NITF: Caption

Select this option to save captions for pictures, graphics and video, including linked media captions.

The default file name format is <ItemID>--<Version>--<ContentID>_Caption.xml for captions of the pictures, graphics and video included in the feed and <ItemID>--<Version>--<ContentID>_Caption-associated_item.xml for linked media captions.

NITF: Script

Select this option to save video scripts, including the scripts of linked video.

The default file name format is <ItemID>--<Version>--<ContentID>_Script.xml for scripts of the video included in the feed and <ItemID>--<Version>--<ContentID>_Script-associated_item.xml for linked video scripts.

NITF: Shotlist

Select this option to save video shotlists, including the shotlists of linked video.

 

  Note

 

The script and shotlist are typically included in "NITF: Script".

 

 

 

When a separate shotlist is available, the default file name format is <ItemID>--<Version>--<ContentID>_Shotlist.xml for shotlists of the video included in the feed and <ItemID>--<Version>--<ContentID>_Shotlist-associated_item.xml for linked video shotlists.

Media renditions

Media renditions (renditions of non-textual content) are alternative versions of the same content item based on the format, size and/or other content characteristics, such as video frame rate and aspect ratio. For example, media renditions of a picture or graphic are the high-resolution, preview and thumbnail sizes of an image. Learn more >>

Select the check boxes for the media renditions (pictures, graphics, audio and video) that you want to download.

 

  Notes

 

  • All renditions may not be available for certain entitlements. For more information, see Media rendition availability.

  • For best performance, select only necessary file types and formats.

 

 

 

Media rendition availability

All renditions may not be available for certain entitlements. Although the AP offers a wide variety of potential media renditions, their availability for any given entitlement or content item is not guaranteed. Therefore, selecting certain renditions does not guarantee that you receive all of them; it only ensures that if the rendition is available, it is not filtered out. For example, you can select all video renditions, but the available video for a given entitlement or feed may include only MP4 files.

 

 

 

 

 

If you still require additional assistance, please contact AP Customer Support.

For current system status or system maintenance information, please visit the AP Customer Zone website.

 

 

 

 

 

 

 

THE ASSOCIATED PRESS

© copyright 2025  Associated Press. All rights reserved.