TargetingIdeaService api results different from the keyword panning tool resutls

71 views
Skip to first unread message

Chen Roger

unread,
Dec 5, 2018, 12:24:51 PM12/5/18
to AdWords API and Google Ads API Forum

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
picture1.png

Peter Oliquino (AdWords API Team)

unread,
Dec 5, 2018, 1:00:32 PM12/5/18
to AdWords API and Google Ads API Forum
Hi Chen,

Thank you for contacting support. For your question #1, the search term would not be included in the results when your 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

Chen Roger

unread,
Dec 5, 2018, 9:20:50 PM12/5/18
to AdWords API and Google Ads API Forum
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秒寫道:

Chen Roger

unread,
Dec 5, 2018, 11:22:39 PM12/5/18
to AdWords API and Google Ads API Forum
update 

---

I found the problem (bug?)

Different languages lead to different results
But any language,  if it is its own keyword,  can show results with keyword planner tool.

example1
keywrod: "apple watch"
location: Taiwan
language: English
UI tool can get result, api can get result also

example2
keywrod: "apple watch"
location: Taiwan
language: Chinese (traditional)
UI tool can get result, but api can't

Chen Roger

unread,
Dec 6, 2018, 4:30:13 AM12/6/18
to AdWords API and Google Ads API Forum
I think API should not have such an error.



Chen Roger於 2018年12月6日星期四 UTC+8下午12時22分39秒寫道:

Peter Oliquino (AdWords API Team)

unread,
Dec 6, 2018, 11:23:36 AM12/6/18
to AdWords API and Google Ads API Forum
Hi Chen,

My apologies for the delay. Could you try and enable SOAP logging on your end through this guide and retry your requests both in the Chinese and English language? Once the SOAP logs are generated, you may send them to me privately through the Reply privately to author option.

Thanks and regards,
Peter
AdWords API Team

Chen Roger

unread,
Dec 6, 2018, 9:54:25 PM12/6/18
to AdWords API and Google Ads API Forum
After I tried, I successfully completed the SOAP file.
The result will be sent to you


Peter Oliquino (AdWords API Team)於 2018年12月7日星期五 UTC+8上午12時23分36秒寫道:

Chen Roger

unread,
Dec 9, 2018, 10:46:19 PM12/9/18
to AdWords API and Google Ads API Forum
Hi Peter,

I have already sent you the SOAP file.
Is there any result?



---
I look forward to hearing from you.
Reply all
Reply to author
Forward
0 new messages