I would like to write a program that loops through about 7000 entries of a certain keyword and then searches Google for that keyword. Then for each keyword, I would like to return the number of search results. Finally, I would like to populate a pandas
dataframe like structure with keyword1, no_results1, keyword2, no_results2, ..., keywordn, no_resultsn.
I am proficient with python
and use of web scraping tools like BeautifulSoup
and selenium
. However, I am also aware that it is not necessarily legal or conforming to Google's terms and conditions to use their search engine willy nilly.
Therefore, I looked into the google JSON API
which appears to be somewhat suited to my usage. However, the self-proclaimed goal of this API is as follows:
Google Custom Search enables you to create a search engine for your website, your blog, or a collection of websites. You can configure your engine to search both web pages and images. You can fine-tune the ranking, add your own promotions and customize the look and feel of the search results. You can monetize the search by connecting your engine to your Google AdSense account.
Which is not quite what I need. Is it possible/legal to use google custom search features without creating one's own website?