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:
- Make a request to the GET accounts/:account_id/media_creatives endpoint. You can optionally scope by line item or campaign ID.
- 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.