DistinctError.DUPLICATE_ELEMENT on TargettingIdeaService

85 views
Skip to first unread message

François-Régis Lancien

unread,
Aug 1, 2016, 3:23:50 AM8/1/16
to AdWords API Forum
Hello,

I'm using TargetingIdeaService in order to collect values from searches on Google (like numbers, cost, competition ....).
But, when I work with large amount of keywords, I obtain this error :

class DistinctError#12022 (6) {
  public $reason =>
  string(17) "DUPLICATE_ELEMENT"
  public $fieldPath =>
  string(41) "selector.searchParameters[0].queries[270]"
  public $trigger =>
  string(0) ""
  public $errorString =>
  string(31) "DistinctError.DUPLICATE_ELEMENT"
  public $ApiErrorType =>
  string(13) "DistinctError"
  private $_parameterMap =>
  array(1) {
    'ApiError.Type' =>
    string(12) "ApiErrorType"
  }
}


I don't understand because every single request is different from the others.

Thanks for your help,

François

Peter Oliquino

unread,
Aug 1, 2016, 4:40:26 AM8/1/16
to AdWords API Forum
Hi François,

The error you are encountering is due to the request containing two parameters that are the same. Please make sure there are no duplicate parameters in the request and try again.

If there are no duplicates and the issue still persists, kindly provide your full SOAP request and response so I can investigate the issue further. Please also reply using Reply privately to author for the SOAP.  Thank you!

Best regards,
Peter
AdWords API Team

François-Régis Lancien

unread,
Aug 1, 2016, 4:51:01 AM8/1/16
to AdWords API Forum
Thnaks for you answer.

"containing two parameters that are the same" ?

Do you mean TargettingIdeaService parameters ou parameters that I've put in (my keywords) ?

Peter Oliquino

unread,
Aug 1, 2016, 5:15:57 AM8/1/16
to AdWords API Forum
Hi François,

It could be any of the following (operations, search/selector parameters, list elements) and so you will need to check your code if you may have duplicated any of them. If the issue persists, kindly send your full SOAP request and response so I could identify which specific parameter has been duplicated. Please respond using Reply privately to author for the information I requested.

Thanks and regards,
Peter
AdWords API Team

François-Régis Lancien

unread,
Aug 1, 2016, 5:21:53 AM8/1/16
to AdWords API Forum
Hum, is a keyword could be the problem ?

Like if I enter "car france" and "car france", will he struggle ?

Peter Oliquino

unread,
Aug 1, 2016, 6:34:17 AM8/1/16
to AdWords API Forum
Hi François,

Yes, if you define duplicates of those for example in your RelatedToQuerySearchParameter or in any of the SearchParameters, it will give you that error.

Cheers,
Peter
AdWords API Team

François-Régis Lancien

unread,
Aug 2, 2016, 6:20:13 AM8/2/16
to AdWords API Forum
Ok, I checked my keywords and I found something like this, maybe this is the error :

"voli Vintimille le havre" and "passaggio auto Bergen le havre" appeared to be the same, but they're not :/

A bit of help ? :D

Peter Oliquino

unread,
Aug 2, 2016, 6:32:08 AM8/2/16
to AdWords API Forum
Hi François,

Using those two different set of words will not produce an error. However, if you use only the words "le havre" and you use them twice or more, it will produce the error.

Best regards,
Peter
AdWords API Team

François-Régis Lancien

unread,
Aug 2, 2016, 7:55:47 AM8/2/16
to AdWords API Forum
The error seems to be in the 70 and 170 element in the queries (selector.searchParameters[0].queries[270]).

How can I access to this parameters ?

Peter Oliquino

unread,
Aug 2, 2016, 10:23:28 PM8/2/16
to AdWords API Forum
Hi François,

You may check in your code for the following instances of any of these search parameters and see which search parameter the duplicate has been specified. 

If the issue persists, kindly send a copy of the code with the search parameters and your full SOAP request and response so I can further investigate. Please reply using Reply privately to author when sending the requested information.

Thanks and regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages