How get other country keyword search volume?

2013-10-21 Thread Kven Chou
I changing localcode return the same result.

  se_list=['country']
if list_keyword:
se_list.append({'xsi_type': 'RelatedToQuerySearchParameter',
'queries':list_keyword,
})
if list_url:
se_list.append({'xsi_type': 'RelatedToUrlSearchParameter',
'urls': list_url,
'includeSubUrls': 'false',
})

selector = {
'searchParameters':se_list,
'ideaType': 'KEYWORD',
'requestType': 'STATS',
#'requestType': 'IDEAS',

'requestedAttributeTypes':['COMPETITION','KEYWORD_TEXT','TARGETED_MONTHLY_SEARCHES','SEARCH_VOLUME'],
#'localeCode': 'zh_CN',
'localeCode': 'en_US',
'paging': {
'startIndex': '0',
'numberResults': '50'
}
}
page = targeting_idea_service.Get(selector)[0]


page
{'totalNumEntries': '1', 'entries': [{'data': [{'key': 'KEYWORD_TEXT', 
'value': {'Attribute_Type': 'StringAttribute', 'value': 
'\xe4\xba\xac\xe4\xb8\x9c'}}, {'key': 'TARGETED_MONTHLY_SEARCHES', 'value': 
{'Attribute_Type': 'MonthlySearchVolumeAttribute', 'value': [{'count': 
'673000', 'month': '9', 'year': '2013'}, {'count': '55', 'month': '8', 
'year': '2013'}, {'count': '55', 'month': '7', 'year': '2013'}, 
{'count': '673000', 'month': '6', 'year': '2013'}, {'count': '673000', 
'month': '5', 'year': '2013'}, {'count': '673000', 'month': '4', 'year': 
'2013'}, {'count': '673000', 'month': '3', 'year': '2013'}, {'count': 
'55', 'month': '2', 'year': '2013'}, {'count': '673000', 'month': '1', 
'year': '2013'}, {'count': '55', 'month': '12', 'year': '2012'}, 
{'count': '55', 'month': '11', 'year': '2012'}, {'count': '50', 
'month': '10', 'year': '2012'}]}}, {'key': 'SEARCH_VOLUME', 'value': 
{'Attribute_Type': 'LongAttribute', 'value': '55'}}, {'key': 
'COMPETITION', 'value':
 {'Attribute_Type': 'DoubleAttribute', 'value': '0.16018111006552177'}}]}]}
page
{'totalNumEntries': '1', 'entries': [{'data': [{'key': 'KEYWORD_TEXT', 
'value': {'Attribute_Type': 'StringAttribute', 'value': 
'\xe4\xba\xac\xe4\xb8\x9c'}}, {'key': 'TARGETED_MONTHLY_SEARCHES', 'value': 
{'Attribute_Type': 'MonthlySearchVolumeAttribute', 'value': [{'count': 
'673000', 'month': '9', 'year': '2013'}, {'count': '55', 'month': '8', 
'year': '2013'}, {'count': '55', 'month': '7', 'year': '2013'}, 
{'count': '673000', 'month': '6', 'year': '2013'}, {'count': '673000', 
'month': '5', 'year': '2013'}, {'count': '673000', 'month': '4', 'year': 
'2013'}, {'count': '673000', 'month': '3', 'year': '2013'}, {'count': 
'55', 'month': '2', 'year': '2013'}, {'count': '673000', 'month': '1', 
'year': '2013'}, {'count': '55', 'month': '12', 'year': '2012'}, 
{'count': '55', 'month': '11', 'year': '2012'}, {'count': '50', 
'month': '10', 'year': '2012'}]}}, {'key': 'SEARCH_VOLUME', 'value': 
{'Attribute_Type': 'LongAttribute', 'value': '55'}}, {'key': 
'COMPETITION', 'value':
 {'Attribute_Type': 'DoubleAttribute', 'value': '0.16018111006552177'}}]}]}


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

--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


how get keywords idea avg-monthly-searchs

2013-10-01 Thread Kven Chou
I use to adwords aip python 15.9 get keywords idea avg-monthly searchs.
I found get the data is go great I think is must be error, but I don't know 
what wrong.
for example, I use a keyword '京东' is avg-monthly-search is 45, but I 
use to adwrods api last 12 month search data is so great.


and another question is I find the respond result have many the same 
keyword but join character. I just want to one keyword "京东" value .
like this:

 京东 d17dbea5
中关村 手机 6ed2f332
手机论坛 d3cfae75
京东 b6dc6c6f
中关村手机在线 1d4e9ad7
手机论坛 8379f4ae
手机论坛 d9b50c65
京东 80f2d2d3


here is the code:

