Accounts and Campaigns selection in Java API

42 views
Skip to first unread message

Łukasz Gaża

unread,
May 19, 2016, 11:21:05 AM5/19/16
to AdWords API Forum
When I want to generate a keyword performance report on Google AdWords web page, apart from others, there is an option to select accounts and campaigns to be included in the report.
Where can I find similar option to do it using Java API?

My code to download the reports is similar to the one in "Download a criteria performance report" paragraph in the link below
https://developers.google.com/adwords/api/docs/samples/java/reporting#download-a-criteria-performance-report.

However the amount of data in the report I'm getting (using Java API) is much lower than in the report generated on Google AdWords web page and I started wondering if it's because of not including all the available compaigns and accounts.

Thanks,

Joyce Lava

unread,
May 19, 2016, 1:37:03 PM5/19/16
to AdWords API Forum
Hi,

The account selected from the AdWords UI is equivalent to the one you set as clientCustomerId in the configuration file (ads.properties for Java client library).

And for the selected campaigns, you can add the "CampaignId" and "CampaignName" fields in the KEYWORDS_PERFORMANCE_REPORT. Then filter the campaigns you want using Predicate (e.g. WHERE CampaignId = 123) to compare with the AdWords UI report.

Regards,
Joyce, AdWords API Team

Łukasz Gaża

unread,
May 20, 2016, 5:25:45 AM5/20/16
to AdWords API Forum
Thanks Joyce.

Is there any way to use the manager account as clientCustomerId?

What I see in AdWords UI is some account, a manager account, for which the reports are generated. Then under the manager account there are multiple client accounts.
I can provide clientCustomerId for any client account and the Java API allows me to download the report for it, but if I provide clientCustomerId for the manager account I'm getting "Response received with status code 400 and message: Bad Request".

Thanks,

Łukasz Gaża

unread,
May 20, 2016, 7:18:30 AM5/20/16
to AdWords API Forum
Or maybe to rephrase what I asked above, if using manager account with the API is not allowed - how can a summary report for all of the accounts? (It seems I can do it using AdWords UI).

Joyce Lava

unread,
May 20, 2016, 9:28:17 AM5/20/16
to AdWords API Forum
Hi,

Unfortunately, reports should be ran using the non-manager accounts only. AdWords API does not support reports at MCC level. If you need to gather reporting data from multiple accounts, you need to submit separate report request for each account as described here.

Łukasz Gaża

unread,
May 20, 2016, 9:53:33 AM5/20/16
to AdWords API Forum
I saw such an answer under a post which is 3 years old, but I was hoping that an option to gather data from multiple accounts was added.

Thanks anyway.

Joyce Lava

unread,
May 20, 2016, 10:57:54 AM5/20/16
to AdWords API Forum
Hi,

You may refer to the AdWords API blog to check on future updates or announcements.
Reply all
Reply to author
Forward
0 new messages