Hi group! 

I'm having problems arming the selector to TargetingIdeaService. I need to 
make this selector using searchParameters and filter it by location, but I 
can't. 
In another hand, I need to filter this location by COUNTRY, and I don't 
find the way to do this, so the location_criterion_service returns all 
locations types (cities, neighborhoods, countries)

This is part of my code:

selector = {
    'fields': ['Id', 'LocationName', 'DisplayType', 'CanonicalName', 
'ParentLocations', 'Reach', 'TargetingStatus'],
    'predicates': [{'field': 'LocationName', 'operator': 'IN', 'values': 'South 
Africa'},
                   {'field': 'Locale', 'operator': 'EQUALS', 'values': 'en'}]}
location_criteria = location_criterion_service.get(selector)

targeting_idea_service = client.GetService('TargetingIdeaService', 
version='v201802')
offset = 0
selector = {'ideaType': 'KEYWORD', 'requestType': 'IDEAS',
            'requestedAttributeTypes': ['KEYWORD_TEXT', 'SEARCH_VOLUME'],
            'paging': {'startIndex': str(offset), 'numberResults': 
str(PAGE_SIZE)},
            'searchParameters': [{'xsi_type': 'RelatedToQuerySearchParameter', 
'queries': ['bla bla']},
                                 {'xsi_type': 'LocationSearchParameter', 
'locations': [
                                     {'Criterion.type': 'LOCATION',
                                      'locationName': 
location_criteria['Location']['parentLocations']['locationName']}]}]}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/6b36b9b5-8948-432a-a507-b70423e56da2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Bruno Provenzano
    • ... 'Vincent Racaza (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to