Holehe Output Formats: Console, JSON-Equivalent Dictionaries, and CSV Export
Holehe supports three output formats: colored human-readable terminal tables, JSON-equivalent Python dictionaries for programmatic use, and CSV files via the --csv flag.
This guide explains each format in the megadose/holehe open-source OSINT tool, with implementation details from the source code and practical code examples.
Human-Readable Console Output
The default holehe output format is a color-coded terminal table designed for quick manual review. When you run holehe from the command line, print_result() in [holehe/core.py](https://github.com/megadose/holehe/blob/master/holehe/core.py#L6-L49) renders results with visual status indicators:
[+]– Account exists (used)[-]– Account does not exist (unused)[x]– Rate-limited[!]– Error occurred
holehe test@example.com
This format prioritizes readability over machine parsing. The coloring and bracketed prefixes allow operators to scan dozens of services at a glance.
JSON-Equivalent Python Dictionaries
For programmatic holehe output, each service module returns a standardized dictionary. This internal format is JSON-compatible and documented in the README.md (lines 72-84).
Each dictionary contains these fields:
| Key | Type | Description |
|---|---|---|
name |
string | Service name (e.g., "twitter") |
rateLimit |
boolean | Whether the request was rate-limited |
exists |
boolean | Whether the account exists |
emailrecovery |
string or null | Partial recovery email if exposed |
phoneNumber |
string or null | Partial phone number if exposed |
others |
dict | Additional service-specific data |
The out list in [holehe/core.py](https://github.com/megadose/holehe/blob/master/holehe/core.py#L166-L180) (lines 166-180) collects these dictionaries during execution.
Using Dictionaries in Python Scripts
import trio
import httpx
from holehe.modules.social_media.snapchat import snapchat
async def main():
email = "alice@example.com"
out = []
client = httpx.AsyncClient()
await snapchat(email, client, out) # ← appends dict to out
await client.aclose()
print(out)
# [{'name': 'snapchat', 'rateLimit': False, 'exists': False, ...}]
trio.run(main)
This holehe output format enables embedding the tool in automation, logging pipelines, or API responses without subprocess calls.
CSV File Export with --csv
For batch processing and spreadsheet import, holehe provides CSV export via the -C or --csv flag. The export_csv() function in [holehe/core.py](https://github.com/megadose/holehe/blob/master/holehe/core.py#L54-L64) (lines 54-64) writes results to a timestamped file and exits.
holehe alice@example.com --csv
# Creates: holehe_1723846445_alice@example.com_results.csv
The CSV contains one row per service with columns: name, rateLimit, exists, emailrecovery, phoneNumber, others.
This format integrates with Excel, Google Sheets, pandas, and BI tools for downstream analysis.
Full Programmatic Workflow with CSV Export
Combine all modules with CSV output using holehe's internal API:
import trio
import httpx
from holehe.core import import_submodules, get_functions, export_csv
async def run(email: str, csv: bool = False):
modules = import_submodules("holehe.modules")
websites = get_functions(modules)
client = httpx.AsyncClient()
out = []
async with trio.open_nursery() as nursery:
for module in websites:
nursery.start_soon(module, email, client, out)
await client.aclose()
if csv:
# Mimic argparse namespace for export_csv compatibility
args = type("Args", (), {"csvoutput": True})()
export_csv(out, args=args, email=email)
trio.run(run, "alice@example.com", csv=True)
This demonstrates how the holehe output format transitions from internal dictionaries to persistent CSV files.
Key Implementation Files
| File | Purpose |
|---|---|
[holehe/core.py](https://github.com/megadose/holehe/blob/master/holehe/core.py) |
print_result() (lines 6-49), export_csv() (lines 54-64), result collection (lines 166-180) |
holehe/modules/*/*.py |
Service modules returning standardized dictionaries |
[README.md](https://github.com/megadose/holehe/blob/master/README.md#L74-L84) |
Output schema documentation |
Summary
- Console tables: Default human-readable output from
print_result()in [holehe/core.py](https://github.com/megadose/holehe/blob/master/holehe/core.py#L6-L49) - JSON-equivalent dictionaries: Internal Python format with six standardized keys, suitable for programmatic consumption
- CSV files: Generated by
export_csv()using the--csv/-CCLI flag for spreadsheet and analysis tool integration
All three formats share the same underlying data structure, ensuring consistency whether you interact with holehe via terminal, Python import, or batch automation.
Frequently Asked Questions
What is the default output format for holehe?
The default is a color-coded terminal table showing [+], [-], [x], and [!] status prefixes for used, unused, rate-limited, and error states respectively. This is generated by print_result() in [holehe/core.py](https://github.com/megadose/holehe/blob/master/holehe/core.py#L6-L49).
Can holehe output be used in Python scripts without the CLI?
Yes. Import individual modules from holehe.modules and pass an out list to collect dictionaries. Each module appends a result dict with keys name, rateLimit, exists, emailrecovery, phoneNumber, and others.
How do I export holehe results to CSV?
Use the --csv or -C flag: holehe email@example.com --csv. The export_csv() function in [holehe/core.py](https://github.com/megadose/holehe/blob/master/holehe/core.py#L54-L64) creates a timestamped CSV file with all result fields.
Is the internal dictionary format compatible with JSON?
Yes. The module output dictionaries use JSON-compatible types (strings, booleans, nulls), so you can serialize them directly with json.dumps() for logging, APIs, or network transmission.
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 →