Skip to content


Returns a feed of content items that have been sent to your organization's On-Demand queue from AP Newsroom. The returned content items are sorted in chronological order by date/time when they were added to the On-Demand queue, with the newest items at the bottom of the feed.


If you are receiving On-Demand items and have an unlimited subscription plan, pricing is typically not applicable. If you have a non-subscription plan, you are billed for the On-Demand items in AP Newsroom.


  • Method: GET
  • Request URI (must be URL-encoded):[{version}]/content/ondemand?apikey={apikey}[{optional_parameters}]

Base URI Parameter

  • version (optional). The API version; for example, 4 or 4.1. When this parameter value is not specified, the API version set as default for your account is returned. For more information, see API Versions.

Optional Parameters


An implied AND operator is used between the parameters.

  • consumer_id: A user-defined identifier for the consumer of this feed; for example, two different client applications that process items in your On-Demand queue. You can use any value you prefer; for example, python_script, prod_agent and so on. Each unique consumer ID will receive every item in your organization's On-Demand queue once. By default (if this parameter is not specified), the API key of the request is used.

  • include, exclude. Parameters used to customize the fields returned in the response. For more information, see Customizing Response Fields.

  • text_links. Specifies the format of the text renditions (stories, captions, scripts and shotlists) to return in the response. For stories, the valid value is nitf (NITF) or anpa (ANPA 1312). For captions, scripts and shotlists, the valid value is nitf (NITF). The value of all returns all available formats (this is the default).

  • page_size. The maximum number of results to return per page. The default is 10 results with a maximum of 100 per page.

Request Header (Optional)

  • Accept-Encoding. Compresses the response to the gzip format. The valid value is gzip.

Request URI Examples{apikey}


The On-Demand method returns the standard HTTP status code of "200 - OK" and a feed of content in the JSON format.

Each feed entry includes the content item ID, a requested set of metadata and links to all renditions of the content item (for example, thumbnail, preview and high-resolution versions of a picture).

For information about error codes, see API Codes.

Response Headers

  • x-mediaapi-Q-name. The API method to which the throttle/quota applies (corresponds to the "method" property returned by Account Quotas. Possible values are search, feed, account, download, ondemand, item, other.

  • x-mediaapi-Q-secondsLeft. The number of seconds remaining in the current period.

  • x-mediaapi-Q-used. Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 1/6.

  • x-mediaapi-QDay-minutesLeft. (Optional; returned if a per-day quota is configured) The number of minutes remaining in the current period.

  • x-mediaapi-QDay-used. (Optional; returned if a per-day quota is configured) Indicates the current usage and limit (the maximum number or calls allowed during the period), in the format {usage}/{limit}; for example, 2/5000000.

Top-Level Properties

  • api_version. The API version.
  • api_mode. The API mode; for example, "live" or "preview."
  • id. The response ID.
  • method. The API method name and HTTP method.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • updated. The date and time (in UTC) when the response was generated.
  • current_item_count. The number of items on the current page.
  • next_page. A link to the next page of the feed.


    To check for any updates since your previous request, it is strongly recommended that your client application use the "next_page" link returned in the feed response for the next request. For more information, see Using Next Request Links for Content Updates.

  • items. Contains all of the items on this page.

Item Descriptive Properties

  • meta. Contains the non-content specific metadata for an item.

    • products. Contains AP products or packages to which the content item belongs.
      • id. The product or package ID.
      • name. The product or package name.


    The "products" property is not returned by default. Use the include parameter to include this property in the response.

  • item. Content-specific data and metadata for a content item. For more information, see Content Metadata Fields.

Sample Feed Response

This example shows a response to the following request:{apikey}

  "api_version": "4.1",
  "api_mode": "live",
  "id": "S1KfSHJBX",
  "method": "/content/ondemand.GET",
  "params": { },
  "data": {
    "updated": "2018-08-01T15:13:26.752Z",
    "current_item_count": 1,
    "next_page": "",
    "items": [
        "meta": { },
        "item": {
          // On-Demand content item metadata and download links