How to Export Holehe Results to CSV: Command-Line and Python Guide
Holehe supports native CSV export via the --csv (or -C) flag, which automatically writes timestamped results to holehe_<unix-timestamp>_<email>_results.csv in the current working directory.
Holehe is an open-source OSINT tool maintained by megadose/holehe that checks email addresses against hundreds of online services. When you need to archive scan results or analyze them in spreadsheet applications, you can export Holehe results to CSV using built-in functionality. The export logic is implemented in holehe/core.py and accessible both via command-line interface and programmatically through the Python API.
Command-Line CSV Export
The fastest way to export Holehe results to CSV is using the --csv (short -C) argument. When this flag is present, Holehe creates a CSV file automatically after completing the scan.
Basic CSV Export
To save a standard scan to CSV, append the -C flag to your command:
holehe -C user@example.com
This executes the full lookup sequence and then writes the results to a file named holehe_<unix-timestamp>_user@example.com_results.csv in your current directory.
Filtering Results Before Export
You can combine the CSV flag with other options such as --only-used to limit the export to services where the email is confirmed active:
holehe --only-used -C user@example.com
The filtering occurs before the export, so only the subset of results you specify are written to the CSV file.
CSV Output Structure
According to the implementation in holehe/core.py (lines 54-65), the export_csv function generates files following this naming convention:
holehe_<unix-timestamp>_<email>_results.csv
Each row in the CSV represents one service check and preserves all fields returned by the Holehe modules, including:
domain– the service domain checkedexists– boolean indicating if the email is registeredemailrecovery– recovered email addresses (if available)phoneNumber– recovered phone numbers (if available)- Additional metadata fields returned by specific modules
Programmatic CSV Export in Python
If you are embedding Holehe in a custom Python workflow, you can trigger the same CSV export logic directly without invoking the CLI. The export_csv function in holehe/core.py handles the file creation and writing.
from holehe.core import export_csv
# results: list of dictionaries returned by the scanning process
# args: argparse.Namespace object with csvoutput=True
# email: string of the target email address
export_csv(results, args, email)
This approach is useful when building automated OSINT pipelines or when you need to process the data in memory before deciding to write to disk.
Summary
- Use the
--csvor-Cflag to automatically export Holehe results to CSV from the command line - Output files are named
holehe_<unix-timestamp>_<email>_results.csvand saved in the working directory - The
export_csvfunction inholehe/core.py(lines 54-65) handles all CSV writing operations - All module-returned fields—including
domain,exists,emailrecovery, andphoneNumber—are preserved in the export - Combine with flags like
--only-usedto filter data before exporting
Frequently Asked Questions
Does Holehe support CSV export natively?
Yes. The functionality is built into the core tool via the --csv / -C argument, defined in the argument parser at lines 92-94 of holehe/core.py. No additional plugins or post-processing scripts are required.
What filename format does Holehe use for CSV exports?
Holehe generates filenames using the pattern holehe_<unix-timestamp>_<email>_results.csv. For example, a scan against user@example.com executed at Unix timestamp 1728001234 produces holehe_1728001234_user@example.com_results.csv.
Can I export CSV results when using Holehe as a Python library?
Yes. Import the export_csv function from holehe/core.py and pass it your results list, an argparse.Namespace object with csvoutput=True, and the target email string. This writes the CSV using the same logic as the CLI.
Which data fields are included in the exported CSV?
The CSV contains every field returned by each Holehe module, including but not limited to domain, exists, emailrecovery, and phoneNumber. The exact columns depend on which services return data during the scan.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →