|
Getting Started with AP Media API
If
you are looking for Developer documentation, you are in the right
place. |
|
|
|
Content Available via AP Media API
For the first time, you can access all your licensed multimedia content
programmatically through a simple API.
Receive a continuous feed
of news content or perform granular searches across archives of all
media types. To learn more, see Feed
or Search? and check out example API requests.
Media types include text/story
with linked curated content, pictures, graphics, video and audio.
30 days of content is
available, as well as the full library of current and archive picture,
video, audio and graphics content.
Content
item pricing based on your contract is returned upon request.
Note |
|
AP Media API supports
the same content as AP
Newsroom, depending on your contract terms. Please refer to
contract information for details and contact your AP Sales or
Licensing representative with any questions. |
|
|
|
API Security Requirements
HTTPS Access
HTTPS with TLS 1.2 or 1.3 is supported for all API calls.
API Key
in the Request Header
An API key is the access key required for making API calls.
You can authorize your API request by specifying your
API key in the x-api-key HTTP request header.
The x-apikey header is also currently supported.
No Browser-Based Integrations
Important |
|
The AP advises against
building browser-based integrations that directly call the AP
Media API. Such integrations are vulnerable to the evolving landscape
of browser security policies and inherently expose more security
vulnerabilities. You must integrate
through your own secure middleware that aligns with best security
practices and allows for better support. For these reasons, the
AP is unable to support customers who choose to call Media API
directly from a browser. |
|
|
|
Account Quotas
API requests are subject to quotas, which limit the number of calls
per minute and/or per day.
If you exceed your quota, you may experience delays
in content and/or delivery disruptions. To learn more, see Staying Under Your Quota Limits.
API Explorer
The Swagger-based API
Explorer
is an interactive quick reference that lists the API calls and parameters
and allows for testing live API calls and generating sample code.
URL Encoding
Important |
|
Make sure that your
request URIs are URL-encoded. |
|
|
|
The AP Media API documentation shows unencoded request URLs for readability;
however, all request URLs must be URL-encoded when you are making API
calls.
Accessible Port and Site Requirements
To successfully integrate with Media API, your system must allow:
Bidirectional access to
port 443 (HTTPS) and 80 (HTTP; not required if only HTTPS
is used) for api.ap.org and
mapi.associatedpress.com
Redirects (302)
from api.ap.org to mapi.associatedpress.com
GET and POST access to
api.ap.org
|
|