How to map GUI id to API id for promoted tweets?


#1

Hello,
When I export my data from the GUI for promoted tweets, there is no ID, only a Status ID# in the format #609423836832######.
But when I hit the REST endpoint https://ads-api.twitter.com/0/accounts/[act ID]/promoted_tweets, I get back entries with id’s like 1lyy1, 1ngnv, and similar.

How do I map what I’m seeing in this request back to the GUI? I’m trying to pull stats using a list of promoted tweet id’s, but my account has hundreds of them and it maxes out the API limit constantly, so I need to figure out how to pare down what I’m querying for.

Thank you,
-Daniel


#2

Hey Daniel,

The Status ID’s provided from the GUI data export will map to the the tweet_id returned inside of each of the promoted tweet objects from the GET call to https://ads-api.twitter.com/0/accounts/:account_id/promoted_tweets. See the below example.

{
  "request": {
    ...
    }
  },
  "data": [
    {
      "line_item_id": "2dfxf",
      "id": "6zmd1",
      "paused": false,
      "created_at": "2015-04-22T17:25:06Z",
      "updated_at": "2015-04-22T17:25:06Z",
      "approval_status": "ACCEPTED",
      "tweet_id": "569185240197033984", <--------------------------------
      "deleted": false
    },
  ],
  "data_type": "promoted_tweet",
  "total_count": 1,
  "next_cursor": null
}