Re: How to get monthly search volume for a given keyword with v201209

2012-12-18 Thread Danial Klimkin
Hello Warren,


You request is for RequestType.IDEAS type. You need to use the 
RequestType.STATS instead.


-Danial, AdWords API Team.


On Sunday, December 16, 2012 6:39:34 PM UTC-8, Hongyu Li wrote:

 Hi, 
   the question is simple, how to get monthly search volume for a keyword. 
 following is my code, I want the monthly search volume for keyword 楽天, I 
 used the code below, only get the monthly search volume for the keywords 
 that relate to 楽天. how can i get the search volume for the keyword self. 
 any help will be appreciate. 

 TargetingIdeaSelector selector = new TargetingIdeaSelector();
 selector.setRequestType(RequestType.IDEAS);
 selector.setIdeaType(IdeaType.KEYWORD);
 selector.setRequestedAttributeTypes(new AttributeType[] { 
 AttributeType.KEYWORD_TEXT, AttributeType.SEARCH_VOLUME,
 AttributeType.CATEGORY_PRODUCTS_AND_SERVICES });

 // Set selector paging (required for targeting idea service).
 Paging paging = new Paging();
 paging.setStartIndex(0);
 paging.setNumberResults(10);
 selector.setPaging(paging);

 ExcludedKeywordSearchParameter parameter = new 
 ExcludedKeywordSearchParameter();
 Keyword k = new Keyword();
 k.setText(楽天);
 k.setMatchType(KeywordMatchType.BROAD);
 parameter.setKeywords(new Keyword[] { k });
  // Create related to query search parameter.
 RelatedToQuerySearchParameter relatedToQuerySearchParameter = new 
 RelatedToQuerySearchParameter();
 relatedToQuerySearchParameter.setQueries(new String[] { 楽天 });
 selector.setSearchParameters(new SearchParameter[] { 
 relatedToQuerySearchParameter, parameter });



 Thanks a lot 
 -Warren


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en





How to get monthly search volume for a given keyword with v201209

2012-12-16 Thread Hongyu Li
Hi, 
  the question is simple, how to get monthly search volume for a keyword. 
following is my code, I want the monthly search volume for keyword 楽天, I 
used the code below, only get the monthly search volume for the keywords 
that relate to 楽天. how can i get the search volume for the keyword self. 
any help will be appreciate. 

TargetingIdeaSelector selector = new TargetingIdeaSelector();
selector.setRequestType(RequestType.IDEAS);
selector.setIdeaType(IdeaType.KEYWORD);
selector.setRequestedAttributeTypes(new AttributeType[] { 
AttributeType.KEYWORD_TEXT, AttributeType.SEARCH_VOLUME,
AttributeType.CATEGORY_PRODUCTS_AND_SERVICES });

// Set selector paging (required for targeting idea service).
Paging paging = new Paging();
paging.setStartIndex(0);
paging.setNumberResults(10);
selector.setPaging(paging);

ExcludedKeywordSearchParameter parameter = new 
ExcludedKeywordSearchParameter();
Keyword k = new Keyword();
k.setText(楽天);
k.setMatchType(KeywordMatchType.BROAD);
parameter.setKeywords(new Keyword[] { k });
 // Create related to query search parameter.
RelatedToQuerySearchParameter relatedToQuerySearchParameter = new 
RelatedToQuerySearchParameter();
relatedToQuerySearchParameter.setQueries(new String[] { 楽天 });
selector.setSearchParameters(new SearchParameter[] { 
relatedToQuerySearchParameter, parameter });



Thanks a lot 
-Warren

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en