Hi Green Leaf,

some alternative to my solution you've linked would be to convert the list 
into a string using "join()" and/or insert that string into the query using 
".format().


keyword_list = ["keyword1", "keyword2", "keyword3"]
*keyword_list_as_string* = ', '.join(str(e) for e in keyword_list)

#This should work with the AdWords API Python library:
query = ('SELECT Id, Criteria, AdGroupName FROM KEYWORDS_PERFORMANCE_REPORT 
'
'WHERE somecondition '
'AND KeywordTextMatchingQuery IN [*{}*]'.format(*keyword_list_as_string*)
         ) 

#And this is a Python example that does work with the Google Ads API Python 
library:
       shared_set_ids = [1234, 5678, 2345]
    *shared_set_ids_as_string* = ', '.join(str(e) for e in shared_set_ids)
    query = ('SELECT '
                'shared_criterion.criterion_id, '           
                'shared_criterion.keyword.match_type, '                    
     
                'shared_criterion.keyword.text, '
                'shared_criterion.type, ' 
                'shared_set.id '
                'FROM shared_criterion '
                'WHERE shared_set.id IN (*{}*) '
                'AND shared_set.status = ENABLED '
                'AND shared_set.type = NEGATIVE_KEYWORDS'.format(
*shared_set_ids_as_string*)
                )


Regards 
Mat

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e8112e06-4915-400d-b605-5779f5e12e1eo%40googlegroups.com.

Reply via email to