ANPA Migration Metadata Guide

 

ON THIS PAGE      Show

 

 

 

 

 

This guide is intended for ANPA users who are migrating to AP Media API and Agent.

It suggests specific JSON and NewsML-G2 metadata fields that you can use to route and manage content delivered by AP Media API and Agent based on how you might have used metadata in the ANPA headers before ANPA retirement.

For more information about ANPA retirement, see ANPA Migration FAQs.

 

 

 

Routing and Managing Content

In ANPA, you may get a story multiple times with different variations of the ANPA header. For example, a story may come in once with an "f" category code and again with an "a" category code. While some systems are set up to discard the duplicate, others ingest both and route the story to both their business queue and to their general news queue. You may also see a story with a designation as national news and separately as state news.

AP Media API delivers the story only once, with all the metadata in a single file. The business and general news codes will appear in a single, multi-value field in the JSON or NewsML-G2 file. The same file will include the values designating that a story may be both national- and state-level news. If your internal workflow requires different editors to see the same story in different locations, you can use those multi-value fields to route the same story to multiple queues.

For more information, see the AP Media API documentation about available JSON and NewsML-G2 content metadata, best practices for leveraging content metadata, and mapping AP Media API content metadata to fields from legacy platforms.

Using NITF Text Renditions

Text content, including stories, captions, scripts and shotlists, is available in the industry-standard NITF format. Some NITF content may contain HTML "class" attributes to help you with formatting this content using CSS if you wish.

Many metadata elements found in ANPA are also available in NITF. For more information, see examples in the following section.

Using JSON and NewsML-G2 Item Metadata to Replace ANPA Headers

Transmission Reference (transref)

Transmission Reference Number; the alphanumeric identifier (or file name) associated with a story, picture or video. For all content as an ID, use Item ID.

ANPA Examples: a1245, WRC110, NYET124, aphdp

JSON Example:

"itemid": "c205823b75d33caab7589eee7544b2b3"

NewsML-G2 Example:

<altId type="ap:itemId">bca71494689f4f8dba3e5b8399b016f0</altId>

NITF:

NITF files do not contain an ID, but AP Media Agent users can save NITF files with the Item ID in the name.

 

  Note

 

altids.transref currently available in JSON is deprecated and will be removed in the Media API 2.2 release.

 

 

 

Selector

Selectors encode a complex combination of audience, subject, content type, and other information into five characters. If you were routing content using selector, you can identify and route content in AP Media API using item metadata such as geographic audience, content type and fixture. Many of these metadata values are available in Search, allowing you to create custom query based feeds to route within your organization.

Geographic Audience

To identify content of interest to your state, country, or region, use audience. For a list of possible values, see AP Geography.

 

  Note

 

Not all AP Geography values are used as audiences. World regions, the United States and U.S. States are most commonly used.

 

 

 

JSON Examples:

"audiences": [

 {"code": "6e92d9b882c7100488e5df092526b43e",
  "name": "Texas",
  "type": "AUDGEOGRAPHY"}]
 
"audiences": [
 {"code": "661e48387d5b10048291c076b8e3055c",
  "name": "United States",
  "type": "AUDGEOGRAPHY"}]
 
"audiences": [
 {"code": "661850e07d5b100481f4c076b8e3055c ",
  "name": "Europe",
  "type": "AUDGEOGRAPHY"}]

NewsML-G2 Examples:

<audience qcode="apaudience:6e92d9b882c7100488e5df092526b43e" type="apaudtype:audgeography">

  <name>Texas</name>
</audience>

 

<audience qcode="apaudience:661e48387d5b10048291c076b8e3055c" type="apaudtype:audgeography">
  <name>United States</name>
</audience>

 

<audience qcode="apaudience:661850e07d5b100481f5c076b8e3055c" type="apaudtype:audgeography">
  <name>Latin America and Caribbean</name>
</audience>

Content Type / Profile

To identify agate, daybooks, weather forecasts, advisories, election results and other types of text content, use profile. For a complete list of values, see Profile (ItemContentType).

JSON Example:

"profile": "Daybook"

NewsML-G2 Example:

<profile>daybook</profile>

Fixture

For recurring fixtures, use the fixture name or code. Fixtures are named sets of regularly occurring content or features with a predictable focus; for example, "Financial Markets," "Film Reviews," "10 Things to Know," "Sports Briefs." For more information, see a complete list of AP Fixtures.

JSON Example:

"fixture": {

  "code": "2b99bea3284347c5a083f8c6faca3365 ",
  "name": "Today in History"}

