Hello, You should be able to specify this using:
{ 'field': 'Id', 'operator': 'EQUALS', 'values': [the_id_you_want] } This is similar to how you've done the other working predicates. Regards, Mike, AdWords API Team On Thursday, January 22, 2015 at 12:22:06 PM UTC-5, Shree wrote: > > Hi Mike, > > I know that 'Id' field is for Keyword's Id (i.e. CriterionId ) . I am just > unable to specify it in serviceSelector below. > Is it possible for you to check the serviceSelector and guide me to > specify CriterionId ? This is coded in Python. > > On Thursday, January 22, 2015 at 9:21:40 PM UTC+5:30, Michael Cloonan > (AdWords API Team) wrote: >> >> Hello, >> >> You can use the field "Id" for the Keyword's Id. Please see the Keyword >> documentation >> <https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupCriterionService.Keyword> >> >> for a list of all supported Keyword fields. >> >> Regards, >> Mike, AdWords API Team >> >> On Wednesday, January 21, 2015 at 10:51:37 AM UTC-5, Shree wrote: >>> >>> Hi, >>> I am using Adwords API in Python. >>> I want to check if a Label 'ABC' is already assigned to a particular >>> keyword 'KeywordA'. >>> I will check if Label 'ABC' is present in the Page entries returned by >>> 'get' method of AdGroupCriterionService >>> How will I write a serviceSelector for specifying CriterionId for a >>> keyword. I am trying with following things - >>> >>> I have LabelId, adGroupId and CriterionId as input for serviceSelector - >>> >>> ad_group_criterion_service = >>> client.GetService('AdGroupCriterionService', version='v201409') >>> >>> serviceSelector = { >>> 'fields': ['Labels'], >>> 'predicates': [{ >>> 'field': 'Labels', >>> 'operator': 'CONTAINS_ANY', >>> 'values': [LabelId] >>> }, >>> { >>> 'field': 'AdGroupId', >>> 'operator': 'EQUALS', >>> 'values': [adGroupId] >>> }, >>> { >>> 'field': 'CriterionUse', >>> 'operator': 'EQUALS', >>> 'values': ['BIDDABLE'] >>> }] >>> # { *** How >>> to write this part ?? I want to set Keyword --> Id >>> # 'field': 'Criterion', >>> # 'operator': 'EQUALS', >>> # 'values': [{'Id': CriterionId}] >>> # }] >>> >>> } >>> page = ad_group_criterion_service.get(serviceSelector) >>> >>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/72e085e6-2327-4795-a5e9-e060fa29a0bf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.