Ads API Python SDK - Getting Tweet Text


Is there a way to retrieve the Text of a Tweet from within the Ads API v1 (I am using the Python SDK)? Or is it only available via the Get Status call from the REST API (e.g. using Tweepy)? Using the REST API, I encounter a rate limit very quickly compared to just using the Ads API alone.



Hi @stevea.jones! There isn’t. Only available through the REST API, like you said.


If you are talking about displaying the tweet text of promotable tweets available to the user from Ads API perspective then scoped_timeline is what you want to pull the list of tweets from anyway:

def scoped_timeline(self, *id, **kwargs):
Returns the most recent promotable Tweets created by the specified Twitter user.


Thanks for your replies.

I am looking for the promoted tweets (not promotable). Specifically, I am trying to retrieve the Tweet ID, Line Item ID and the Tweet Text. If using the REST API causes issues with rate limits, I may be able to get the tweet text by calling Tweet.preview for each promoted tweet and parsing out the appropriate section of the HTML. But this seems like a very roundabout way to get it.

Also, I am using the Python SDK (v1) but I do not see the Promoted Tweet endpoint (accounts/:account_id/promoted_tweets) in the Account class. I have added my own but should I be using another?