Hello everyone,

I have a Label ID that I know is attached to x amount of Standard Text Ads 
in a campaign, I don't know what the TextAd or AdGroups IDs are.

I'd like to see 1 example of a TextAd from a campaign that has the known 
Label ID attached.

Using the AdGroupAdService 
<https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService#get>
 
I can't simply look for an example of a TextAd with a  Label ID attached 
because 
the adGroupId field is required when getting a textAd 
<https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService.AdGroupAd>
.

So, do I have to use the following predicates with the AdGroupAdService 
<https://developers.google.com/adwords/api/docs/reference/v201609/AdGroupAdService#get>
 to 
return all of the TextAds in a campaign with my known Label ID and sort 
though the results myself?

 // Create predicates.
$selector->predicates[] = new Predicate('AdGroupId', 'IN', 
array($adgroupidarr));
$selector->predicates[] = new Predicate('labelId', 'CONTAINS_ANY', 
array($labelId));
$selector->predicates[] = new Predicate('AdType', 'IN', array('TEXT_AD'));

Since I don't know in which AdGroups my labelled TextAd exists, this would 
mean searching for, and returning all correctly labelled TextAds in every 
AdGroup in a campaign.

Am I correct in my approach? Or is there an easier way of finding an 
example of a TextAd with a known Label ID?

Many thanks



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/dc351463-731d-4ea7-8474-ce99ba512aff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to