Keyword Ideas and relatedToQuerySearchParameter

52 views
Skip to first unread message

Stephen Barrett

unread,
Jul 6, 2018, 12:45:10 PM7/6/18
to AdWords API and Google Ads API Forum
What is the array associated in this parameter.

 $relatedToQuerySearchParameter->setQueries(
       
['shoes', 'flip flops']
     
);
    $searchParameters
[] = $relatedToQuerySearchParameter;

I thought it was a simple json array but I noticed it has single quotations. Does that even matter? I tried using a json array to replace ['shoes','flip flops'], but it doesn't seem to work.

I even tried a simple string and it just clumps both keywords into one string. Any advice?

Dhanya Sundararaju (AdWords API Team)

unread,
Jul 6, 2018, 3:41:27 PM7/6/18
to AdWords API and Google Ads API Forum
Hi Stephen,

The RelatedToQuerySearchParameter uses array of Strings. Could you reply back with SOAP request and response of when you got both keywords clumped? For your reference, this sample code from the library may be handy. You may opt to reply privately to author when sending the SOAP logs.

Regards,
Dhanya, AdWords API Team

Dhanya Sundararaju (AdWords API Team)

unread,
Jul 6, 2018, 5:16:53 PM7/6/18
to AdWords API and Google Ads API Forum
Hi Stephen,

As per your description, the following code snippet worked. 

$kwlist = ['bakery','pastries','birthday cake'];
$relatedToQuerySearchParameter->setQueries($kwlist);

If this is not your requirement, could you please let me know what exactly you are trying to achieve and what issues your are facing so that I can troubleshoot further? You may opt to reply privately to author.
Reply all
Reply to author
Forward
0 new messages