Keyword Match Types

275 views
Skip to first unread message

veselin....@gmail.com

unread,
May 11, 2015, 12:57:30 PM5/11/15
to adwor...@googlegroups.com
Hi guys.

I have a script that using the Adwords API returns keyword ideas for given keyword. Earlier in the Google Keyword Planner console there was a option to filter the keywords by match type: Broad, Phrase, Exact. Now it seems it is replaced with this option: 'Only show ideas closely related to my search terms'. Although it don't return the same keywords as 'Exact' option used to do, it is much better then the default option.

My question is, how do I do this in code? How do I enable this option in Keyword Planner API? I tried using ExcludedKeywordSearchParameter, and excluding the keywords with 'Broad' and 'Phrase' Match types, but the results still differ.

Here is a portion of my code: 
$excludeSearchParameter = new ExcludedKeywordSearchParameter();
$kwrd = new Keyword();
$kwrd->text = $keyword;
$kwrd->matchType = 'BROAD';
$kwrd1 = new Keyword();
$kwrd1->text = $keyword;
$kwrd1->matchType = 'PHRASE';
$excludeSearchParameter->keywords = array($kwrd, $kwrd1);

...

$relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
$relatedToQuerySearchParameter->queries = array($keyword);

$selector->searchParameters[] = $relatedToQuerySearchParameter;
$selector->searchParameters[] = $excludeSearchParameter;
...

Any help would be appreciated.
Thanks.

Nadine Sundquist (AdWords API Team)

unread,
May 12, 2015, 12:34:54 PM5/12/15
to adwor...@googlegroups.com, veselin....@gmail.com
Hello,

To return JUST the information of the keyword that you pass in, you can still use the TargetingIdeaService. In the TargetingIdeaSelector, set:
  • requestType => STATS
  • ideaType => KEYWORD
  • requestAttributeTypes => a list of attributes e.g. KEYWORD_TEXT, CATEGORY_PRODUCTS_AND_SERVICES
  • SearchParameters => RelatedToQuerySearchParameter with your list of keywords
Cheers,
Nadine, AdWords API Team

veselin....@gmail.com

unread,
May 13, 2015, 1:30:31 PM5/13/15
to adwor...@googlegroups.com, veselin....@gmail.com
Thank you Nadine. 

However, that is not what I wanted to accomplish, I am aware of that functionality. 

Basically what I'm saying is that info for keywords doesn't match when this 'Only show ideas closely related to my search terms' is selected and when not. 
For example, if I search for "cheap computer" the search volume would be let's say 15 000 000 because Google sums up searches for "cheap pc's", "cheap electronics" and similar. And if I select EXACT match, search volume would be much less, let's say 500 000, because Google will include only keywords like "used cheap computer", "cheap computer on sale" and similar, and not the ones it used to above that even don't contain 'computer' in their text.

Nadine Sundquist (AdWords API Team)

unread,
May 13, 2015, 2:31:51 PM5/13/15
to adwor...@googlegroups.com, veselin....@gmail.com
Hi Veselin,

To mimic the Only show ideas closely related to my search terms functionality in the API, you need to use both RelatedToQuerySearchParameter and IdeaTextFilterSearchParameter with the same keywords at the same time. Based off of your example, it would look something like this:

$relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
$relatedToQuerySearchParameter->queries = array($keyword);

$ideaTextFilterSearchParameter
= new IdeaTextFilterSearchParameter();
$ideaTextFilterSearchParameter
->included = array($keyword);

$selector->searchParameters[] = $relatedToQuerySearchParameter;
$selector->searchParameters[] = $ideaTextFilterSearchParameter;
...

Best,
Nadine, AdWords API Team

veselin....@gmail.com

unread,
May 14, 2015, 4:00:13 PM5/14/15
to adwor...@googlegroups.com, veselin....@gmail.com
That's it, that's what I was looking for. Thank you very much Nadine.
Reply all
Reply to author
Forward
0 new messages