RelatedToUrlSearchParameter--TargetingIdeaSelector (PHP)

138 views
Skip to first unread message

shaselton

unread,
Mar 18, 2010, 4:41:28 PM3/18/10
to AdWords API Forum
Hello All,

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!

AdWords API Advisor

unread,
Mar 19, 2010, 2:38:26 PM3/19/10
to AdWords API Forum
Hi,

This can be accomplished by using the KeywordMatchTypeSearchParameter:

http://code.google.com/apis/adwords/v2009/docs/reference/TargetingIdeaService.KeywordMatchTypeSearchParameter.html

Best,
- Eric Koleda, AdWords API Team

Reply all
Reply to author
Forward
0 new messages