Welcome to the MMOLEARN.COM

Build your first Dropshipping, Online Course, Affiliate, Blog, Business, Optin, etc, WEBSITE and make money with us. We offer over 10.000+ Wordpress Plugins & Themes which will let you build ANYTHING. Plus we have nice community which likes to gossip about building websites and making some money online! Its really easy to do when we have everything you need to BUILD anything you WANT. Hope you enjoy your stay and have a beautiful day with us!

or Register

SEO Learn an easy trick to bulk check if URLs are indexed in Google Sheets.

Babushka

Well-known member

VIP MEMBER
Reputation: 62%
Joined
Jul 28, 2022
Messages
287
Reaction score
158
Points
179
Google Sheets is a powerful tool for scraping various types of data. One way to use it is by running a script that checks whether a given URL has been indexed on Google by searching for 'site:domain.com'. The script relies on Google's own scraping capabilities, so there's no need to use proxies or other tools. This code can be adapted to scrape data from other sources, too. It works well for websites like Reddit and many others. To get started, open the Script Editor in Google Sheets.

1.png

Step #2: Paste the code into the script editor and save the file by using Ctrl+S. The code that needs to be copied and pasted is provided below.

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"; }

2.png

Step #3: Execute the Function in Google Sheets

3.png

Step #4: Use the Output

Bonus: Implement Conditional Formatting to Highlight Cells based on Indexing Status

4.png

The resulting output may resemble the following.
 

KixSpecials

Well-known member

Reputation: 27%
Joined
Sep 13, 2019
Messages
200
Reaction score
27
Points
46
This tip is truly valuable, coming from an actual practitioner rather than someone merely speculating. Well done!
 

Jazzmed

Active member

Reputation: 29%
Joined
Dec 25, 2022
Messages
235
Reaction score
21
Points
36
Although I don't frequently bookmark posts, this one is exceptional. Thank you for sharing such valuable content.
 

Iamgi

Active member

Reputation: 28%
Joined
May 10, 2021
Messages
213
Reaction score
24
Points
44
Google Sheets is a powerful tool for scraping various types of data. One way to use it is by running a script that checks whether a given URL has been indexed on Google by searching for 'site:domain.com'. The script relies on Google's own scraping capabilities, so there's no need to use proxies or other tools. This code can be adapted to scrape data from other sources, too. It works well for websites like Reddit and many others. To get started, open the Script Editor in Google Sheets.

View attachment 27932

Step #2: Paste the code into the script editor and save the file by using Ctrl+S. The code that needs to be copied and pasted is provided below.

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"; }

View attachment 27933

Step #3: Execute the Function in Google Sheets

View attachment 27934

Step #4: Use the Output

Bonus: Implement Conditional Formatting to Highlight Cells based on Indexing Status

View attachment 27935

The resulting output may resemble the following.
Are there any specific books or articles that you would like me to recommend based on your interests or the subject matter you're interested in?
 
Top Bottom