# How to Display Only Used Accounts with Holehe CLI

> Easily display only used accounts with the Holehe CLI. Learn to use the --only-used flag to filter results and show registered email services, hiding unused sites and errors.

- Repository: [Palenath/holehe](https://github.com/megadose/holehe)
- Tags: how-to-guide
- Published: 2026-08-26

---

**Use the `--only-used` flag when running Holehe from the command line to filter results and display only services where the email address is registered, hiding unused sites, rate limits, and errors.**

When investigating email addresses across social media platforms and online services, the open-source OSINT tool Holehe generates verbose output that includes every site checked. To streamline reconnaissance and display only used accounts, Holehe provides a built-in CLI filter that hides negative results and shows only confirmed registrations.

## Using the `--only-used` Flag

The simplest way to display only used accounts is appending the `--only-used` flag to your command. This argument is parsed in [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py) at lines 84-86, where it sets the `onlyused` attribute in the CLI arguments object.

When enabled, Holehe suppresses entries marked as unused, rate-limited, or error states, showing only lines prefixed with `[+]` that indicate a confirmed account exists.

```bash

# Default scan - shows all results including unused sites and errors

holehe test@example.com

# Filtered scan - display only used accounts

holehe test@example.com --only-used

```

## How the Filtering Works in the Source Code

According to the megadose/holehe source code, the filtering logic resides in the `print_result` function within [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py) (lines 22-30). This function iterates through the results and checks the boolean value of `results["exists"]`.

Only entries where `results["exists"] == True` are rendered to the terminal. This corresponds to the `[+]` status indicator shown in the final output, representing services where the target email is actively registered.

The flag essentially bypasses printing for:

- Sites where the email is not found
- Rate-limited connections  
- Module execution errors

## Replicating the Filter in Python Code

When using Holehe as a library rather than a CLI tool, you can replicate the "only used" behavior by configuring the arguments object passed to `get_functions` and `print_result`. Set the `onlyused` attribute to `True` to maintain parity with the command-line flag.

```python

# Using Holehe as a library – replicate the “only used” behavior

import asyncio, httpx, trio
from holehe.core import import_submodules, get_functions, launch_module, print_result

async def run(email):
    modules = import_submodules("holehe.modules")
    websites = get_functions(modules, args=type('args',(object,),{'onlyused':True,'nocolor':False,'noclear':True,'nopasswordrecovery':False,'csvoutput':False}))
    client = httpx.AsyncClient()
    out = []
    async with trio.open_nursery() as nursery:
        for website in websites:
            nursery.start_soon(launch_module, website, email, client, out)
    await client.aclose()
    print_result(out, type('args',(object,),{'onlyused':True,'nocolor':False,'noclear':True}), email, 0, websites)

asyncio.run(run("test@example.com"))

```

## Summary

- Append `--only-used` to your Holehe command to display only used accounts and suppress negative results.
- The filtering logic is implemented in [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py) inside the `print_result` function (lines 22-30).
- Only entries with `results["exists"] == True` are displayed, corresponding to the `[+]` status indicator.
- When using Holehe as a Python library, set `onlyused=True` in the arguments object to achieve identical filtering behavior.
- Key files involved include [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py) for CLI parsing and result printing, and `holehe/modules/` for individual service implementations.

## Frequently Asked Questions

### Does the `--only-used` flag hide rate-limited services?

Yes. When you use the `--only-used` flag, Holehe filters out all results except confirmed accounts. This includes hiding services that returned rate-limit errors, connection failures, or "not used" status messages, displaying only sites where `results["exists"]` evaluates to `True`.

### Can I export only used accounts to CSV using Holehe?

The CSV export functionality in Holehe respects the same filtering logic. When you enable both `--only-used` and `--csv` flags, the output file will contain only the services where accounts exist, as the filtering occurs before the export operation in [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py).

### Is the `--only-used` flag available in all versions of Holehe?

The `--only-used` parameter is defined in the argument parser at lines 84-86 of [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py) in the current master branch. Ensure you are using a recent version of the tool cloned from the official megadose/holehe repository to access this functionality.

### How does Holehe determine if an account exists?

Individual modules in `holehe/modules/` check registration status via API calls or web scraping. Each module returns a dictionary with an `"exists"` key set to `True` or `False`. The `print_result` function in [`holehe/core.py`](https://github.com/megadose/holehe/blob/main/holehe/core.py) then checks this value to determine whether to display the result when `--only-used` is active.