NewsML-G2 Example:

<instanceOf qcode="apfixture:2b99bea3284347c5a083f8c6faca3365">

  <name>Today in History</name>
</instanceOf>

Editorial Priority

Use urgency, with the following mapping from legacy values:

 

Legacy ANPA values

Numeric urgency values

Description

f

1

Flash

b

2

Bulletin

u

3

Urgent

r

4

Routine

d

5

Daily

w

6

Release at will

a

7

Weekday advance

s

8

Weekend advance

JSON Example:

"urgency": 4

NewsML-G2 Example:

<urgency>4</urgency>

Category Code

Category is preserved in AP Media API as a convenience. For information about the options for audience routing, see Geographic Audience.

Unlike ANPA, all AP Media API formats deliver all categories that are available for an item.

ANPA Examples: a, s, f, n

JSON Example:

"subject": [

 {"rels": ["category"],
  "creator": "Editorial",
  "code": "a",
  "name": "a"},
 {"rels": ["category"],
  "creator": "Editorial",
  "code": "e",
  "name": "e"}]

NewsML-G2 Example:

<subject type="cpnat:abstract" qcode="apcategorycode:a">

  <name>a</name>
</subject>

NITF Example:

<identified-content>
   <classifier type="apcategorycode" value="a"/>
   <classifier type="apcategorycode" value="i"/>
   <classifier type="apcategorycode" value="n"/>
</identified-content>

SlugLine

SlugLine in ANPA combines a shorthand description of the item and version information. Use slugline in both JSON and NewsML-G2 for the shorthand description. For information about identifying and ordering versions of a single content item, see Managing Revisions and Duplicates.

ANPA Example: AP-US-TV-Disney-Wakanda, 1st Ld-Writethru

JSON Example:

"slugline": "AP-US-TV-Disney-Wakanda"

NewsML-G2 Example:

<slugline>BC-US--TV-Disney-Wakanda</slugline>

Date Time

The date and time when this version of the content item was published.

ANPA Examples: 02-02, AP-WF-02-02-21 0119GMT<

JSON Example:

"versioncreated": "2021-02-15T21:35:17Z"

NewsML-G2 Example:

<versionCreated>2021-02-15T21:35:17Z</versionCreated>

NITF Example:

<date.issue norm="20210202T011906Z"/> 

Word Count

Approximate number of words in the textual content; used only for text stories.

ANPA Example: 1016 

JSON Example:

"words": 1016

NewsML-G2 Example:

<remoteContent residref="c5b6ee814c40b5fa8910ddda0db24b0e" href="https://api.ap.org/media/v/content/5a6a970c495a76dd26b6ee7d693927ed.0/download?type=text&format=NITF&tokens" rendition="aprol:story" contenttype="text/xml" format="frmt:nitf" wordcount="1016"/>

Headline

A brief synopsis of the current version of the content item.

ANPA Example: ^Kingdom of Wakanda destined for Disney + streaming service< 

JSON Example:

"headline": "Kingdom of Wakanda destined for Disney + streaming service"

NewsML-G2 Example:

<headline>Kingdom of Wakanda destined for Disney + streaming service</headline> 

NITF Example:

<hedline>

  <hl1 id="headline">Kingdom of Wakanda destined for Disney + streaming service</hl1> 
</hedline>

Linked Photos

Use associations to find available pictures linked to a text story. For more information, see Linked Media

ANPA Example: ^AP Photo transref:CAPM112< 

JSON Example:

"associations": {

  "1": {
    "uri": "https://api.ap.org/media/v/content/37010f57affe458e93d940c0a19dc6f8?tokens",
    "altids": {
      "itemid": "37010f57affe458e93d940c0a19dc6f8",
      "etag": "37010f57affe458e93d940c0a19dc6f8_0a1aza3c0"},
    "version": 0,
     "type": "picture",
    "headline": "Black Panther"}}

NewsML-G2 Example:

<link rel="irel:associatedWith" rank="1" href="https://api.ap.org/media/v/content/37010f57affe458e93d940c0a19dc6f8?format=newsmlg2"/>

Editor's Notes

Editor's notes are important, non-publishable information about the content. The entries may explain changes from a previous version, note embargoes or specify usage restrictions.

 

  Note

 

Publishable editor's notes are no longer provided for new content.

 

 

 

 

ANPA Example:  

^Eds: UPDATES: Adds Tiffani Thiessen, Josh Gad reaction; With AP Photos.< 

 

