Hello,

I am using below endpoint to get the promoted tweet information.

https://ads-api.twitter.com/10/accounts/:account_id/promoted_tweets&counts=200

using this endpoint to get the promoted tweets of an account. The account which I am using belongs to an organization and has many promoted tweets. When I hit this
endpoint I do get only few records and don’t see any promoted tweet from year 2021, even though we have so many in this year. Please see the response below

{
  "request": {
    "params": {
      "promoted_tweet_id": "1efwlo",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "96uzp",
    "id": "1efwlo",
    "entity_status": "ACTIVE",
    "created_at": "2020-06-29T05:06:57Z",
    "updated_at": "2020-06-29T05:08:46Z",
    "approval_status": "ACCEPTED",
    "tweet_id": "880290790664060928",
    "deleted": false
  }
}

Now based on the line_item_id from above response I hit the below endpoint. The below endpoint is giving null for all metrics, when it should give value for metrics, impressions, engagements, retweets, replies, likes, user profile clicks etc as I have the data for those metrics for those mentioned dates.

https://ads-api.twitter.com/10/stats/accounts/18ce54d4x5t?entity=LINE_ITEM&entity_ids=96uzp&start_time=2021-03-12T00:00:00Z&end_time=2021-03-16T00:00:00Z&granularity=TOTAL&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT,MEDIA

{
“data_type”: “stats”,
“time_series_length”: 1,
“data”: [
{
“id”: “96uzp”,
“id_data”: [
{
“segment”: null,
“metrics”: {
“impressions”: [
null
],
“tweets_send”: null,
“qualified_impressions”: null,
“follows”: null,
“app_clicks”: null,
“retweets”: null,
“likes”: [
null
],
“engagements”: [
null
],
“clicks”: [
null
],
“card_engagements”: null,
“poll_card_vote”: null,
“replies”: null,
“carousel_swipes”: null
}
}
]
}
],
“request”: {
“params”: {
“start_time”: “2017-05-19T07:00:00Z”,
“segmentation_type”: null,
“entity_ids”: [
“96uzp”
],
“end_time”: “2017-05-26T07:00:00Z”,
“country”: null,
“placement”: “ALL_ON_TWITTER”,
“granularity”: “TOTAL”,
“entity”: “LINE_ITEM”,
“platform”: null,
“metric_groups”: [
“ENGAGEMENT”,
“MEDIA”
]
}
}
}

Can you please help me to understand what I am missing in both cases

Summary

This text will be hidden

. Any help is much appreciated.

Thanks,
Sachin

I would recommend reviewing the Active Entities guide to help identify which entities have been updated within a given window. This should help identify the subset of ads entities that have been updated within a specific timeframe and optimize how your application fetches data.

Let me know if you have any trouble fetching promoted metrics after adopting this API.

@osowskit1 … thanks for the response. I have gone through the Active Entities | Docs | Twitter Developer Platform API. I hit the below URL

https://ads-api.twitter.com/10/stats/accounts/account_id/active_entities?entity=PROMOTED_TWEET&start_time=2021-10-05T00:00:00Z&end_time=2021-10-11T00:00:00Z

The response I am getting is like this

"data": [
    {
      "entity_id": "2r0wxw",
      "activity_start_time": "2021-10-05T20:55:20Z",
      "activity_end_time": "2021-10-05T03:43:56Z",
      "placements": [
        "ALL_ON_TWITTER"
      ]
    }

First of all I did not understand what is the  "activity_start_time" and "activity_end_time" here. Also how does I will get to know "entity_id": "2r0wxw" belongs to which Tweet?

This is so confusing and not taking me anywhere to what I am expecting for Promoted API. Kindly help.

Thanks

To fetch the Promoted Tweet’s performance data for 2r0wxw, you will need to pass this into the analytics endpoints with the activity_start_time (rounded down) as the start_time and activity_end_time (rounded up) as the end_time. This ensures your platform is pulling all metrics for that entity.

how does I will get to know “entity_id”: “2r0wxw” belongs to which Tweet

The Active Entities is returning Promoted Tweets based on the entity=PROMOTED_TWEET parameter that was passed in. Your application can access the Promoted Tweet (and the Tweet ID) using the GET accounts/:account_id/promoted_tweets endpoint.