Post

MailGrab – The Ultimate Email Scraper That Does It All

MailGrab is an advanced Python-based email scraper that auto-discovers URLs, harvests bulk emails, and stores them automatically. Now updated for v2.0.0: concurrent crawling, an MCP server for AI agents, and more.

MailGrab – The Ultimate Email Scraper That Does It All

MailGrab – The Ultimate Email Scraper That Does It All

Table of Contents


What is MailGrab?

Have you ever needed to collect a bunch of email addresses from websites but didn’t want to manually copy and paste them one by one? Enter MailGrab, your new best friend in web scraping! Built using Python, MailGrab is a powerful, multi-platform tool that automatically finds and extracts email addresses from a list of URLs—and even digs into sub-URLs to make sure nothing’s missed.


What’s New in MailGrab v2.0.0

I shipped MailGrab v2.0.0 on September 3, 2026, and it’s a bigger update than a quick note here can do justice to: concurrent crawling, robots.txt compliance by default, email de-obfuscation, structured CSV/JSON output, and an MCP server that lets AI coding agents like Claude Code, Cursor, and GitHub Copilot crawl a site and pull emails directly instead of you shelling out to the CLI by hand.

I wrote up the full technical rundown separately, including why the MCP server runs each call in its own isolated subprocess and what changed under the hood for crawling and correctness, in a dedicated v2.0.0 post.


Why Email Scraping Matters Today

Emails are digital currency. Whether you’re doing outreach, lead generation, market research, or building contact lists, having access to the right emails is crucial. MailGrab makes the process fast, automatic, and efficient.


Key Features of MailGrab

Auto URL Discovery

MailGrab will crawl through sub-URLs too! If the main page links to blog posts or product pages, it digs in.

Bulk Email Harvesting

Give it a huge list of URLs and it works through all of them, using the concurrency and rate-limit settings described above so a large list doesn’t overwhelm a target site.

Automatic Data Storage

Results are stored in:

  • _emails.txt: All collected email addresses
  • _scrappedUrls.txt: All scanned URLs

Who Can Benefit from MailGrab?

  • Digital marketers expanding email lists
  • Researchers collecting contact info
  • Developers learning or building scrapers
  • Students practicing automation
  • Startups doing outreach

Supported Platforms

MailGrab runs on:

  • Windows
  • Linux
  • macOS

Requirements Before Installation

  • Python 3.9 (specifically 3.9.0)
  • Internet connection
  • pip3 installed

How to Install MailGrab

1
2
git clone https://github.com/oceanofanything/MailGrab
cd MailGrab

Windows

1
install.bat

Or manually:

1
python -u install.py

Linux

1
sudo python -u install.py

macOS

  1. Download Python 3.9: Python 3.9 Download
  2. Install it
  3. Run:
1
sudo python -u install.py

Step-by-Step Python 3.9 Setup for Beginners

macOS

  • Download and run Python 3.9 .pkg installer
  • Add Python to PATH if needed

Ubuntu/Linux

1
2
3
4
5
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9
python3.9 --version

How MailGrab Works Behind the Scenes

MailGrab:

  1. Accepts a list of URLs
  2. Parses HTML and finds email patterns
  3. Recursively visits sub-links
  4. Stores data into simple .txt files

Best Practices for Email Scraping

  • Scrape only public pages
  • Avoid login-required areas
  • Respect robots.txt
  • Use throttling to avoid getting blocked

Scraping public data is legal in most cases—but how you use that data must comply with laws like GDPR and CAN-SPAM.


Security and Privacy Considerations

MailGrab is open-source and runs locally. No data is sent anywhere. You’re in control.


Tips to Maximize Your Scraping Results

  • Use proxies if needed
  • Focus on high-content domains
  • Validate emails after scraping
  • Filter duplicates with Python

MailGrab in Action – Real-World Use Cases

  • Marketers scraping leads
  • Students extracting faculty contacts
  • Researchers building databases
  • Startups building contact networks

MailGrab Alternatives

MailGrab isn’t the only open-source email scraper worth knowing about. theHarvester is a longer-established OSINT tool that pulls emails alongside subdomains and hostnames from public sources, with a much bigger security-community track record behind it. EmailHarvester takes a narrower, search-engine-only approach to one domain at a time. GHunt is a different tool altogether, built for OSINT on Google accounts rather than general web crawling.

For a fuller comparison, including how each one stacks up and who it actually fits, see our roundup of the best email scraper projects on GitHub.


Conclusion

If you’re tired of the manual grind of email collection, MailGrab is your shortcut to automation. Whether you’re doing research, marketing, or development, MailGrab’s ease of use and power make it a must-have.


Frequently Asked Questions

Q1: Can MailGrab extract emails from PDFs or docs? No. It’s only for web pages.

Q2: What’s the max number of URLs? No fixed limit. Break large lists into chunks for best results.

Q3: Is MailGrab safe? Yes. It runs locally and doesn’t share your data.

Q4: Mobile support? Not at this time.

Q5: Can I contribute to MailGrab? Yes! Fork it on GitHub and submit your pull requests.

This post is licensed under CC BY 4.0 by the author.