Right to the situation on hand...
$url = 'www.example.com';
$selector = new TargetingIdeaSelector();
$selector->requestType = 'IDEAS';
$selector->ideaType = 'KEYWORD';
$selector->requestedAttributeTypes = array('KEYWORD');
$paging = new Paging();
$paging->startIndex = 0;
$paging->numberResults = 21;
$selector->paging = $paging;
$relatedToKeywordSearchParameter = new RelatedToUrlSearchParameter();
$relatedToKeywordSearchParameter->urls = array($url);
$selector->searchParameters = array($relatedToKeywordSearchParameter);
This returns 7 keywords of each matching type (exact, broad, and
phrase) ( 7 [keywords] * 3 [types] = 21 results)
I am wanting only a single type (such as 'exact') of keyword returned
on searching the url, so I will have 21 keywords of one type rather
than 7. Not quite sure how to do this on the
RelatedToUrlSearchParameter. I know it can be done with
RelatedToKeywordSearchParameter, but that isn't my parameter. Any
ideas? Thanks!
This can be accomplished by using the KeywordMatchTypeSearchParameter:
Best,
- Eric Koleda, AdWords API Team