|
Feeds and Linked Content
About Feeds
A news feed is a list of content items (such as text stories, pictures,
graphics, audio and video) that contains:
AP metadata that describes
the content item. To learn more, see Content
Metadata Fields.
Renditions: Links to the actual
content files; for example, news stories in the NITF format or JPEG
pictures of different sizes (high-resolution, preview and thumbnail).
To learn more, see Content
File Formats and Renditions.
Associations: Links to associated
items:
For text stories, references to linked
media (for example, pictures and video linked to a story) if available.
To learn more, see Linked
Media.
For AP Top Headlines, links to individual
AP Top Headline stories included in the AP Top Headlines collection.
To learn more, see AP
Top Headlines.
AP Media API feeds are delivered in the JSON format.
Feed Structure Example
Tip |
|
This
example illustrates the structure of JSON metadata files downloaded
by your agent. Post-processing JSON feed files is useful if you
want to take advantage of the AP content metadata. Learn
more >> |
|
|
|
In this example, only two feed items (a text story and a picture) and
one linked picture are shown for brevity. To learn about the AP Top Headlines
structure, see AP
Top Headlines.
JSON Examples
Feed Items
This JSON example shows two feed items:
A text story item with a reference to the linked
picture item in associations and a link
to the NITF story download in renditions.
A picture item with links to the JPEG images
of different sizes (high-resolution, preview and thumbnail) and the
picture caption in renditions.
// Example:
{
"item": {
"uri": "https://api.ap.org/media/v/content/c116ac3656f240238ee7529720e4a4b8",
"altids": {
"itemid": "c116ac3656f240238ee7529720e4a4b8"...},
"version": 8,
"type": "text",
...
"headline": "Damaging hail and tornadoes threatened for southeast US",
...
"associations": {
"1": {
"uri": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80",
"altids": {
"itemid": "0726a2a7a06b48d0af1e41bf04fe8f80"...}, ...
"type": "picture",
"headline": "Southern Storms"}},
"renditions": {
"nitf": {
"title": "NITF Story Download",
"rel": "Story",
"format": "IIM",
"type": "text",
...
"href": "https://api.ap.org/media/v/content/c116ac3656f240238ee7529720e4a4b8/download?type=text&format=NITF"}}}},
{
"item": {
"uri": "https://api.ap.org/media/v/content/22c04cbb8ae546db8d54af81ea7fd77e",
"altids": {
"itemid": "22c04cbb8ae546db8d54af81ea7fd77e"...},
"version": 0,
"type": "picture",
...
"headline": "Stormy Baltic sea",
...
"renditions": {
"main": {
"title": "Full Resolution (JPG)",
"rel": "Main",
"format": "JPEG Baseline",
"type": "picture",
...
"href": "https://api.ap.org/media/v/content/22c04cbb8ae546db8d54af81ea7fd77e/download?role=main",...},
"preview": {
"title": "Preview (JPG)",
"rel": "Preview",
"format": "JPEG Baseline",
"type": "picture",
...
"href": "https://mapi.associatedpress.com/v1/items/22c04cbb8ae546db8d54af81ea7fd77e/preview/preview.jpg",...},
"thumbnail": {
"title": "Thumbnail (JPG)",
"rel": "Thumbnail",
"format": "JPEG Baseline",
"type": "picture",
...
"href": "https://mapi.associatedpress.com/v1/items/22c04cbb8ae546db8d54af81ea7fd77e/thumbnail/thumbnail.jpg",...},
"caption_nitf": {
"title": "NITF Caption Download",
"rel": "Caption",
"format": "IIM",
"type": "text",
...
"href": "https://api.ap.org/media/v/content/22c04cbb8ae546db8d54af81ea7fd77e/download?type=text&format=nitf&text=caption"}}}}
Linked
Picture Item
This example shows an abbreviated linked picture item that was referenced
in associations in the previous example. The
links to the JPEG images of different sizes (high-resolution, preview
and thumbnail) and the picture caption are available in renditions.
// Example:
"item": {
"uri": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80",
"altids": {
"itemid": "0726a2a7a06b48d0af1e41bf04fe8f80"...},
"version": 0,
"type": "picture",
...
"headline": "Southern Storms",
...
"renditions": {
"main": {
"title": "Full Resolution (JPG)",
"rel": "Main",
"format": "JPEG Baseline",
"type": "picture",
...
"href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?role=main"...},
"preview": {
"title": "Preview (JPG)",
"rel": "Preview",
"format": "JPEG Baseline",
"type": "picture",
...
"href": "https://mapi.associatedpress.com/v1/items/0726a2a7a06b48d0af1e41bf04fe8f80/preview/preview.jpg"...},
"thumbnail": {
"title": "Thumbnail (JPG)",
"rel": "Thumbnail",
"format": "JPEG Baseline",
"type": "picture",
...
"href": "https://mapi.associatedpress.com/v1/items/0726a2a7a06b48d0af1e41bf04fe8f80/thumbnail/thumbnail.jpg"...},
"caption_nitf": {
"title": "NITF Caption Download",
"rel": "Caption",
"format": "IIM",
"type": "text",
...
"href": "https://api.ap.org/media/v/content/0726a2a7a06b48d0af1e41bf04fe8f80/download?type=text&format=nitf&text=caption"}}}}
|
|