Skip to main content

sherlockeye: The official Python library for Sherlockeye

Sherlockeye is a reverse search engine for investigations, fraud prevention, threat intelligence, and broader digital risk analysis.

This library lets you integrate Sherlockeye’s multi-source reverse search capabilities into your own Python applications — run OSINT searches (email, phone, username, domain, IP and more).

Get your API KEY

https://app.sherlockeye.io/api

Full API documentation: https://docs.sherlockeye.io

Quick start

from sherlockeye import SherlockeyeClient

client = SherlockeyeClient(api_key="YOUR_API_KEY")

# Check your token balance
balance = client.get_balance()
print(balance["data"]["tokens"])

# Run a synchronous search (waits for results up to timeoutSeconds)
sync_result = client.create_sync_search(
    {
        "type": "email",
        "value": "someone@example.com",
        "timeoutSeconds": 60,
    }
)
print(sync_result["data"]["status"], sync_result["data"]["results"])
import time
from sherlockeye import SherlockeyeClient

client = SherlockeyeClient(api_key="YOUR_API_KEY")

# Run an asynchronous search (fire-and-forget style, then poll)
search = client.create_search(
    {
        "type": "email",
        "value": "someone@example.com",
    }
)

search_id = search["data"]["searchId"]
status = search["data"]["status"]  # usually "processing"
print("Created search:", search_id, status)

# Poll until the search is complete (or a max number of attempts)
max_attempts = 10
attempt = 0

while status != "complete" and attempt < max_attempts:
    attempt += 1
    search_details = client.get_search(search_id)
    status = search_details["data"]["status"]
    print(f"[attempt {attempt}] status:", status)
    if status != "complete":
        time.sleep(5)  # wait 5 seconds before polling again

results = search_details["data"].get("results", [])
print("Final status:", status)
print("Results:", results)

Installation

pip install sherlockeye

For local development in this repository:

pip install -e .

Basic usage

from sherlockeye import SherlockeyeClient

client = SherlockeyeClient(api_key="YOUR_API_KEY")

# Token balance
balance = client.get_balance()
print(balance["data"]["tokens"])

# Synchronous search
sync_result = client.create_sync_search(
    {
        "type": "ip",
        "value": "1.1.1.1",
        "timeoutSeconds": 60,  # Maximum time (in seconds) to wait for results
    }
)

status = sync_result["data"]["status"]
results = sync_result["data"]["results"]
print(status, results)

if status == "processing":
    search_id = sync_result["data"]["searchId"]
    print(
        "Warning: search is still processing. "
        "More results may become available over time. "
        f"You can poll its status and results later using get_search('{search_id}') "
    )

# Asynchronous search
search = client.create_search(
    {
        "type": "email",
        "value": "someone@example.com",
    }
)
print(search["data"]["searchId"])

Webhooks

# Create webhook
webhook = client.create_webhook(
    {
        "url": "https://YOUR_DOMAIN/webhooks/sherlockeye",
        "events": ["search.completed"],
        "enabled": True,
    }
)

# List webhooks
all_webhooks = client.list_webhooks()

# Delivery history
deliveries = client.get_webhook_deliveries(webhook["data"]["id"])

Error handling

All API failures raise subclasses of SherlockeyeError:

from sherlockeye import (
    SherlockeyeClient,
    SherlockeyeError,
    SherlockeyeAuthError,
    SherlockeyeRateLimitError,
    SherlockeyeValidationError,
)

client = SherlockeyeClient(api_key="YOUR_API_KEY")

try:
    balance = client.get_balance()
except SherlockeyeAuthError:
    print("Invalid API key or not allowed.")
except SherlockeyeRateLimitError:
    print("Rate limit or credits exceeded.")
except SherlockeyeValidationError as exc:
    print("Validation error:", exc)
except SherlockeyeError as exc:
    print("Generic Sherlockeye API error:", exc)

Metadata

Release files for sherlockeye 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sherlockeye 0.1.1
File Size Uploaded Provenance
sherlockeye-0.1.1.tar.gz 8.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sherlockeye 0.1.1
File Interpreter ABI Platform
sherlockeye-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / sherlockeye-0.1.1.tar.gz

Download URL sherlockeye-0.1.1.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
049da5d513f1d125b3efa2c79e722a1536cdccf11e12109a1058fc2abf4f5102
BLAKE2b-256 checksum
How to use checksums
189e50b46731efdf1eaadfbadd0688a02def4b936cbbbc726105d84ad35a2a9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / sherlockeye-0.1.1-py3-none-any.whl

Download URL sherlockeye-0.1.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80ad462522b5274d19c3b4b4b442d31a4eb21344cdf885bd93d9886d170590b5
BLAKE2b-256 checksum
How to use checksums
0ab731cd65b67f196e65907d777cd61e482539d5a97f8024f03e1f9896af3825
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for sherlockeye 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page