Followed Topics

 

ON THIS PAGE      Show

 

 

 

 

Description

Returns personal Followed Topics for your account in JSON or CSV format. Only the personal Followed Topics for which a feed was created in AP Newsroom are returned.

Request

Required Request Header

  • x-api-key. Specifies the API key to authorize the request. The x-apikey header is also currently supported.

Optional Request Header

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

Request URI

  • Method: GET
  • Request URI (must be URL-encoded):

    https://api.ap.org/media/v[{version}]/account/followedtopics

Base URI Parameter

  • version (optional). The API version; for example, 2.0. When this parameter value is not specified, the API version set as default for your account is returned.

Optional Parameter

  • format. The response format (json or csv). By default, JSON is returned.

Request URI Example

https://api.ap.org/media/v/account/followedtopics

Response

The Followed Topics method returns the standard HTTP status code of "200 - OK" and feed-enabled personal Followed Topics for the specified API key in the requested format (JSON or CSV).

If CSV is requested, the default file name format is followed_topics_date.csv; for example, followed_topics_2018-09-06.csv.

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."
  • api_build. The API build number.
  • id. The response ID.
  • method. The API method name and HTTP method.
  • org_name. Organization name.
  • params. Parameters used in the API request.
  • data. Contains the data and metadata associated with the response.

Response Descriptive Properties

  • id. The Followed Topics URL.
  • title. The response name.
  • updated. The date and time (in UTC) when the response was generated.
  • followedtopics. Contains your Followed Topics for which a feed was created in AP Newsroom.
    • id. The Followed Topic ID.
    • name. The Followed Topic name.

Sample Response

{
    "api_version": "2.0",
    "api_mode": "live",
    "api_build": "2.0.2", 
    "id": "B1lxSm2Av7",
    "method": "/account/followedtopics.GET",
    "org_name": "My Organization",
    "params": {},
    "data": {
        "id": "https://api.ap.org/media/v/account/followedtopics",
        "title": "My Followed Topics",
        "updated": "2020-07-02T14:01:27.728Z",
        "followedtopics": [
          {
            "id": "714005",
            "name": "Italy Earthquake"
          },
          {
            "id": "714006",
            "name": "Soccer"
          }
       ]
    }
}