AP Media API

The AP Media API provides access to AP's digital media assets including photos, videos, and graphics from AP's global newsgathering operations. Enables integration with digital asset management systems and content management platforms for news organizations.

OpenAPI Specification

associated-press-meda-openapi-original.yml Raw ↑
openapi: 3.0.1
info:
  title: Associated Press AP Media API
  description: |-
    AP's next generation content API.
  version: "2.2"
externalDocs:
  description: Developer's Guide
  url: http://api.ap.org/media/v/docs/api/
servers:
  - url: //api.ap.org/media/v
security:
  - apikey: []
    apikeyUrl: []
paths:
  /content/{item_id}:
    get:
      tags:
        - Content
      summary: Associated Press Single item metadata lookup
      description: |
        Fetch the 'contentitem' object for a single piece of content by its Item ID.
      parameters:
        - name: item_id
          in: path
          description: |
            The itemid of the desired piece of content
          required: true
          schema:
            type: string
        - name: include
          in: query
          description: Comma separated list of fields to include from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: exclude
          in: query
          description: Comma separated list of fields to exclude from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: pricing
          in: query
          description: Whether to include pricing information with the results
          schema:
            type: boolean
        - name: in_my_plan
          in: query
          description: Specifying in_my_plan=true in the request returns only those associations of the content item that do not incur any additional cost to download.
          schema:
            type: boolean
        - name: format
          in: query
          description: The desired response format
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/contentresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /content/search:
    get:
      tags:
        - Content
      summary: Associated Press Search for AP content
      description: |
        Searches AP Content and returns `ContentItem` objects.
        Use the optional query param of **q** to filter the set of content
      parameters:
        - name: q
          in: query
          description: Your query
          allowEmptyValue: true
          schema:
            type: string
        - name: include
          in: query
          description: Comma separated list of fields to include from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: exclude
          in: query
          description: Comma separated list of fields to exclude from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: sort
          in: query
          description: Your desired sorting criteria
          schema:
            type: string
            default: _score:desc
        - name: page
          in: query
          description: The desired page number. Page numbers begin at 1
          schema:
            type: string
        - name: page_size
          in: query
          description: Number of items to return per page
          schema:
            type: integer
        - name: pricing
          in: query
          description: Whether to include pricing information with the results
          schema:
            type: boolean
        - name: in_my_plan
          in: query
          description: "Specifying in_my_plan=true in the request returns only those items that do not incur additional cost to download. Additionally, items returned include only those associations that do not incur any additional cost to download."
          schema:
            type: boolean
        - name: session_label
          in: query
          description: Attach an informational label to this session
          schema:
            maxLength: 48
            minLength: 1
            pattern: "^[a-zA-Z0-9_. -]*$"
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /content/feed:
    get:
      tags:
        - Content
      summary: Associated Press Receive a feed of incoming AP content
      description: |
        Receive a feed of AP Content as 'contentitem' objects.
        Use the optional query param of **q** to filter the set of content
      parameters:
        - name: q
          in: query
          description: Your query
          allowEmptyValue: true
          schema:
            type: string
        - name: include
          in: query
          description: Comma separated list of fields to include from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: exclude
          in: query
          description: Comma separated list of fields to exclude from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: page_size
          in: query
          description: Number of items to return per page
          schema:
            type: integer
        - name: pricing
          in: query
          description: Whether to include pricing information with the results
          schema:
            type: boolean
        - name: in_my_plan
          in: query
          description: "Specifying in_my_plan=true in the request returns only those items that do not incur additional cost to download. Additionally, items returned include only those associations that do not incur any additional cost to download."
          schema:
            type: boolean
        - name: with_monitor
          in: query
          description: Apply the named Monitor to subsequent calls for this session
          schema:
            maxLength: 24
            minLength: 4
            pattern: "^[a-zA-Z0-9_.-]*$"
            type: string
        - name: session_label
          in: query
          description: Attach an informational label to this session
          schema:
            maxLength: 48
            minLength: 1
            pattern: "^[a-zA-Z0-9_. -]*$"
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /content/rss:
    get:
      tags:
        - Account
        - Content
      summary: 'Associated Press Retrieve a list of available RSS XML feeds entitled to your plan.'
      description: |
        (Successful responses always in XML)
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rssresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/rssresponse'
        "304":
          description: "Successful response, Not Modified"
          content: {}
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /content/rss/{rss_id}:
    get:
      tags:
        - Content
      summary: Associated Press Receive a RSS feed of latest AP content
      description: |
        Receive a RSS feed of latest AP Content for a Product (RSS) Id.
        Use optional **include** and **exclude** to tailor the response.
      parameters:
        - name: rss_id
          in: path
          description: "The product ID for the desired RSS feed (see /content/rss) \n"
          required: true
          schema:
            type: integer
        - name: include
          in: query
          description: Comma separated list of fields to include from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: exclude
          in: query
          description: Comma separated list of fields to exclude from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: page_size
          in: query
          description: Number of items to return per page
          schema:
            type: integer
      responses:
        "200":
          description: Successful response
          content: {}
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /content/ondemand:
    get:
      tags:
        - Content
      summary: Associated Press Receive a feed of AP content items which have been sent to your organization's OnDemand queue.
      description: |
        Receive a feed of 'contentitem' objects which have been sent to your organization's OnDemand queue.
      parameters:
        - name: consumer_id
          in: query
          description: |-
            A user defined identifier for the consumer of this feed.
            Each unique consumer ID will receive every item in your organization's OnDemand queue once.
            If not specified, the API key of the request will be used.
          schema:
            type: string
        - name: queue
          in: query
          description: The ID of the desired queue.
          schema:
            type: string
        - name: include
          in: query
          description: Comma separated list of fields to include from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: exclude
          in: query
          description: Comma separated list of fields to exclude from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: page_size
          in: query
          description: Number of items to return per page
          schema:
            type: integer
        - name: pricing
          in: query
          description: Whether to include pricing information with the results
          schema:
            type: boolean
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/feedresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /account:
    get:
      tags:
        - Account
      summary: Associated Press View available account endpoints
      description: |
        Retrieve your available account endpoints
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /account/followedtopics:
    get:
      tags:
        - Account
      summary: Associated Press View your Followed Topics
      description: |
        Retrieve your Followed Topics
      parameters:
        - name: format
          in: query
          description: '''json'' is the default. Use ''csv'' for simplified CSV output/download.'
          schema:
            type: string
            enum:
              - json
              - csv
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountfollowedtopicsresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /account/plans:
    get:
      tags:
        - Account
      summary: Associated Press View your plans and meters
      description: |
        Retrieve your entitlements and associated meter information
      parameters:
        - name: include
          in: query
          description: Comma separated list of fields to include from the response.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: exclude
          in: query
          description: Comma separated list of fields to exclude from the response.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: format
          in: query
          description: '''json'' is the default. Use ''csv'' for simplified CSV output/download.'
          schema:
            type: string
            enum:
              - json
              - csv
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountplansresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /account/downloads:
    get:
      tags:
        - Account
      summary: Associated Press View your order history.
      description: "A list of content items downloaded by you or your salesperson.  \n\n**Important:**\n- The requested date range may not exceed 60 days.\n- The download information is available for the last 365 days only.\n"
      parameters:
        - name: include
          in: query
          description: Comma separated list of fields to include from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: exclude
          in: query
          description: Comma separated list of fields to exclude from the response
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: min_date
          in: query
          description: "The date and time after which the content items were downloaded, in the format\nYYYY-MM-DD(THH:mm:ss) or YYYY-MM.  \nThe default is 30 days prior to the time of the request.\nSimple ISO-8601 Duration notation can also be used to define the date relative to today."
          schema:
            type: string
        - name: max_date
          in: query
          description: "The date and time before which the content items were downloaded, in the\nformat YYYY-MM-DD(THH:mm:ss) or YYYY-MM.  \nThe default is the time of the request.\n"
          schema:
            type: string
        - name: order
          in: query
          description: The ID of the desired order to return. The correct date-range must be provided.
          schema:
            type: integer
        - name: format
          in: query
          description: '''json'' is the default. Use ''csv'' for simplified CSV output/download'
          schema:
            type: string
            enum:
              - json
              - csv
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountdownloadsresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /account/quotas:
    get:
      tags:
        - Account
      summary: Associated Press View your API request limits.
      description: Returns the your account's request limits for the various endpoints
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accountquotasresponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
  /account/monitors/create:
    post:
      tags:
        - Monitors and Alerts
      summary: Associated Press Create a new Monitor
      description: |
        Create a new Monitor, success response is a 'keyresponse'
      requestBody:
        description: An object defining specific conditions to Alert on and how that Alert should be delivered.
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/monitor'
        required: true
      responses:
        "200":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/monitorsResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "404":
          description: "Not Found - the app, api, plan, stage or key does not exist in the context of other request parameters"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
      x-codegen-request-body-name: monitor
  /account/monitors/{monitorId}/update:
    post:
      tags:
        - Monitors and Alerts
      summary: Associated Press Update a Monitor
      description: |
        Update an existing Monitor
      parameters:
        - name: monitorId
          in: path
          description: |
            The unique name or ID of the Monitor
          required: true
          schema:
            type: string
      requestBody:
        description: An object defining specific conditions to Alert on and how that Alert should be delivered.
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/monitor'
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/monitorsResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "404":
          description: "Not Found - the app, api, plan, stage or key does not exist in the context of other request parameters"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
      security:
        - apikey: []
        - apikeyUrl: []
      x-codegen-request-body-name: monitor
  /account/monitors/{monitorId}/delete:
    delete:
      tags:
        - Monitors and Alerts
      summary: Associated Press Delete a Monitor
      description: |
        Delete an existing Monitor
      parameters:
        - name: monitorId
          in: path
          description: |
            The unique name or ID of the Monitor
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: '#/definitions/monitorsResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "401":
          description: Invalid Auth
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "404":
          description: "Not Found - the app, api, plan, stage or key does not exist in the context of other request parameters"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorresponse'
        "500":
          description: Internal Server Error
          content:
        

# --- truncated at 32 KB (110 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/associated-press/refs/heads/main/openapi/associated-press-meda-openapi-original.yml