Hi Amine,
Adding to Sigurd's post, the search query report solution that can be
found here, is a good start. The page describes how to work with search terms, that you can filter based on chosen criteria. The
source code provided at the bottom of the page is a script that adds search terms as negative or positive keywords depending on whether if they meet certain metric thresholds. You can edit these thresholds and add/remove metrics as needed. If you are not interested in adding positive keywords, you can easily remove this functionality, by changing the line:
if (positiveKeywords[adGroup.getId()]) {
to:
if (0) { //Condition will never fire
Additionally, if you want this script focused on shopping ad groups, you'll have to change the lines:
var adGroups = AdsApp.adGroups().withIds(adGroupIdList).get();
while (adGroups.hasNext()) {
var adGroup = adGroups.next();
to:
var adGroups = AdsApp.shoppingAdGroups().withIds(adGroupIdList).get();
while (adGroups.hasNext()) {
var adGroup = shoppingAdGroups.next();
You may need to make other changes to tailor the script to your exact need.
Regards,
Matt