Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.oathnet.org/llms.txt

Use this file to discover all available pages before exploring further.

Official SDKs

OathNet provides official client libraries to simplify API integration:

Python SDK

pip install oathnetAsync support, type hints, and comprehensive error handling

JavaScript SDK

npm install oathnetTypeScript support, browser and Node.js compatible

Go SDK

go get github.com/oathnet/oathnet-goIdiomatic Go with context support

CLI Tool

npx oathnet or go installCommand-line interface for all API operations

cURL Examples

Copy-paste examples for quick testing

Quick Comparison

FeaturePythonJavaScriptGoCLI
Async Support-
Type SafetyType hintsTypeScriptNative-
Auto-retry
Pagination Helpers
JSON Output

Installation

pip install oathnet

Quick Start

import os
from oathnet import OathNetClient

client = OathNetClient(api_key="your-api-key")

# Search breaches
result = client.search.breach("user@example.com")
print(f"Found {result.data.results_found} results")

for record in result.data.results:
    print(f"  {record.email} - {record.dbname}")

Common Features

Authentication

import os
from oathnet import OathNetClient

# Explicit API key (required)
client = OathNetClient(api_key="your-api-key")

# From environment variable
client = OathNetClient(api_key=os.environ["OATHNET_API_KEY"])

Error Handling

SDKs provide typed exceptions:
from oathnet.exceptions import (
    AuthenticationError,
    RateLimitError,
    NotFoundError,
    OathNetError
)

try:
    result = client.search.breach("user@example.com")
except AuthenticationError:
    print("Check your API key")
except RateLimitError as e:
    print(f"Rate limited. Retry after {e.retry_after}s")
except NotFoundError:
    print("Resource not found")
except OathNetError as e:
    print(f"API error: {e.message}")

Pagination

SDKs support cursor-based pagination:
# First page
result = client.stealer.search("@company.com", page_size=25)
print(f"Page 1: {len(result.data.items)} items")

# Next page using cursor
if result.data.next_cursor:
    result = client.stealer.search("@company.com", cursor=result.data.next_cursor)
    print(f"Page 2: {len(result.data.items)} items")

Rate Limiting

Built-in rate limiting respects API quotas:
# Auto-throttle is enabled by default
client = OathNetClient(
    timeout=30.0  # Request timeout in seconds
)

SDK vs Direct API

Use CaseRecommendation
Quick integrationSDK
Custom HTTP clientDirect API
Unsupported languageDirect API
Maximum controlDirect API
Type safetySDK
Auto-retrySDK

Community SDKs

Community-maintained libraries (not officially supported):
LanguagePackageMaintainer
Rubyoathnet-ruby@community
PHPoathnet/php-sdk@community
Rustoathnet-rs@community
Community SDKs are not officially maintained. Use at your own risk.

Next Steps

Python SDK

Full Python documentation

JavaScript SDK

Full JavaScript documentation

Go SDK

Full Go documentation

CLI Tool

Command-line interface guide