...note: the KeywordTextMatchingQuery is not available in the
KEYWORDS_PERFORMANCE_REPORT
as my example suggests. Use the SEARCH_QUERY_PERFORMANCE_REPORT instead.
Am Mittwoch, 2. September 2020 17:17:26 UTC+2 schrieb Mat:
>
> 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/70b5ab63-05b2-4cd0-b894-b677b2f367e3o%40googlegroups.com.