Hi, Peter

Thank you for replying to me.

I am using python3.6
I don't know how to get SOAP and I provide my code to help you.

and
question.1: 
requestType:'STATS , but I don't get "apple watch"

question.2:
I use the function twice to get results (requestType: 'STATS', requestType: 
'IDEAS') , like picture1.png, UI tool get 32 results, but api get 1 + 28 
results.


Best.

VERSION = 'v201809'
PAGE_SIZE = 700 # The maximum number of results for 
TargetingIdeaService.get() 700


def function(client, request_type, keywords, ad_group_id=None, offset=0, log
=None):
targeting_idea_service = client.GetService('TargetingIdeaService', version=
VERSION)

selector = {
'ideaType': 'KEYWORD',
'requestType': request_type,
'requestedAttributeTypes': [
'KEYWORD_TEXT',
'SEARCH_VOLUME',
'COMPETITION',
'AVERAGE_CPC',
'TARGETED_MONTHLY_SEARCHES',
],
'paging': {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
},
'searchParameters': [
{'xsi_type': 'RelatedToQuerySearchParameter', 'queries': keywords},
{'xsi_type': 'LanguageSearchParameter', 'languages': {'id': '1018'}}, # 
1018=繁體中文
{'xsi_type': 'LocationSearchParameter', 'locations': {'id': '2158'}}, # 
2158=tw
{'xsi_type': 'NetworkSearchParameter', 'networkSetting': {
'targetGoogleSearch': True,
'targetSearchNetwork': False,
'targetContentNetwork': False,
'targetPartnerSearchNetwork': False
}},
],
}

if ad_group_id:
selector['searchParameters'] += [
{'xsi_type': 'SeedAdGroupIdSearchParameter', 'adGroupId': ad_group_id}
]

more_pages = True
while more_pages:
page = targeting_idea_service.get(selector)
pass
offset += PAGE_SIZE
selector['paging']['startIndex'] = str(offset)
more_pages = offset < int(page['totalNumEntries'])

return 



Peter Oliquino (AdWords API Team)於 2018年12月6日星期四 UTC+8上午2時00分32秒寫道:
>
> Hi Chen,
>
> Thank you for contacting support. For your question #1, the search term 
> would not be included in the results when your requestType 
> <https://developers.google.com/adwords/api/docs/reference/v201809/TargetingIdeaService.RequestType>
>  = 
> IDEAS. If you wish to have the '*apple watch*' included, you will need to 
> change your requestType with STATS as the value.
>
> As for your question #2, could you also provide your SOAP request and 
> response logs generated so I can further investigate? You may reply to me 
> via the *Reply privately reply to author* option.
>
> Best regards,
> Peter
> AdWords API Team
>
> On Thursday, December 6, 2018 at 1:24:51 AM UTC+8, Chen Roger wrote:
>>
>>
>> I have a problem.
>>
>> I use the 'TargetingIdeaService api' to get the keyword hint results. But 
>> the content obtained is not the same as the result of the tool.
>>
>> --- information ---
>> Qualified developer token
>> python3.6
>> macOS system
>> -----------------------
>>
>> I checked my code and set the conditions as the tool.
>>
>> Because most of the word tools and api results are the same. But there 
>> are still exceptions
>>
>> question1 :
>> Refer picture1.png
>> i search 'apple watch' get 355 results. But I only got 354 with using 
>> api, the result not include 'apple watch
>>
>> question2 :
>> i search '香水' get 32 results. But I only got 29 with using api.
>>
>>
>> please help me to solve this problem. thanks
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/62ba96e3-51ad-4e0c-a2ea-0428c618f523%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum
    • ... Chen Roger
      • ... Chen Roger
        • ... Chen Roger
          • ... 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum
            • ... Chen Roger
    • ... Chen Roger

Reply via email to