Does ad object has adGroup it belonged to?

20 views
Skip to first unread message

Michael

unread,
Dec 20, 2016, 7:05:49 PM12/20/16
to AdWords API Forum
Hi Adwords team,

I am implementing a function related to adGroup and ads. I was wondering if there is a field in Ads like expandedTestAds indicate which adGroup this ads belong to. And if there is a filed in keywords which could indicate adGroup it belonged to? I searched in api lib but cannot find one. Is there a way to get this kind of info or we have to build selector to query ads each time.

Use case:
As for adGroup 1234, I want to know it has 3 textAds, 4 expandedAds, 2 keywords. They all have a pointer pointing to adGroup 1234, indicating these data belonged to that adGroup.

Thanks team

Best regards
Michael

Anthony Madrigal

unread,
Dec 20, 2016, 7:39:59 PM12/20/16
to AdWords API Forum
Hi Michael,

Unfortunately, there is no API service that will allow you to see how many ads or keywords are in an ad group. The best thing you can do is run Reports and put a filter on your ad groups. You can use the Ad Performance Report and Keywords Performance Report to get information on your ads and keywords respectively. 

Regards,
Anthony
AdWords API Team

Michael

unread,
Dec 20, 2016, 7:41:12 PM12/20/16
to AdWords API Forum
Thanks Anthony for quick replying.

Zweitze

unread,
Dec 21, 2016, 7:33:07 AM12/21/16
to AdWords API Forum
Field adGroup.adGroupId contains the ID of the group of the ad.
This field is mysteriously missing from the official documentation but is present in pretty much all of the samples.

In your case, you could try AdGroupAdService.get() with a selector on field "adGroupId" or, if that doesn't work, field "AdGroupId". (Yes, it's a shame the documentation is incomplete.)

Note: reports are faster, so if Anthony's solution provides all the fields you need go for that. Only use the solution above if you need fields not available in reports.
Reply all
Reply to author
Forward
0 new messages