Advisory: First issued under embargo

JSON Examples:

"ednote": "Advisory: First issued under embargo"

"ednote": "Eds: UPDATES: Adds Tiffani Thiessen, Josh Gad reaction; With AP Photos."

NewsML-G2 Examples:

<edNote>Advisory: First issued under embargo</edNote>

<edNote>Eds: UPDATES: Adds Tiffani Thiessen, Josh Gad reaction; With AP Photos.</edNote>

NITF Examples:

<ed-msg info="Advisory: First issued under embargo"/>

<ed-msg info="Eds: UPDATES: Adds Tiffani Thiessen, Josh Gad reaction; With AP Photos."/>

Byline and Byline Title

The party who created or contributed to the content; for example, a writer for text stories.

ANPA Example:  

^By MARK KENNEDY= 

 

^AP Entertainment Writer= 

JSON Example:

"bylines": [

  {"by": "By MARK KENNEDY",
   "title": "AP Entertainment Writer"}]

NewsML-G2 Example:

<creator>
  <name>
By MICHAEL R. SISAK and MARINA VILLENEUVE</name>
  <related>

       <name role="aprol:BylineTitle">Associated Press</name>
  </related>
</creator>

 ...
<by>By MICHAEL R. SISAK and MARINA VILLENEUVE</by>

 

NITF Example:

<byline>By MARK KENNEDY<byttl>AP Entertainment Writer</byttl></byline>

Dateline

The location where the news event or subject described in the text story occurred.

ANPA Example: NEW YORK

JSON Example:

"located": "New York"

NewsML-G2 Example:

<dateline>New York</dateline>

NITF Example:

<dateline>

  <location>NEW YORK</location>
</dateline> 

Body

Download the NITF rendition from the JSON or NewsML-G2 item metadata for the text of stories, captions, scripts, and shotlists. Within the NITF, see the contents of the <body.content> element.

Summary

Abstract (story summary) is an optional value to which your organization may or may not be entitled. If you are entitled to the summary, it appears in the story body field in ANPA. For more information, see What is Story Summary? How can I get it?

JSON Example:

 

"description_summary": "U.S. industrial production jumped a solid 0.9 percent in October. Factory activity recovered from the previous months' shuttering of assembly lines by Hurricanes Harvey and Irma. The Federal Reserve says that manufacturing activity surged 1.3 percent last month. Many of the gains came from a sharp increase in the production of chemical and petroleum and coal products. Motor vehicles and metals also posted decent gains."

NewsML-G2 Example:

 

<description role="drol:summary">U.S. industrial production jumped a solid 0.9 percent in October. Factory activity recovered from the previous months' shuttering of assembly lines by Hurricanes Harvey and Irma. The Federal Reserve says that manufacturing activity surged 1.3 percent last month. Many of the gains came from a sharp increase in the production of chemical and petroleum and coal products. Motor vehicles and metals also posted decent gains.</description>

NITF Example:

 

<abstract>U.S. industrial production jumped a solid 0.9 percent in October. Factory activity recovered from the previous months' shuttering of assembly lines by Hurricanes Harvey and Irma. The Federal Reserve says that manufacturing activity surged 1.3 percent last month. Many of the gains came from a sharp increase in the production of chemical and petroleum and coal products. Motor vehicles and metals also posted decent gains.</abstract>

Deprecated Item Metadata Fields

The following metadata elements are deprecated and will be removed from all JSON responses in the AP Media API 2.2 release. These fields might continue being populated in the AP Media API 2.1 version; however, their values and availability may change, and they will be removed entirely from the API 2.2 version.

 

  Important

 

Do not create any dependency on the deprecated fields as you migrate to NITF.

 

 

 

Transmission Reference

Deprecated: Do not use altids.transref in JSON.

Recommended: Use altids.itemid for all content. For more information and examples, see Transmission Reference.

Editorial Priority

Deprecated: Do not use editorialpriority in JSON for any media type.

Recommended: Use urgency.

Text Format

  Important

 

textformat (bx, at, ax, bt)  is no longer deprecated and will continue to be maintained. However, for agate (at / ax), we recommend using profile/name="agate".

 

 

 

JSON Example:

"profile": "Agate"

NewsML-G2 Example:

<profile>agate</profile>

Deprecated Functionality

These AP WebFeeds features exist exclusively to support ANPA delivery and will not be available in AP Media API and Agent:

  • Serial Port Integration
  • Saving all versions
  • Semicolon-delimited sports agate