Hi David,
    I too face same issue with returned search numbers. There is big 
difference in numbers returned with both v201109 and v201206.
    I included both requests.

   V201206:
================
TargetingIdeaSelector selector = new TargetingIdeaSelector();
selector.setRequestType(RequestType.IDEAS);
selector.setIdeaType(IdeaType.KEYWORD);
selector.setRequestedAttributeTypes(new AttributeType[] 
{AttributeType.KEYWORD_TEXT,AttributeType.SEARCH_VOLUME});
RelatedToQuerySearchParameter relatedToQuerySearchParameter = new 
RelatedToQuerySearchParameter ();
relatedToQuerySearchParameter.setQueries(new String[] {"shoes"});


selector.setSearchParameters(new SearchParameter[] 
{relatedToQuerySearchParameter});

// Get related keywords.
TargetingIdeaPage page = targetingIdeaService.get(selector);

// Display related keywords.
if (page.getEntries() != null && page.getEntries().length > 0) {
for (TargetingIdea targetingIdea : page.getEntries()) {
Map<AttributeType, Attribute> data = 
MapUtils.toMap(targetingIdea.getData());
StringAttribute keyword = (StringAttribute) 
data.get(AttributeType.KEYWORD_TEXT);
   String categoriesString = "(none)";
Long averageMonthlySearches = ((LongAttribute) 
data.get(AttributeType.SEARCH_VOLUME)).getValue();
System.out.println("Keyword with text '" + keyword.getValue() + 
"' and average monthly search volume '"
  + averageMonthlySearches );
}
}


V201109:
=============
Keyword keyword = new Keyword();
keyword.setText("shoes");
keyword.setMatchType(KeywordMatchType.BROAD);
TargetingIdeaSelector selector = new TargetingIdeaSelector();
selector.setRequestType(RequestType.IDEAS);
selector.setIdeaType(IdeaType.KEYWORD);
selector.setRequestedAttributeTypes(new AttributeType[] 
{AttributeType.CRITERION, AttributeType.AVERAGE_TARGETED_MONTHLY_SEARCHES});

   Paging paging = new Paging();
paging.setStartIndex(0);
paging.setNumberResults(10);
selector.setPaging(paging);
   
RelatedToKeywordSearchParameter relatedToKeywordSearchParameter = new 
RelatedToKeywordSearchParameter();
relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

   KeywordMatchTypeSearchParameter keywordMatchTypeSearchParameter = new 
KeywordMatchTypeSearchParameter();
keywordMatchTypeSearchParameter.setKeywordMatchTypes(new KeywordMatchType[] 
{KeywordMatchType.BROAD});

selector.setSearchParameters(new SearchParameter[] 
{relatedToKeywordSearchParameter,keywordMatchTypeSearchParameter});

   TargetingIdeaPage page = targetingIdeaService.get(selector);

   if (page.getEntries() != null && page.getEntries().length > 0) {
for (TargetingIdea targetingIdea : page.getEntries()) {
Map<AttributeType, Attribute> data = 
MapUtils.toMap(targetingIdea.getData());
keyword = (Keyword) ((CriterionAttribute) 
data.get(AttributeType.CRITERION)).getValue();
  Long averageMonthlySearches =  ((LongAttribute) 
data.get(AttributeType.AVERAGE_TARGETED_MONTHLY_SEARCHES)).getValue();
  System.out.println("Keyword with text '" + keyword.getText() + "', match 
type '"+ keyword.getMatchType() + "', and average monthly search volume '"+ 
averageMonthlySearches + "' was found.");
}
}

