Issues with adding Keywords to campaign

18 views
Skip to first unread message

fco

unread,
Aug 14, 2019, 2:28:45 AM8/14/19
to AdWords API and Google Ads API Forum
Hello, I want to add keywords at the campaign level and not the ad_group level, but I'm running into trouble. Below is a sample of my error.

campaign_service = client.GetService('CampaignCriterionService', version='v201809')
operations = [{'operator': 'ADD',
'operand': {'criterion': {'matchType': 'BROAD',
'text': 'this is a keyword',
'xsi_type': 'Keyword'},
'campaignId': xxxxxxxxxxx}}]
campaign_service.mutate(operations)

Error:
GoogleAdsServerFault: [CriterionError.CANNOT_ADD_CRITERIA_TYPE @ operations[0].operand.criterion]

API DOCS:
CANNOT_ADD_CRITERIA_TYPE
Criteria type can not be targeted.


The error states that I cannot add this criterion type, but I feel like I'm doing something wrong. Can anyone point me in the right direction?

Google Ads API Forum Advisor Prod

unread,
Aug 14, 2019, 3:53:54 AM8/14/19
to adwor...@googlegroups.com
Hi,

At the campaign level, keywords can only be excluded, and not targeted. You can refer to our criteria usage guide to learn more about the compatibility of each criteria type in the campaign or ad group level.

I hope this helps.

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UEIzuc:ref

fco

unread,
Aug 14, 2019, 11:18:58 AM8/14/19
to AdWords API and Google Ads API Forum
Thank you. This is very helpful.
Reply all
Reply to author
Forward
0 new messages