Are Keywords (Criterions) unique?

107 views
Skip to first unread message

Youri van Mill

unread,
May 22, 2017, 5:43:27 AM5/22/17
to AdWords API Forum
Hi,

At this moment in AdWords this keyword exists:

Text: +Heftruck +Basis +cursus
Type: Broad
Max cpc: 1,00 euro
ID: 324002149674
Group ID: 42999949136

When i try to add a new keyword with the same values but another AdGroup, the Criterion returns the above ID... Not the newly created ID...

Are keywords unique?

Youri

Youri van Mill

unread,
May 22, 2017, 7:07:30 AM5/22/17
to AdWords API Forum
I can't edit my topic, so please see: https://github.com/googleads/googleads-php-lib/issues/297

Its more detailed!

Op maandag 22 mei 2017 11:43:27 UTC+2 schreef Youri van Mill:

Shwetha Vastrad (AdWords API Team)

unread,
May 22, 2017, 10:59:11 AM5/22/17
to AdWords API Forum
Hi Youri, 

The AdGroupCriterion is not globally unique. It is unique only in the scope of the AdGroup. The (AdGroupCriterionId, AdGroupId) pair is globally unique. Please see this guide for more details on the uniqueness of object Ids in AdWords. 

Regards,
Shwetha, AdWords API Team.

Youri van Mill

unread,
May 23, 2017, 4:48:17 AM5/23/17
to AdWords API Forum
Thanks for your response.

But i am adding a new AdGroupCriterion with a different AdGroupId:

$adGroupCriterion = new BiddableAdGroupCriterion();
$adGroupCriterion
->setAdGroupId(42180344626);

The following keyword already exists in AdWords:

Group Id: 42999949136
Keyword Id: 324002149674
Type: broad
Text: +Heftruck +Basis +cursus

But when i insert a new Keyword with the same type and text in a different group (given above), the BatchJob returns the following...


I give a completely other GroupId so why does the BatchJob return an already existing Id?


Op maandag 22 mei 2017 16:59:11 UTC+2 schreef Shwetha Vastrad (AdWords API Team):

Shwetha Vastrad (AdWords API Team)

unread,
May 23, 2017, 10:37:07 AM5/23/17
to AdWords API Forum
Hi Youri, 

Criteria in the AdWords API are uniquely identified by the combination of their CriterionID and either the CampaignID or AdGroupID, depending on where the criteria is. Since this keyword is being added to a different AdGroup, the (42999949136, 324002149674) pair is not the same as (42180344626, 324002149674). You may see the same AdGroupCriterion in different AdGroups as the criterionId is not globally unique. You need to use the (AdGroupCriterionId, AdGroupID) pair to map to unique entities.
Reply all
Reply to author
Forward
0 new messages