Thnx in adv.
On Thursday, August 16, 2012 11:03:07 PM UTC+5:30, Kevin wrote:
>
> Hi David,
>
> I tried out both v201109 and v201206, and they have different result. 
> Given that RelatedToKeywordSearchParameter is also not supported in 
> v201206, I used RelatedToQuerySearchParameter instead.  For v201109, the 
> global monthly search estimate for the keyword shoes is 68,000,000 where as 
> for v201206 is 4,090,000. That's more than an order of magnitude 
> difference. Please let me know whether I did something wrong. A migration 
> guide would be really helpful.  I included soap requests and responses for 
> both versions below.  Please let know if you need any additional 
> information.  Thanks.
>
> V201109:
> ==============
> Request Body:
> <soapenv:Body>
>   <get xmlns="https://adwords.google.com/api/adwords/o/v201109";>
>     <selector>
>       <searchParameters xsi:type="ns8:RelatedToKeywordSearchParameter" 
> xmlns:ns8="https://adwords.google.com/api/adwords/o/v201109";>
>         <keywords>
>           <ns9:text xmlns:ns9="
> https://adwords.google.com/api/adwords/cm/v201109";>shoes</ns9:text>
>           <ns10:matchType xmlns:ns10="
> https://adwords.google.com/api/adwords/cm/v201109";>BROAD</ns10:matchType>
>         </keywords>
>       </searchParameters>
>       <ideaType>KEYWORD</ideaType>
>       <requestType>STATS</requestType>
>       
> <requestedAttributeTypes>GLOBAL_MONTHLY_SEARCHES</requestedAttributeTypes>
>       <paging>
>         <ns11:startIndex xmlns:ns11="
> https://adwords.google.com/api/adwords/cm/v201109";>0</ns11:startIndex>
>         <ns12:numberResults xmlns:ns12="
> https://adwords.google.com/api/adwords/cm/v201109
> ">800</ns12:numberResults>
>       </paging>
>     </selector>
>   </get>
> </soapenv:Body>
>
> Response Body:
>   <soap:Body>
>     <getResponse xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201109"; xmlns="
> https://adwords.google.com/api/adwords/o/v201109";>
>       <rval>
>         <totalNumEntries>1</totalNumEntries>
>         <entries>
>           <data>
>             <key>GLOBAL_MONTHLY_SEARCHES</key>
>             <value xsi:type="LongAttribute" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
>               <Attribute.Type>LongAttribute</Attribute.Type>
>               <value>68000000</value>
>             </value>
>           </data>
>         </entries>
>       </rval>
>     </getResponse>
>   </soap:Body>
>
> V201206:
> ===============
>
> Request Body:
> <soapenv:Body>
>   <get xmlns="https://adwords.google.com/api/adwords/o/v201206";>
>     <selector>
>       <searchParameters xsi:type="ns8:RelatedToQuerySearchParameter" 
> xmlns:ns8="https://adwords.google.com/api/adwords/o/v201206";>
>         <queries>shoes</queries>
>       </searchParameters>
>       <ideaType>KEYWORD</ideaType>
>       <requestType>STATS</requestType>
>       <requestedAttributeTypes>SEARCH_VOLUME</requestedAttributeTypes>
>       <paging>
>         <ns9:startIndex xmlns:ns9="
> https://adwords.google.com/api/adwords/cm/v201206";>0</ns9:startIndex>
>         <ns10:numberResults xmlns:ns10="
> https://adwords.google.com/api/adwords/cm/v201206
> ">100</ns10:numberResults>
>       </paging>
>     </selector>
>   </get>
> </soapenv:Body>
>
> Response Body:
> <soap:Body>
>   <getResponse xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201206"; xmlns="
> https://adwords.google.com/api/adwords/o/v201206";>
>     <rval>
>       <totalNumEntries>1</totalNumEntries>
>       <entries>
>         <data>
>           <key>SEARCH_VOLUME</key>
>           <value xsi:type="LongAttribute" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
>             <Attribute.Type>LongAttribute</Attribute.Type>
>             <value>4090000</value>
>           </value>
>         </data>
>       </entries>
>     </rval>
>   </getResponse>
> </soap:Body>
> </soap:Envelope>
>
> -Kevin
>
> On Thursday, August 9, 2012 6:06:41 AM UTC-7, David Torres wrote:
>>
>> Hi Kevin,
>>
>> The new SEARCH_VOLUME is equivalent to GLOBAL_MONTHLY_SEARCHES when no 
>> LocationSearchParameter 
>> and LanguageSearchParameter are specified, on the flip side SEARCH_VOLUME 
>> is equivalent to AVERAGE_TARGETED_MONTHLY_SEARCHES if a language and/or 
>> a location is required.
>>
>> Best,
>>
>> -David
>>
>> On Wednesday, August 1, 2012 1:23:34 PM UTC-4, Kevin wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to migrate to v201206 but found that GLOBAL_MONTHLY_SEARCHES 
>>> and AVERAGE_TARGETED_MONTHLY_SEARCHES are no longer supported.  Are 
>>> there alternative attributes that I could use to get these 2 metrics?
>>>
>>> Thanks,
>>> Kevin
>>>
>>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

Reply via email to