dev_key = '<Your developer key>'

def google_search(search_term, cse_id, **kwargs):
    service = build('customsearch', 'v1', developerKey=dev_key)
res = service.cse().list(q=search_term, cx=cse_id, **kwargs).execute()
return res['items']
results = google_search('boxer dogs', my_cse_id, num=10, cr='countryCA', lr
    ='lang_en')
for result in results:
    pass
Как запросить расширенный поиск с помощью Google Customsearch API?