How to get Imp,click,mobie_app_conversion by CAMPAIGN and Creatives



I am working on developing up Dashboard to manage Twitter Ads , MAP.
But I m not sure how to get the data with Ads API.
I want to retrieve Impression , click , install(mobie_app_conversion) by CAMPAIGN and Creatives.

I have already granted DEVELOPER ACCESS.

If anyone know how to retrieve that data , please show me how to do that.



Hi @quicknewsofapps,

Here you’ll get all the information you need:


Thanks !

I checked but i just got JSON file with no data.

my code is here ,Python.

#account id
#cpn id
#end time T17%3A00%3A00Z’
#start time
#segmentation type


Do you know why this happens?


Maybe you have no data in that time interval?..



I have data.
I can see data from TW dashboard.

The JSON file contains this response.



If I remember correctly, the synchronous analytics endpoint in v1 is limited to a 7 day range. What version of the API are you using? v0 or v1?


I think version 1
And i think im using Asynchronous analytics. id?

Ad Level Cost, Impressions & Clicks

So, to confirm, you first make a POST request to create an asynchronous job and then get the job data once it’s done?


I did know that.

I just did use GET only.

So first , POST and get Job ID and then , GET data?


If you only did a GET, then you used the synchronous endpoint. For asynchronous is POST to create a job and then GET the job’s data once it’s done.

POST to create the async job:

But it’s ok if you used the synchronous endpoint, as long as you don’t need segmentation as this can only be done with the asynchronous method.

I recommend you post a twurl example, including your account id and entity ids as these are not sensitive information, so, hopefully, a Twitter Staff can check.



I will try post and then get.
And im confusing what entity id is.
Does entity id equal CAMPAIGN id ?


entity id = campaign id or line item id or promoted tweet id, depending on what type of entity you are trying to pull data for.



About campaign id , i can find 2 types of id.
First one is like, 4md5T, second one is like, 89809993.

Do you know what is difference between fist one and second one?


Ids like 89809993 are from the Ads UI, ids like 4md5T are used in the API.


Thanks so much!
I will work on the my problems.


You’re welcome, @quicknewsofapps. :slight_smile: