I think I found out how it's done:
_________________________________________________________________________________________________________
// Get AdWordsUser from credentials in "../auth.ini"
// relative to the AdWordsUser.php file's directory.
$user = new AdWordsUser();
// Log SOAP XML request and response.
$user->LogDefaults();
// Get the TargetingIdeaService.
$targetingIdeaService = $user->GetTargetingIdeaService('v200909');
// Create seed keyword.
$keyword = new Keyword();
$keyword->text = 'computer';
$keyword->matchType = 'BROAD';
// Create selector.
$selector = new TargetingIdeaSelector();
$selector->requestType = 'IDEAS';
$selector->ideaType = 'KEYWORD';
$selector->requestedAttributeTypes = array('KEYWORD');
// Set selector paging (required for targeting idea service).
$paging = new Paging();
$paging->startIndex = 0;
$paging->numberResults = 10;
$selector->paging = $paging;
// Create related to keyword search parameter.
$relatedToKeywordSearchParameter = new
RelatedToKeywordSearchParameter();
$relatedToKeywordSearchParameter->keywords = array($keyword);
$competitionSearchParameter = new CompetitionSearchParameter();
$competitionSearchParameter->levels = array('HIGH');
$selector->searchParameters = array($relatedToKeywordSearchParameter,
$competitionSearchParameter );
// Get related keywords.
$page = $targetingIdeaService->get($selector);
// Display related keywords.
if (isset($page->entries)) {
foreach ($page->entries as $targetingIdea) {
$keyword = $targetingIdea->data[0]->value->value;
print 'Keyword with text "' . $keyword->text . '" and match type
"'
. $keyword->matchType . "\" was found.\n<br/>";
}
} else {
print "No related keywords were found.\n";
}
____________________________________________________________________________________
Thanks
On May 10, 10:58 pm, introfini <[email protected]> wrote:
> Hi,
>
> Can someone help me get CompetitionSearchParameter filter working in
> PHP (very new to this)?
>
> How can I check if the keywords that I get are filtered to HIGH for
> example.
>
> Thanks.
>
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion
> group:http://adwordsapi.blogspot.comhttp://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
> athttp://groups.google.com/group/adwords-api?hl=en
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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