Get promoted videos as promoted tweets


#1

Hi,
Is there any way to pull campaigns with no tweets? for example-I need to pull video campaigns that don`t have tweets,but all I got is campaigns with tweets and those without tweets (i.e. videos)are not pulled at all.

I`m using this endpoint for retrieving campaigns:
https://ads-api.twitter.com/4/accounts/accountid/campaigns

As the Docs say,and according to the Ads API Hierarchy, there is something called cards: “cards, which are expanded creatives that you can add to a tweet.”

Is that mean for Ad Account there is a campaign that has line items, which must include at least one creative.
So do the videos will be in this creative?

Thanks.


#2

I’m not sure I fully understand each of your questions.

In terms of finding video views campaigns without Tweets, you could do the following:

  1. GET accounts/:account_id/line_items and pull all the IDs for "objective": "VIDEO_VIEWS". You can also map the line item ID to it’s corresponding campaign ID.
  2. Use those IDs as a filter in GET accounts/:account_id/promoted_tweets. The ones without a match don’t have Tweets associated with them. You’d have to do the matching on your side.

Cards are specific ad formats that get attached to Tweets. One example is a video website card.

The “creative” (or the ad) is typically a Tweet. The POST accounts/:account_id/promoted_tweets endpoint associates a Tweet with a line item.


#3

Hi @juanshishido,

Thanks for the response but it did not work out and it seems I did not explain my inquiry well.

In the twitter ads there are Levels, Campaign(s) ==> Line Item(s) - Ad group ==> Ads, the ads level contains two types, Tweets and In-stream videos as shown in twitter ads UI ads%20level

The question is how to get the In-stream videos info and analytics via twitter ads API?

Thanks in advance


#4

Thanks for the clarification, @SultanHishUtman.

The question is how to get the In-stream videos info and analytics via twitter ads API?

In order to get the (non-analytics) information about the In-stream videos:

  1. Make a request to the GET accounts/:account_id/media_creatives endpoint. You can optionally scope by line item or campaign ID.
  2. Using the account_media_id values from step 1, make a request to the GET accounts/:account_id/account_media endpoint, specifying the account media IDs in account_media_ids, filtering for "creative_type": "PREROLL".

Here is an example.

$ twurl -H ads-api.twitter.com "/4/accounts/18ce54d4x5t/media_creatives?count=2&sort_by=created_at-desc"
{
  "request": {
    "params": {
      "count": 2,
      "account_id": "18ce54d4x5t",
      "sort_by": [
        "created_at-desc"
      ]
    }
  },
  "next_cursor": "y9w9v2965f7xtfvlu1e68",
  "data": [
    {
      "line_item_id": "cje0d",
      "landing_url": null,
      "serving_status": "ACTIVE",
      "id": "1jz9m",
      "created_at": "2018-09-24T07:19:03Z",
      "account_media_id": "86wax",
      "updated_at": "2018-09-24T07:19:03Z",
      "approval_status": "ACCEPTED",
      "deleted": false
    },
    {
      "line_item_id": "cje0d",
      "landing_url": null,
      "serving_status": "ACTIVE",
      "id": "1jz9n",
      "created_at": "2018-09-24T07:19:03Z",
      "account_media_id": "6yu8s",
      "updated_at": "2018-09-24T07:19:03Z",
      "approval_status": "ACCEPTED",
      "deleted": false
    }
  ]
}
$ twurl -H ads-api.twitter.com "/4/accounts/18ce54d4x5t/account_media?account_media_ids=86wax,6yu8s" | jq
{
  "request": {
    "params": {
      "account_media_ids": [
        "86wax",
        "6yu8s"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "video_id": "13_1014929653729931264",
      "media_url": null,
      "creative_type": "PREROLL",
      "vast_url": null,
      "id": "6yu8s",
      "account_id": "18ce54d4x5t",
      "created_at": "2018-07-05T17:51:02Z",
      "updated_at": "2018-07-05T17:51:02Z",
      "deleted": false
    },
    {
      "video_id": "13_1044040367413362690",
      "media_url": null,
      "creative_type": "PREROLL",
      "vast_url": null,
      "id": "86wax",
      "account_id": "18ce54d4x5t",
      "created_at": "2018-09-24T01:46:42Z",
      "updated_at": "2018-09-24T01:46:42Z",
      "deleted": false
    }
  ]
}

In terms of retrieving analytics for these entities, it’s not currently possible through the Ads API.