client = get_adwords_client(adgroup)
targeting_idea_service = client.GetTargetingIdeaService(
get_adwords_api_client_server(adgroup), settings.ADWORDS_VERSION)

se_list=[]
if list_keyword:
se_list.append({'xsi_type': 'RelatedToQuerySearchParameter',
'queries':list_keyword,
})
if list_url:
se_list.append({'xsi_type': 'RelatedToUrlSearchParameter',
'urls': list_url,
'includeSubUrls': 'false',
})

selector = {
'searchParameters':se_list,
'ideaType': 'KEYWORD',
'requestType': 'IDEAS',

'requestedAttributeTypes':['COMPETITION','KEYWORD_TEXT','TARGETED_MONTHLY_SEARCHES','AVERAGE_CPC'],
'localeCode': 'zh_CN',
'paging': {
'startIndex': '0',
'numberResults': '50'
}
}
page = targeting_idea_service.Get(selector)[0]


 {'data': [{'key': 'KEYWORD_TEXT', 'value': {'Attribute_Type': 
'StringAttribute', 'value': '\xe6\x89\x8b\xe6\x9c\xba\xe8\xae\xba\xe5\x9d\x9b 
73962951'}}, {'key': 'TARGETED_MONTHLY_SEARCHES', 'value': {'Attribute_Type': 
'MonthlySearchVolumeAttribute', 'value': [{'count': '7190653119917507812', 
'month': '8', 'year': '2013'}, {'count': '2837180662550993669', 'month': '7', 
'year': '2013'}, {'count': '4379097957760529529', 'month': '6', 'year': 
'2013'}, {'count': '-121516698172121538', 'month': '5', 'year': '2013'}, 
{'count': '7972359483248904770', 'month': '4', 'year': '2013'}, {'count': 
'-2493020037416799412', 'month': '3', 'year': '2013'}, {'count': 
'-2925132651632636633', 'month': '2', 'year': '2013'}, {'count': 
'2233380720273384832', 'month': '1', 'year': '2013'}, {'count': 
'7661576483403085621', 'month': '12', 'year': '2012'}, {'count': 
'-1594542585843712769', 'month': '11', 'year': '2012'}, {'count': 
'-1286243839618033207', 'month': '10', 'year': '2012'}, {'cou
nt': '-3702806532547623925', 'month': '9', 'year': '2012'}]}}, {'key': 
'AVERAGE_CPC', 'value': {'Attribute_Type': 'MoneyAttribute', 'value': 
{'ComparableValue_Type': 'Money', 'microAmount': '-1661707999724020648'}}}, 
{'key': 'IDEA_TYPE', 'value': {'Attribute_Type': 'IdeaTypeAttribute', 'value': 
'KEYWORD'}}, {'key': 'COMPETITION', 'value': {'Attribute_Type': 
'DoubleAttribute', 'value': '0.8996819140934552'}}]}, {'data': [{'key': 
'KEYWORD_TEXT', 'value': {'Attribute_Type': 'StringAttribute', 'value': 
'\xe6\x89\x8b\xe6\x9c\xba\xe7\xbd\x91 33b192ba'}}, {'key': 
'TARGETED_MONTHLY_SEARCHES', 'value': {'Attribute_Type': 
'MonthlySearchVolumeAttribute', 'value': [{'count': '511923990426407854', 
'month': '8', 'year': '2013'}, {'count': '-7024185127725266423', 'month': '7', 
'year': '2013'}, {'count': '1432105218539389551', 'month': '6', 'year': 
'2013'}, {'count': '7796123776048382958', 'month': '5', 'year': '2013'}, 
{'count': '-6910073575740132733', 'month': '4', 'year': '2013'}, {'count': 
'-97240
7064321991655', 'month': '3', 'year': '2013'}, {'count': 
'-6270978395617501971', 'month': '2', 'year': '2013'}, {'count': 
'-5607953163500128317', 'month': '1', 'year': '2013'}, {'count': 
'1006133561343320185', 'month': '12', 'year': '2012'}, {'count': 
'8016078787127934932', 'month': '11', 'year': '2012'}, {'count': 
'-6277733820210612836', 'month': '10', 'year': '2012'}, {'count': 
'-2495279464611552670', 'month': '9', 'year': '2012'}]}}, {'key': 
'AVERAGE_CPC', 'value': {'Attribute_Type': 'MoneyAttribute', 'value': 
{'ComparableValue_Type': 'Money', 'microAmount': '-6489087103662186088'}}}, 
{'key': 'IDEA_TYPE', 'value': {'Attribute_Type': 'IdeaTypeAttribute', 'value': 
'KEYWORD'}}, {'key': 'COMPETITION', 'value': {'Attribute_Type': 
'DoubleAttribute', 'value': '0.7091070182169941'}}]}, 

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