Cannot add negative keyword list to Customer Negative Criteria

146 views
Skip to first unread message

Ionut Voda

unread,
Jul 6, 2023, 1:24:55 PM7/6/23
to Google Ads API and AdWords API Forum
Hi there,

I have successfully created a shared set with negative keywords via the API and I can see it in the Ads web interface as well.
Also, when I query the GoogleAdsService for this particular shared set, I can see its status as ENABLED.

My problem is that I cannot associate this shared set to CustomerNegativeCriterionService. I get the NEGATIVE_KEYWORD_SHARED_SET_DOES_NOT_EXIST error. This is my (Python) code:

negative_kws_op = ads_client.get_type("CustomerNegativeCriterionOperation")
negative_kws = negative_kws_op.create
negative_kws.negative_keyword_list.shared_set = customers/{my_customer}/sharedSets/{shared_set_that_i_created}

customer_negative_criterion_service = ads_client.get_service("CustomerNegativeCriterionService")
customer_negative_criterion_service.mutate_customer_negative_criteria(
    customer_id=customer_id, operations=[negative_kws_op]
)

Is something that I do wrong ?

Thanks in advance for your help!

Ionut

Google Ads API Forum Advisor

unread,
Jul 6, 2023, 2:57:35 PM7/6/23
to ionut...@gmail.com, adwor...@googlegroups.com
Hi Ionut,

Thank you for raising this concern to the Google Ads API support team.

Regarding your concern, it appears that you encountered the NEGATIVE_KEYWORD_SHARED_SET_DOES_NOT_EXIST error which means that you cannot create a negative keyword list criterion with a shared set that does not exist. For our team to investigate and provide precise recommendations, can you please send the below complete API logs generated on your end?
Note that these logs can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. You may check here (https://developers.google.com/google-ads/api/docs/client-libs/python/logging) for the guide to enable it.

You may then send the requested logs via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.
 
This message is in relation to case "ref:_00D1U1174p._5004Q2ms5VR:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages