from googlesearch.googlesearch import GoogleSearch def google_query(query, api_key, cse_id, **kwargs): query_service = build("customsearch", "v1", developerKey=api_key, cache_discovery=False) query_results = query_service.cse().list(q=query, # Query cx=cse_id, # CSE ID **kwargs ).execute() return query_results['items']
Coding is one of my job from 2001. I have written codes for many projects but I cannot remember all of them. I hope this blog help me do that.