ADS API Segmentation Stats for Organic/Promoted Tweets


#1

This is regarding Segmented Stats for Entity - Organic / Promoted Tweets and while trying to get the data , the job doesn’t return any URL . Could you please help with the same.

params.add(new HttpParameter(“granularity”, “DAY”));
params.add(new HttpParameter(“start_time”, “2016-06-16”));
params.add(new HttpParameter(“end_time”, “2016-06-23”));
params.add(new HttpParameter(“entity”,“PROMOTED_TWEET”));
params.add(new HttpParameter(“entity_ids”, “v5rb1”));
params.add(new HttpParameter(“metric_groups”,“ENGAGEMENT”));
params.add(new HttpParameter(“placement”,“ALL_ON_TWITTER”));
params.add(new HttpParameter(“segmentation_type”,“AGE”));
String baseurl=“https://ads-api.twitter.com/2/stats/jobs/accounts/awj1s”;


#2

@ajay_api - You first need to make the POST request with the above variables. This will return an “id_str”, which you then plug into the GET stats request to retrieve the URL containing the data.

Thanks!