Skip to main content

A Python client library for the Search API

Project description

Search API Python Client

A Python client library for the Search API, providing easy access to email, phone, and domain search functionality. Acquire your API key through @ADSearchEngine_bot on Telegram.

Installation

pip install AD-SearchAPI

Quick Start

from search_api import SearchAPI

# Initialize the client with your API key
client = SearchAPI(api_key="your_api_key")

# Search by email
result = client.search_email("example@domain.com", include_house_value=True, include_extra_info=True, phone_format="international")
print(result)

# Search by phone
result = client.search_phone("+1234567890", include_house_value=True, include_extra_info=True, phone_format="international")
print(result)

# Search by domain
result = client.search_domain("example.com")
print(result)

Features

  • Email search with optional house value, extra info, and phone number formatting
  • Phone number search with validation, formatting, and property details
  • Domain search with comprehensive results
  • Rate limiting and retry handling
  • Type hints and comprehensive documentation
  • Enhanced address model with property details (bedrooms, bathrooms, living area, home status)

Advanced Usage

Configuration

from search_api import SearchAPI, SearchAPIConfig

config = SearchAPIConfig(
    api_key="your_api_key",
    max_retries=3,
    timeout=30,
    base_url="https://search-api.dev",
    debug_mode=False,  # Enable debug logging
    proxy=None  # Optional proxy configuration
)

client = SearchAPI(config=config)

Error Handling

from search_api.exceptions import SearchAPIError

try:
    result = client.search_email("example@domain.com")
except SearchAPIError as e:
    print(f"Error: {e}")

Address Model

The Address model includes detailed property information when include_house_value is enabled:

  • street: str - Street address
  • city: Optional[str] - City name
  • state: Optional[str] - State abbreviation
  • postal_code: Optional[str] - Postal code
  • country: Optional[str] - Country name
  • zestimate: Optional[Decimal] - Estimated property value
  • zpid: Optional[str] - Zillow Property ID
  • bedrooms: Optional[int] - Number of bedrooms
  • bathrooms: Optional[float] - Number of bathrooms (supports half-baths)
  • living_area: Optional[int] - Square footage
  • home_status: Optional[str] - Property status (e.g., "For Sale", "Sold")

API Reference

SearchAPI

Main client class for interacting with the Search API.

Methods

  • search_email(email: str, include_house_value: bool = False, include_extra_info: bool = False, phone_format: str = "international") -> EmailSearchResult

    • Search by email address. Returns an EmailSearchResult with name, date of birth, addresses, phone numbers, and optional extra info.
    • phone_format: Use "international" for E.164 format or "local" for national format.
  • search_phone(phone: str, include_house_value: bool = False, include_extra_info: bool = False, phone_format: str = "international") -> List[PhoneSearchResult]

    • Search by phone number. Returns a list of PhoneSearchResult objects with name, date of birth, addresses, emails, and optional extra info.
    • phone_format: Use "international" for E.164 format or "local" for national format.
  • search_domain(domain: str) -> DomainSearchResult

    • Search by domain name. Returns a DomainSearchResult with a list of associated email results.

SearchAPIConfig

Configuration class for customizing client behavior.

Parameters

  • api_key: str - Your API key (required)
  • cache_ttl: int - Cache time-to-live in seconds (default: 3600)
  • max_retries: int - Maximum number of retry attempts (default: 3)
  • timeout: int - Request timeout in seconds (default: 30)
  • base_url: str - API base URL (default: "https://search-api.dev")
  • debug_mode: bool - Enable debug logging (default: False)
  • proxy: Optional[Dict] - Proxy configuration (default: None)

Contributing

Contributions are welcome! Please submit a Pull Request with your changes or open an issue for discussion.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ad_searchapi-1.0.3.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ad_searchapi-1.0.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file ad_searchapi-1.0.3.tar.gz.

File metadata

  • Download URL: ad_searchapi-1.0.3.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ad_searchapi-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e04e0fef3ea3549a2deb7ea6f134ef5a3bbbc008c73a6b5b6cf6f73ceed556a3
MD5 1f2bbbab7fe4b6dad9d2eeecc17ad2c1
BLAKE2b-256 65b423eae63ce55d29f3e7a5c3cfd6f572594e3e7aa5bfe8e513a89e7681bff7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ad_searchapi-1.0.3.tar.gz:

Publisher: python-publish.yml on AntiChrist-Coder/search_api_library

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ad_searchapi-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: ad_searchapi-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ad_searchapi-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 df05bcb3f7b6d97f6c8538c9a5e89b5ab90a7c8291b33f9c1c635deefd3ea0bf
MD5 10d1b8016c043d91541b48544d292442
BLAKE2b-256 cfece8fc7e6f5d94b642b4d452ce24866af3476fdaafef80e054bb473f85f92e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ad_searchapi-1.0.3-py3-none-any.whl:

Publisher: python-publish.yml on AntiChrist-Coder/search_api_library

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page