Hello Guys,
I hope you can help me with the following problem.
What I need is a function as provided in google´s keyword tool.
When I search for a keyword (for example: "domain") and check only the
"exact" box on the left,
I get the exact search results for "domain" and around 200 more keyword
ideas with their respective exact hits displayed.
I have the following script working but it only displays a few keyword
ideas. Not as much as displayed in the keyword tool.
The displayed keyword ideas are different too.
Here is my script:
$user = new AdWordsUser();
// Log SOAP XML request and response.
$user->LogDefaults();
// Get the TargetingIdeaService.
$targetingIdeaService = $user->GetTargetingIdeaService('v201008');
$countryTarget = new CountryTarget($country,false);
$countryTargetSearchParameter = new CountryTargetSearchParameter();
$countryTargetSearchParameter->countryTargets = array($countryTarget);
// Take look here !
$monthSearchVolume = new GlobalMonthlySearchesSearchParameter(new
LongComparisonOperation('1000'));
// Create seed keyword.
$keyword = new Keyword();
$keyword->text = $key;
$keyword->matchType = 'EXACT';
// Create selector.
$selector = new TargetingIdeaSelector();
$selector->requestType = 'IDEAS';
$selector->ideaType = 'KEYWORD';
$selector->requestedAttributeTypes =
array('KEYWORD', 'AVERAGE_TARGETED_MONTHLY_SEARCHES');
// Set selector paging (required for targeting idea service).
$paging = new Paging();
$paging->startIndex = 0;
$paging->numberResults = 30;
$selector->paging = $paging;
// Create related to keyword search parameter.
$relatedToKeywordSearchParameter = new
RelatedToKeywordSearchParameter();
$relatedToKeywordSearchParameter->keywords = array($keyword);
// Create keyword match type search parameter to ensure unique results.
$keywordMatchTypeSearchParameter = new
KeywordMatchTypeSearchParameter();
$keywordMatchTypeSearchParameter->keywordMatchTypes = array('EXACT');
// And here !
$selector->searchParameters =
array($relatedToKeywordSearchParameter,$keywordMatchTypeSearchParameter,
$countryTargetSearchParameter, $monthSearchVolume);
$results=$targetingIdeaService->get($selector);
print_r($results);
Thanky you for your help.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en