Getting INVALID_ARGUMENT error when adding 2000 keywords to a keyword plan

72 views
Skip to first unread message

Zhen Guo

unread,
Jun 5, 2020, 2:43:37 PM6/5/20
to AdWords API and Google Ads API Forum
Hi,

I am using a test account on google ads api. I was trying to add 2000 keywords to my keyword plan to get forecast metrics. I keep getting the following error. "A keyword with same text and match type already exists."But when I try to query keywords form my account, the keywords do not exist. After a few tries, I used up my daily operation limit. I tried the same code with a smaller keyword list with about 10 keywords, and it worked just fine. So, I was wondering why it does not work with 2000 keywords. The attached is the code I was using to add keywords.

./add_keyword_plan2.py -c ***********

Created keyword plan with resource name: customers/*******/keywordPlans/*********

Created keyword plan campaign with resource name: customers/********/keywordPlanCampaigns/********

Created keyword plan ad group with resource name: customers/**********0/keywordPlanAdGroups/*********

Request made: ClientCustomerId: ************, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v3.services.KeywordPlanKeywordService/MutateKeywordPlanKeywords, RequestId: 5jB0YHt43VHwn4F1_sLLTA, IsFault: True, FaultMessage: A keyword with same text and match type already exists.

Request with ID "5jB0YHt43VHwn4F1_sLLTA" failed with status "INVALID_ARGUMENT" and includes the following errors:

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations

Error with message "A keyword with same text and match type already exists.".

On field: operations


Thanks,

Zhen 

add_keyword_plan2.py

Zhen Guo

unread,
Jun 5, 2020, 4:04:04 PM6/5/20
to AdWords API and Google Ads API Forum
Alright, I solved it. It turns out that there are some duplicated keywords in my list.

在 2020年6月5日星期五 UTC-4下午2:43:37,Zhen Guo写道:
Reply all
Reply to author
Forward
0 new messages