Google Search Results Scraper

Abhishek Chaudhary
3 min readFeb 3, 2022


How to Scrape result count for all the keywords given?


Google Search Results Scraper


The modules are well documented, it shows you how to collect the data, I want to improve it a little bit so that the data will be saved as CSV and you can use it for doing your research as a machine learning engineer. Here is the code that I created.

Without Coding

To make a bot which searches keyword on and scrapes its result count, follow these steps:-

1. To create a new bot, click DK extension and type “google_count” and then click “ + New Api”.

2. Now open in the browser before training the bot, and click “Record” to train the bot.

3. Now click button to add output variable and click “save”.

4. Reload the page to add the URL to the event.

5. To train the bot to search a keyword, first type a keyword(eg: dog) in google search and press enter.

6. Now right click on the results count, then click Datakund=>Scrape=>Text=>results_count, to scrape the results count.

7. Now stop the training(by clicking ), and click “run”.

8. Click the down arrow beside the run button, click “Run Google Sheet” and click “Open Sheets”.

9. Google Sheets will open and then type all the input keywords from the 3rd row, and close the sheets.

10.Now go back to the browser and click “Run Google Sheet”, and wait for the bot to run and click open sheets.

11. Now click on “Google Sheet” button and you can see the below image, that our bot scraped all the search count.