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. On Wednesday, December 21, 2016 at 1:05:49 AM UTC+1, Michael wrote: > > 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 > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/60bdeea2-f83d-4fc1-8daf-57eb5b4db485%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.