Set queries field to a list of keywords for Python API

46 views
Skip to first unread message

Muhammad Shoaib

unread,
Oct 9, 2019, 8:14:45 AM10/9/19
to AdWords API and Google Ads API Forum
Hi there, 

I want to get the search volume for a couple of hundred keywords using the Adwords API. I can't figure it out from the Python version of the documentation, how to set the following queries field to a list of individual keywords.

selector['searchParameters'] = [{
   
'xsi_type': 'RelatedToQuerySearchParameter',
   
'queries': ['space cruise']
}]




I would like to treat space and cruise as separate keywords and get their search volume. 

Or do I have to select this query two times if I want to find the search volume for both the keywords individually?  Such as follows:

selector['searchParameters'] = [{
    
'xsi_type': 'RelatedToQuerySearchParameter',
    
'queries': ['space']
}]

selector['searchParameters'] = [{
    
'xsi_type': 'RelatedToQuerySearchParameter',
    
'queries': ['cruise']
}]

Thanks

Google Ads API Forum Advisor Prod

unread,
Oct 9, 2019, 4:11:59 PM10/9/19
to muhamma...@visable.com, adwor...@googlegroups.com

Hi Muhammad,

Thanks for reaching out to our team.

The correct format would be as follows,

selector['searchParameters'] = [{

    'xsi_type': 'RelatedToQuerySearchParameter',

    'queries': ['space', 'cruise']

}]

Please let me know if you have any further questions.

Regards,
Xiaoming, Google Ads API Team



ref:_00D1U1174p._5001UKMhax:ref

Muhammad Shoaib

unread,
Oct 9, 2019, 4:48:17 PM10/9/19
to AdWords API and Google Ads API Forum

Thanks, Xianoming. One more question. Is there a limit on the number of keywords in the list assigned to ‘queries’? For example, in the web version, only ten keywords can be looked up at a time. 

 

I have a few thousands of keywords and would like to know how many I can send at a time in STATs request.

 

Regards

Muhammad

Google Ads API Forum Advisor Prod

unread,
Oct 10, 2019, 11:16:45 AM10/10/19
to muhamma...@visable.com, adwor...@googlegroups.com

Hi Muhammad,

The limit of keywords per stats request is 700. You could execute a few queries if you have a few thousands of them. Let me know if you have any further concerns.



Regards,
Xiaoming, Google Ads API Team



ref:_00D1U1174p._5001UKMhax:ref
Reply all
Reply to author
Forward
0 new messages