theHarvester
The must-have OSINT reconnaissance tool to collect emails, names, subdomains and public data
What is theHarvester?
theHarvester is an OSINT reconnaissance tool written in Python that collects public information from more than 40 different sources. Created by Christian Martorella and maintained by the EdgeSecurity community, it has become a standard for the passive reconnaissance phase.
The tool excels at the automated collection of email addresses, people's names, subdomains, IP addresses and URLs. Unlike active scanning tools, theHarvester only uses public sources, making reconnaissance fully passive and undetectable.
Key points
- 40+ sources - Search engines, social networks, DNS, APIs
- Passive reconnaissance - No direct interaction with the target
- Multi-format export - JSON and XML for easy integration
- Open source - Code available on GitHub, constantly updated
Core capabilities
Discover the features that make theHarvester essential for OSINT reconnaissance
Email collection
Automatic extraction of email addresses from multiple public sources
- Bing, Brave, Yahoo
- Hunter, RocketReach
- Patterns validation
- Deduplication
Subdomain discovery
Full enumeration of subdomains and related SSL certificates
- DNS enumeration
- Certificate transparency
- DNSDumpster
- Shodan integration
Passive reconnaissance
OSINT investigation with no direct interaction with the target
- Passive scanning
- No direct contact
- Stealth mode
- Public data only
API integrations
Native connection to the main threat intelligence platforms
- Shodan API
- VirusTotal API
- SecurityTrails
- Hunter.io
Export multi-format
Report generation in several formats for analysis and reporting
- JSON export
- XML format
- SQLite database
- Result replay
Automatisation
CLI and Python scripts to plug into your reconnaissance workflows
- CLI interface
- Python library
- Batch processing
- Scheduled scans
Data sources
More than 40 built-in sources for thorough reconnaissance
Search engines
Emails, subdomains
Emails, domains
Emails, contacts
Asia-Pacific data
Private search
Social & professional networks
Emails, address format (API key)
Employees, job titles (API key)
Domain mentions in code (API key)
Professional emails (API key)
DNS & Certificats
Subdomains, DNS records
SSL/TLS certificates
Subdomains via certificates
DNS resolutions, malware
Intelligence & APIs
Devices, ports, banners
Historical DNS data
Email verification
Website scanning
Installation
Install theHarvester in minutes
Install with pip (recommended)
sudo apt install theharvesterPackage maintained in the Kali Linux repositories
Install from GitHub
git clone https://github.com/laramies/theHarvester.git
cd theHarvester
uv sync
uv run theHarvester -hTo get the development version with the latest features
Check the installation
theHarvester -hShows the help and confirms the installation succeeded
OSINT use cases
Practical scenarios for using theHarvester in investigations
Company reconnaissance
Gather information about a target organization
Identify the target's main domain
Run a multi-source search (Bing, Brave, crt.sh)
Collect employee email addresses
Map the organizational structure
Identify subdomains and infrastructure
Analyze email patterns (@company.com)
Produce an initial reconnaissance report
Subdomain enumeration
Discover all of an organization's subdomains
Use crt.sh for SSL certificates
Query DNSDumpster for mapping
Cross-check with VirusTotal and Shodan
Identify live subdomains
Detect exposed services
Analyze DNS configurations
Document the attack surface
Social media monitoring
Monitor an organization's social presence
Cross-check the names found with the company website and public profiles
Identify key employees and their roles
Analyze Twitter posts and mentions
Map the professional network
Detect leaked sensitive information
Track staff movements
Build an organizational profile
Command examples
Practical commands for different reconnaissance scenarios
Basic commands
theHarvester -d example.com -l 500 -b bing,duckduckgoSearch engines, limited to 500 results
theHarvester -d example.com -b allSearch across all available sources
theHarvester -d example.com -b crtsh,certspotter -l 200Certificate Transparency sources, 200 results max
DNS & domain search
theHarvester -d example.com -b crtsh,dnsdumpsterSubdomain enumeration via certificates and DNS
theHarvester -d example.com -b virustotalVirusTotal search (key set in api-keys.yaml)
theHarvester -d example.com -b crtsh -s-s queries Shodan for discovered hosts (key in api-keys.yaml)
Export & Automation
theHarvester -d example.com -b all -f report-f saves results to report.json and report.xml
theHarvester -d example.com -b all -n-n performs reverse DNS on the ranges found
theHarvester -d example.com -b all -v -r -f full_scan-v verifies hosts via DNS, -r resolves subdomains, JSON + XML export
Best practices
Essential recommendations for responsible and effective use
Do
- Combine several sourcesUse -b all or combine Bing, Brave, crt.sh and API-key sources for more results
- Export the resultsSave to JSON/XML for later analysis and documentation
- Use API keysConfigure Shodan, VirusTotal, SecurityTrails for richer results
- Validate emailsCheck the patterns and validity of the addresses found
- Document your researchKeep track of sources and collection dates
- Use a VPN/proxyProtect your IP during intensive searches
Avoid
- Flooding requestsAvoid overly frequent searches that can get your IP blocked
- Ignoring API limitsRespect the quotas of Shodan, VirusTotal and other services
- Relying on a single sourceAlways cross-check information across several sources
- Storing sensitive data carelesslyEncrypt your exports and protect the information you collect
- Skipping verificationNot every result is valid: filter out false positives
- Using it without authorizationMake sure you are authorized to perform reconnaissance
Complete practical example
A complete investigation workflow on an organization
Investigation : Example Corp
Initial reconnaissance - Emails
theHarvester -d example.com -l 500 -b bing,duckduckgo,yahoo -f emailsCollect email addresses from several sources
Subdomain enumeration
theHarvester -d example.com -b crtsh,certspotter,dnsdumpster -f subdomainsDiscover infrastructure through certificates and DNS
Intelligence with APIs
theHarvester -d example.com -b virustotal,securityTrails -s -f intelEnrichment with Shodan and VirusTotal data
Full report
theHarvester -d example.com -b all -v -f complete_reportFinal JSON and XML export with all the data
Resources and documentation
Useful links to go further
Ready to start reconnaissance?
Explore other powerful OSINT tools and practice with our real-world case studies

Ready to put it into practice?
CyberXTEL is our free platform to train hands-on: certifications, CTFs and a dedicated cyber awareness space.