We are releasing an update to the Ads API to improve performance of the Cards endpoint.

Reducing Maximum Count

Effective July 14, we will reduce the maximum count value from 1000 to 200 within the Cards endpoint. This change will help developers avoid request time out errors which can occur when queries fail due to the count value being too large.

Once this change is enacted, advertisers attempting to use a count value greater than 200 will hit an error message that will block their request.

Key notes:

  • This change will be applied to values associated with the count parameter within the Cards endpoint.

  • Existing queries with a count value greater than 200 will need to be manually adjusted prior to July 14. Queries that are not updated with a valid count value will break once the new maximum is enforced.

This change will occur on July 14, so we recommend developers make any necessary changes prior to this date.

Example Request using count:

twurl -H ads-api.twitter.com "/11/accounts/18ce54d4x5t/cards?count=1"
{
  "request": {
    "params": {
      "count": 1,
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": "8wzvldqtc",
  "data": [
    {
      "name": "swiss FIKA",
      "components": [
        {
          "media_key": "13_1524511998142164992",
          "media_metadata": {
            "13_1524511998142164992": {
              "type": "VIDEO",
              "url": "https://video.twimg.com/amplify_video/1524511998142164992/vid/640x360/9PGHqWTmoOVQEj5Z.mp4?tag=14",
              "width": 3840,
              "height": 2160,
              "video_duration": 12053,
              "video_aspect_ratio": "16:9"
            }
          },
          "type": "MEDIA"
        },
        {
          "title": "Twitter",
          "destination": {
            "url": "https://www.twitter.com",
            "type": "WEBSITE"
          },
          "type": "DETAILS"
        }
      ],
      "id": "1524529453904240640",
      "created_at": "2022-05-11T23:18:40Z",
      "card_uri": "card://1524529453904240640",
      "updated_at": "2022-05-11T23:18:40Z",
      "deleted": false,
      "card_type": "VIDEO_WEBSITE"
    }
  ]
}

To learn more about Cards, check out this page.

Please let us know if you have any questions.

Twitter Ads API team

1 Like