How can I pass more than one location in EstimatedKeywordTraffic API?

14 views
Skip to first unread message

Aqeel Ashraf

unread,
Aug 28, 2019, 3:27:33 PM8/28/19
to AdWords API and Google Ads API Forum
Hi,

The example shows:

// Optional: Set additional criteria for filtering estimates.
// See http://code.google.com/apis/adwords/docs/appendix/countrycodes.html
// for a detailed list of country codes.
// Set targeting criteria. Only locations and languages are supported.
$unitedStates
= new Location();
$unitedStates
->setId(2840);

// See http://code.google.com/apis/adwords/docs/appendix/languagecodes.html
// for a detailed list of language codes.
$english
= new Language();
$english
->setId(1000);

$campaignEstimateRequest
->setCriteria([$unitedStates, $english]);

What If I have to send more than one countries OR cities? How can I send that? Please let me know. Thanks

Google Ads API Forum Advisor Prod

unread,
Aug 28, 2019, 11:16:42 PM8/28/19
to adwor...@googlegroups.com
Hi Aqeel,

We currently do not have a direct example for what you are looking for, however, you can try and create a new Location object and include it in the objects you pass in the CampaignEstimateRequest :

ex. $campaignEstimateRequest->setCriteria([$unitedStates, $mexico]);

Let me know if this works.


Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UHF0SO:ref
Reply all
Reply to author
Forward
0 new messages