Individual services calls vs Batch jobs vs adhoc reports for full account structure downloads

17 views
Skip to first unread message

Bryan

unread,
Jan 4, 2018, 3:49:14 PM1/4/18
to AdWords API Forum
Hi, I currently use the api (via the PHP SDK) to download the full account structure including campaigns, ad groups, keywords, ads, and labels. I use each individual service's get() method to retrieve these (CampaignService, AdGroupService, AdGroupAdService, AdGroupCriterionService, LabelService). The account is large so some of these get() requests have to be run in a loop (with specific selectors) since they would otherwise hit the 100,000 "start index" api limit for result pages. 

I have two questions:
- It looks like BatchJobService is only for mutate calls, and would not help to download account data faster - is that correct?
- Would the "adhoc reports" feature suggested in the docs provide all this data faster? Looping get() requests takes a long time for a full account download. Also, do adhoc reports guarantee realtime data?

Thanks!

Vincent Racaza (AdWords API Team)

unread,
Jan 4, 2018, 10:56:54 PM1/4/18
to AdWords API Forum
Hi Bryan,

For your first question, you are correct. Batch processing using BatchJobService is for mutate calls only of the supported services and operations (e.g. CampaignService.mutate()), so retrieving your data in batch is not possible with this service.

For your second question, if your goal is just to get the data (e.g. campaigns, ad groups, etc.) with or without statistics, then you may generate a report so you don't have to worry for the paging limit as discussed here (Start index of request). In regards to the real time data in reports, if you are only getting attributes, and not metrics (e.g. Impressions, Clicks), then the attribute data is in real time. Metrics are delayed for up to 3 hours as discussed here.

The advantage of generating a report is that you may generate all your data for an object (e.g. campaigns via Campaign Performance Report) via one report request as there is no file size limit. However, this does not guarantee that it will always download your report as there may be times that the server may return an error if your report is too large as discussed here.

For the reports, you can refer to this guide for more information and to these PHP reporting examples.

Thanks,
Vincent
AdWords API Team
Reply all
Reply to author
Forward
0 new messages