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.
MetadataDownloading metadata files
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.
JSON: Feed FilesSelect 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 FilesSelect 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 TextIf 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:
{// 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 TextIf 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.
NewsML-G2 Example: Embedded NITF Caption <inlineXML contenttype="application/nitf+xml" wordcount="202"> 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:
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. TextText 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 BodySelect this option to save NITF-formatted stories. If available, inline links are always included in NITF-formatted stories; for example: <block id="Main"> NITF: CaptionSelect 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: ScriptSelect 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: ShotlistSelect this option to save video shotlists, including the shotlists of linked video.
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 renditionsMedia 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.
Media rendition availabilityAll 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. |
|
|
|
||||
|
|
|||||
|