Google Scraper in Google Docs (Update)

Sometime last Monday, Google made changes to their results page.  ImportXML doesn’t work anymore.  So here’s a function you can use to get SERP results from Google.

Google Scraper in Google Docs Spreadsheet:

Google Docs

Source code

Latest Update: v1.2 Adds the ability to get page 2, 3, 4… etc using an offset (thanks @johnsee)

How to use it:

1. Click on File > Make a copy.  Name it whatever you want.

2. In your spreadsheet, use this formula: =googleScraper("my keyword here")

That will default to 10 results.

To get more results:

Add a second parameter like this: =googleScraper("my keyword here", 30)

To add the formula to a different spreadsheet:

1. Go to the source code for google_scraper.js

2. Copy all that code to your clipboard

3. Create your new spreadsheet

4. Click on Tools > Script Editor

5. Paste all the code into the editor and save.


* 1.2.0 – Added ability to offset results (thanks @johnsee)
* 1.1.0 – Added ability to change the TLD
* 1.0.1 – Fixed Non-URL universal searches getting returned (Thanks Gareth Brown)
* 1.0.0 – Initial release