All the stuff I use in the video is linked at the bottom of this post. If you're just here for the script or the search string, scroll down and you're sorted.
Also, the full video is here if you’d rather watch:
👉 https://youtu.be/QVLV3S1OhbE
Easiest way by far. Install the Chrome extension, visit the site, and it finds the emails. You get 25 free searches per month, then it’s paid. Good for quick jobs, not bulk scraping.
Old-school but solid. Use Google with this search:
site:example.org contact OR email OR "get in touch"
Then hit Command+F and search for “@”. You can even copy the whole page and ask ChatGPT to find the emails for you.
If you’ve got a list of websites, this is the one. Paste them in a Sheet, run the script below, and it’ll grab any email addresses it finds in the HTML.
function getEmailsFromWebsite(url) {
Logger.log("🔍 Starting email scrape for: " + url);
if (!url) {
Logger.log("⚠️ No URL provided");
return "no url";
}
try {
Logger.log("📡 Fetching content from: " + url);
const response = UrlFetchApp.fetch(url, { muteHttpExceptions: true });
const code = response.getResponseCode();
Logger.log("✅ Response code: " + code);
if (code !== 200) {
Logger.log("❌ Non-200 response");
return "error loading page";
}
const html = response.getContentText();
Logger.log("📄 HTML length: " + html.length);
const regex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-z]{2,}/gi;
const matches = html.match(regex);
if (!matches) {
Logger.log("🔍 No emails found");
return "no emails found";
}
const uniqueEmails = [...new Set(matches)];
Logger.log("📧 Emails found: " + uniqueEmails.join(', '));
return uniqueEmails.join(', ');
} catch (err) {
Logger.log("💥 Error: " + err.message);
return "script error";
}
}
site:example.org contact OR email OR "get in touch"
That’s it. Pick the one that suits your workflow. If you’ve got questions or better methods, drop a comment on the vid. Cheers.
I like to do one free build every month — no catch, just keen to help out where I can. Just fill in the form on this section and we can go from there.
Get in touch