Migration Guide for AP Content API Users
Use
this guide if you are migrating to AP Media API from AP Content
API. |
|
|
|
Highlights
Content. AP Media API offers
more media types and a global search for all media types in the same
API request:.
More supported media types.
Content available via AP Media API includes not only pictures,
graphics and video as in AP Content API, but also audio and text
with linked curated media.
Global search for all media types.
While AP Content API requires separate search requests for images
and video, AP Media API allows you to search for content of any
media type (picture, graphic, video, text and/or audio) in the
same API request.
Workflow. AP Media API supports
the same typical
workflow and major functionality currently available in AP Content
API, including search, content item downloads, full item metadata,
account information and optional content item pricing.
Create a feed to get new content.
You can now turn your search into a feed. This allows you to get your
most recent licensed content that meets your search criteria.
Formats. AP Media API supports
the same formats for content file downloads as AP Content API and
delivers responses for all API methods in JSON (in AP Content
API, JSON is not available for full item metadata responses).
Metadata. You can control
which metadata fields are returned in the feed response using the
include and/or exclude parameters (see Customizing
Response Fields).
Typical
Workflow

Run a search. When an editor
performs a search in your editorial system, your custom program searches
the content available via the API and displays search results along
with key metadata. Content
item pricing is returned upon request. View
example >>
Pick a result to view metadata.
When an editor selects a search result, your custom program retrieves
full content metadata (optionally, with pricing) from the API. View
example >>
Download content. When an
editor wants to download a content file, your custom program downloads
the requested content file from the API. View
example >>
Review your account information.
When an editor wants to check how many downloads available for your
plan have already been used or download your order history, your custom
program retrieves your plan and usage information or order history
from the API. View
example >>
Sample Calls for Typical Workflow
Run
a Search
Run a search (optionally, with pricing). This example shows a search
for pictures that match both keywords ("Emma" and "Stone"),
with the optional pricing parameter in square brackets [ ] .
AP Content API
https://api.ap.org/v2/search?apiKey={apiKey}&q=Emma+Stone[&showPricing=true]
https://api.ap.org/media/v/content/search?apikey={apikey}&q=Emma+Stone+AND+type:picture[&pricing=true]
For more information about searching in AP Media API, see Search.
Pick a result to view full metadata (optionally, with pricing) by following
the item metadata link from search results.
Tip
|
|
Item metadata links in
search results do not include the pricing
parameter. To display pricing in item metadata responses, make
sure to add the pricing parameter to
item metadata links. |
|
|
|
AP Content API
https://api.ap.org/v2/item/954acdae81de484294bb7a9831076cfe?apiKey={apiKey}[&showPricing=true]
https://api.ap.org/media/v/content/954acdae81de484294bb7a9831076cfe?apikey={apikey}[&pricing=true]
For more information about:
Download
Content
Download the requested content file from the API by following the download
links in search results.
Tip
|
|
Item rendition download
links cannot be constructed manually because they contain tokens
that specify the rendition type, format and additional details
required to download each rendition. Use item rendition download
links available in search results. |
|
|
|
AP Content API
https://bapi.ap.org/v2/item/photo/954acdae81de484294bb7a9831076cfe?apiKey={apiKey}[&showPricing=true]
https://api.ap.org/media/v/content/954acdae81de484294bb7a9831076cfe/download?apikey={apikey}
For more information, see Item Rendition
Download.
Check your plan and usage information or download order history.
AP Content API
https://api.ap.org/v2/account?apiKey={apiKey}
https://api.ap.org/media/v/account?apikey={apikey}
For more information, see Account.
Plans and Usage
AP Content API
https://api.ap.org/v2/account/plans?apiKey={apiKey}[detail=tiers]
https://api.ap.org/media/v/account/plans?apikey={apikey}
For more information, see Account
Plans.
Download History
AP Content API
https://api.ap.org/v2/account/orders?apiKey={apiKey}
https://api.ap.org/media/v/account/downloads?apikey={apikey}
For more information, see Download
History.
|