Wires via AP Media API
For election wires using the AP Media API, see Election Wires via AP Media API.
Associated Press provides the Media API interface as the main access point into AP content.
The News Wire Profiler > Wires via AP Media API window is the mechanism by which ENPS system administrators input their API key and then choose from a list of AP products available to them under their organization's contract.
Create a Wire via AP Media API
Follow these steps to create an AP Media API feed as a wire, selecting APMEDIAAPIFEEDS as the New Wire type:
-
Open News Wire Profiler.
-
Select File > New Wire to open the New Wire popup.
-
Select the desired wire type from the list.
-
Click OK.
A new wire window appears. Click More to expand the window to show settings for the new wire.
Configure an AP Media API wire
To configure an existing AP Media API wire:
-
Open News Wire Profiler.
-
Open the wire.
-
Click More to expand the window to show wire settings, if not already expanded.
-
Ensure that the Active checkbox is not ticked.
-
Configure the wire as required.
See Settings for configuration details.
Use the Active checkbox to activate or deactivate the wire.
For diagnostic purposes, you can configure the NWP to re-ingest previously captured Media API data from a text file. Open a Media API wire, clear the Active checkbox, and press Ctrl T.
Settings
Field | Description |
---|---|
Get Member Content |
Not used. |
Server URL |
Set to https://api.ap.org |
API Key |
API credentials provided by AP, for example on AP Newsroom. |
Provider |
Set to AP or other custom setting as needed. Although multiple products can be added to each Media API wire, each wire may only have one Provider code. To use multiple Provider codes, create a separate Media API wire for each code. |
Cat Map |
Set to NAA or other custom setting as needed. |
Available Products |
Click Click to Refresh to update the Available Products list. To include an AP product from the list, select it then click ADD. The product will appear in the Products to Display column. Do not include any product containing Video, Audio or Photo in the product name as these do not include displayable text. A warning message is displayed if too many products are included in a single Media API wire. This is done to avoid URL length restrictions in the query that the NWP sends to the Media API server. If you see the warning message, you will either need to remove some products or create a second Media API wire in the NWP. There is no specific limit to the number of products you can add to the Media API wire since the length of the request URL is determined by several variables including the length of the Media API account name and password, certain optional settings in the NWP, and the length of the product codes that were selected. Individual stories delivered via Media API may include multiple category codes. By default, a separate version of the story is saved for each included category (e.g. sports, business, general news). This behavior can be changed using the DupeStoryThreshold setting in the [NWP] section of the NWP.INI. For more information on this setting refer to NWP Configuration Settings. |
Products to Display |
To remove a product from the Products to Display list, select it then click REMOVE. |
Check For Updates Every |
Interval at which the ENPS client will check for updated data from the AP Media API server. |
Timeout |
Length of time the ENPS client will wait for a response from the AP Media API server before it closes the connection. |
Max Entries Per Request |
Largest number of stories that may be downloaded at one time. The maximum allowed value is 100. |
Suppress notification of duplicate stories |
Suppresses the creation of an entry in \NWP\NWP.log on the ENPS WORK drive when duplicate stories are detected. By default, the ENPS client deletes duplicate wires. |
Autoflatten Headlines |
Set ENPS Client to request both the headlines and the individual stories referenced in an AP Media API package of headlines such as 'Top U.S. Headlines'. If unchecked, the ENPS client will only request the headline package, not the referenced stories that are contained in other feeds. This is the default behavior. Enabling this option will increase the amount of network traffic. |
Capture |
Save AP Media API XML data to the server. This is useful for troubleshooting problems with the wire, but should not be enabled unless you are directed to do so by ENPS Support |
Category-based kill, Wire- based kill |
Select Category-based to purge individual stories based on their category (see Window > Configuration > Expiration Times) . Select Wire-based to purge all stories at a specified time after ingestion. Define using the Days and Hours textboxes. |
Story Format |
Select MediaAPI_v3.0_Story and MediaAPI_v3.0_Storybody respectively in the two dropdown menus. |