How do I get monthly search volume for a keyword with php API v201309 ?

759 views
Skip to first unread message

Ad_nu

unread,
Jan 20, 2014, 1:17:40 PM1/20/14
to adwor...@googlegroups.com
I’m trying to modify the GetKeywordIdeas.php -example to show monthly search volumes for given keyword (I’m not looking for the keyword ideas, just the search volume for one keyword).

Should I be using the SearchVolumeSearchParameter() that is mentioned under SearchParameter[] ?
https://developers.google.com/adwords/api/docs/reference/v201309/TargetingIdeaService.TargetingIdeaSelector?hl=en

Can someone take a look at my code and tell if the changes that I made are correct (or is there a working example for search volume requests)?
+ What value should I use with “operation”  ?


$targetingIdeaService = $user->GetService('TargetingIdeaService', ADWORDS_VERSION);
$keyword = 'mars cruise';

$selector = new TargetingIdeaSelector();
$selector->requestType = 'STATS';
$selector->ideaType = 'KEYWORD';
$selector->requestedAttributeTypes = array('SEARCH_VOLUME');

$languageParameter = new LanguageSearchParameter();
$english = new Language(); 
$english->id = 1000;
$languageParameter->languages = array($english);

$SearchVolumeSearchParameter = new SearchVolumeSearchParameter();
$SearchVolumeSearchParameter->operation = ''; //  ??? WHAT SHOULD I PUT HERE ???
$selector->searchParameters[] = $SearchVolumeSearchParameter;
$selector->searchParameters[] = $languageParameter;

Danial Klimkin

unread,
Jan 23, 2014, 6:31:31 AM1/23/14
to adwor...@googlegroups.com
Hello,


You need to use RelatedToQuerySearchParameter in this case.


SearchVolume parameter is for limiting list of ideas by volume, it is not applicable here.


-Danial, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages