How to add or remove account level negative keywords?

229 views
Skip to first unread message

Yunjung Cho

unread,
Aug 31, 2023, 12:56:22 PM8/31/23
to Google Ads API and AdWords API Forum
Hi team :)

I want to get some insight from you how to add or remove account-level negative keywords with API.
Below steps are what I was trying
1. Create or retrieve shared_set.resource_name of type SharedSetType.ACCOUNT_LEVEL_NEGATIVE_KEYWORDS
2. Create keyword SharedCriterions and attach to given shared_set using resource_name.
3. Prepare NegativeKeywordListInfo with given shared_set.
4. Create CustomerNegativeCriterion with prepared NegativeKeywordListInfo or updating NegativeKeywordListInfo to existing CustomerNegativeCriterion.
5. Run CustomerNegativeCriterionOperation.

I encountered an issue from step 4 since I could not get resource name for CustomerNegativeCriterion. I tried to use report querying customer_negative_criterion which returned nothing. 

Could you please guide how to retrieve existing account-level negative list info to add or remove keywords?

Regards,

Google Ads API Forum Advisor

unread,
Aug 31, 2023, 6:39:58 PM8/31/23
to yunju...@adthena.com, adwor...@googlegroups.com

Hi there,

Thanks for reaching out to the Google Ads API Forum.

For us to check further, could you provide us with the full logs (complete request and response logs with request ID and request header) generated so that we can investigate further why your API request failed on step 4?

You may note that the Google Ads API v14 supports retrieving, creating and updating account-level negative keywords. You may use the following GAQL:

  • SELECT shared_set.id, shared_set.status, shared_set.type, shared_set.resource_name, shared_set.name FROM shared_set WHERE shared_set.type IN ('ACCOUNT_LEVEL_NEGATIVE_KEYWORDS')

This will help you to get NegativeKeywordListInfo shared set resource name as it represents a shared set of negative keywords that can be excluded at the account-level. Only one negative keyword list criterion can be attached per account. 

This message is in relation to case "ref:_00D1U1174p._5004Q2o9sD4:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages