MatthewGraham
BANNED
You can scrape a lot of things with Google Sheets -- here's one of many things you can do with this. Script searches for "site:domain.com" in Google to check if there are indexed results for the input URL.
No need to run proxies since Google is scraping on your behalf and then returning the data to you.
This base code can be modified to scrape many other things as well. Working well for Reddit, as well as a number of other websites.
Step #1: Open the Script Editor in Google Sheets
Go to Tools --> Script Editor... to open the script editor.
Step #2: Copy-Paste Code into Script Editor
Make sure to save the file with Ctrl+S. The code to copy-paste is below.
The file should look like the above once the code is inserted.
Step #3: Run the Function in Google Sheets
Step #4: Use the Output
Bonus: Use conditional formatting to add red/green highlight to cells depending on whether or not the input URL is indexed.
Your output should look something like this.
No need to run proxies since Google is scraping on your behalf and then returning the data to you.
This base code can be modified to scrape many other things as well. Working well for Reddit, as well as a number of other websites.
Step #1: Open the Script Editor in Google Sheets

Go to Tools --> Script Editor... to open the script editor.
Step #2: Copy-Paste Code into Script Editor
Make sure to save the file with Ctrl+S. The code to copy-paste is below.
Code:
function checkIfPageIsIndexed(url)
{
url = "https://www.google.com/search?q=site:"+url;
var options = {
'muteHttpExceptions': true,
'followRedirects': false
};
var response = UrlFetchApp.fetch(url, options);
var html = response.getContentText();
if ( html.match(/Your search -.*- did not match any documents./) )
return "URL is Not Indexed";
return "URL is Indexed";
}

The file should look like the above once the code is inserted.
Step #3: Run the Function in Google Sheets

The function that was created in step #2 (checkIfPageIsIndexed(url)) can be run the same as any other spreadsheet function.
Step #4: Use the Output
Bonus: Use conditional formatting to add red/green highlight to cells depending on whether or not the input URL is indexed.

Your output should look something like this.
Attachments
Last edited by a moderator: