How to get all ads image and ads text from campaign



Hello !

I am newbie in Twitter Ads API.
I am trying to get ads image and ads text from some special campaign but i didnot find any way to do that.
Please advise.


Hi LeTung.

Can you provide more detail of what you’re doing here? Not sure what a special campaign is.

If you’re attempting to get image + text off a tweet, you may be able to query the tweet directly, using one of the following two APIs:


Hi @rchoi

My work is from campaign id, get list of creative image and ads text.
i saw that i can get image of the card with
but how to get the card associate with campaign id ?
and if the promoted tweet didnot use card, how can i get ads text and image from campaign id ?


Thanks for the quick reply!

If you’re starting with campaign ID, i believe you’ll need to do a bit of traversal. Specifically:

1.) A campaign has multiple line items
2.) Each line item item is associated to tweets (perhaps all the same, perhaps different) via a promoted_tweet

Therefore, if you are starting with the campaign ID, you can get line items with this call:

And once you have the set of all line items, you can get the promoted tweets (and therefore the tweets) by line items in this call:

Then you can get the tweets themselves with this call:

The only remaining (and tricky) part is that we don’t have an easy tweet-to-card lookup. You can get the http URL from the tweet itself, parse out the ID, and do a reverse lookup of the card with the specific card detail call:

How to get all ads image and ads text from campaign

Thank you @rchoi

It is very helpful for me.

I will try it right now.


This topic was automatically closed after 24 hours. New replies are no longer allowed.