get keyword match Type in v201306 using targeting idea service

357 views
Skip to first unread message

Sajjad Saleem

unread,
Oct 7, 2013, 7:01:48 AM10/7/13
to adwor...@googlegroups.com
hi,
i,m trying to get keyword's match type while using targeting idea service. i followed this
https://groups.google.com/forum/#!topic/adwords-api/KhwfQnYEhMQ but i foud that the KeywordMatchTypeSearchParameter is not available in v201306.please help I'm working on it for two days but found nothing.

Danial Klimkin

unread,
Oct 11, 2013, 10:41:18 AM10/11/13
to adwor...@googlegroups.com
Hello Sajjad,


Please use RelatedToQuerySearchParameter instead:



-Danial, AdWords API Team.

Ismail Ansari

unread,
Nov 12, 2013, 11:05:03 AM11/12/13
to adwor...@googlegroups.com
Hi Danial,

i'm using RelatedToQuerySearchParameter but still same issue it would be favour if you share same piece of code.


Danial Klimkin

unread,
Nov 13, 2013, 10:28:43 AM11/13/13
to adwor...@googlegroups.com
Hello Ismail,


Can you please describe in more details what are you trying to achieve? The parameter was replaced as I described, otherwise the behavior should be the same.


-Danial, AdWords API Team.

Ismail Ansari

unread,
Nov 18, 2013, 7:12:53 AM11/18/13
to adwor...@googlegroups.com
Hi,

look at the screenshot i want to get keywords ideas related to my search query how can i implement this using adwords api php.
currently i'm using targeting idea service but don't know how to achieve this

my sample code is :

 $keyword = $search_params['keyword'];
 
  // Create selector.
  $selector = new TargetingIdeaSelector();
  $selector->requestType = 'IDEAS';
  $selector->ideaType = 'KEYWORD';
  $selector->requestedAttributeTypes = array('KEYWORD_TEXT', 'SEARCH_VOLUME'
      ,'AVERAGE_CPC','COMPETITION'); //'TARGETED_MONTHLY_SEARCHES'

 
  $languageParameter = new LanguageSearchParameter();
  $english = new Language();
  $english->id = $search_params['language'];
  $languageParameter->languages = array($english);
 
  $locationParameter = new LocationSearchParameter();
  $location = new Location();
  $location->id = $search_params['country'];
  $locationParameter->locations = array($location);
 

  $relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
  $relatedToQuerySearchParameter->queries = array($keyword);
  $selector->searchParameters[] = $relatedToQuerySearchParameter;
  $selector->searchParameters[] = $languageParameter;
  $selector->searchParameters[] = $locationParameter;

    $paging = new Paging();
    $paging->startIndex = 0;
    $paging->numberResults = 50;
    $selector->paging = $paging;

 
    // Make the get request.
    $page = $targetingIdeaService->get($selector);

Paolo Morello

unread,
Nov 19, 2013, 11:22:58 AM11/19/13
to adwor...@googlegroups.com
Hi Ismail,

I have the same problem. How we can resolve?

Danial Klimkin

unread,
Nov 20, 2013, 7:27:26 AM11/20/13
to adwor...@googlegroups.com
Hello Ismail,


Now I understand the question, in order to make an API request with this option enabled, you need to send both RelatedToQuerySearchParameter and IdeaTextFilterSearchParameter parameters:

  RelatedToQuerySearchParameter, queries = keyword1, keyword2, ...
  IdeaTextFilterSearchParameter, included = keyword1, keyword2, ...


-Danial, AdWords API Team.

Eric Berry

unread,
Jun 29, 2015, 11:27:55 AM6/29/15
to adwor...@googlegroups.com
I have tried this with API v201502 and it doesn't return some keyword results.


The results set are showing 3 results, but my API call only returns 2 (the ones with monthly searches).

Here's my code for the selector options:

selector = {
  :idea_type => 'KEYWORD',
  :request_type => 'STATS',
  :requested_attribute_types => %w(KEYWORD_TEXT SEARCH_VOLUME TARGETED_MONTHLY_SEARCHES COMPETITION AVERAGE_CPC CATEGORY_PRODUCTS_AND_SERVICES),
  :search_parameters => [
    {
      :xsi_type => 'RelatedToQuerySearchParameter',
      :queries => _keywords
    },
    {
      :xsi_type => 'IdeaTextFilterSearchParameter',
      :included => _keywords
    },
    {
      :xsi_type => 'LanguageSearchParameter',
      :languages => [{:id => 1000}] # English
    },
    {
      :xsi_type => 'LocationSearchParameter',
      :locations => [
        {:id => ZipCode::US_STATES[state_keyword_report.state][:location_id]}
      ]
    },
    {
      :xsi_type => 'NetworkSearchParameter',
      :network_setting => {
        :target_google_search => state_keyword_report.target_google_search,
        :target_search_network => state_keyword_report.target_search_network,
        # :target_content_network => false, #state_keyword_report.target_content_network,
        :target_partner_search_network => state_keyword_report.target_partner_search_network
      }
    },
    {
      :xsi_type => 'ExcludedKeywordSearchParameter',
      :keywords => negative_keywords
    },
  ],
  :paging => {
    :start_index => 0,
    :number_results => PAGE_SIZE
  }
}

Am I missing something in order to get the 'possible' keywords?

Thanks!

Danial Klimkin

unread,
Jun 30, 2015, 6:52:31 AM6/30/15
to adwor...@googlegroups.com, ebe...@cege.com
Hello Eric,


You are responding to a 2 years old thread. I am closing it to avoid spam of the original topic participants.

Please start a new thread describing your issue.


-Danial, AdWords API Team.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages