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 search-api

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.2.tar.gz (9.9 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.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ad_searchapi-1.0.2.tar.gz
  • Upload date:
  • Size: 9.9 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.2.tar.gz
Algorithm Hash digest
SHA256 8c975fc1b57e3241448c5b25bb182384dd180530c74621ccca1ca946a07be010
MD5 68edc017a34d89e4d1f5e92781742baf
BLAKE2b-256 b2e5cb6e334484d77c2cb0f4f1183de9b97e9afa002a221363b7399ad63a1242

See more details on using hashes here.

Provenance

The following attestation bundles were made for ad_searchapi-1.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: ad_searchapi-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f8bb60db646a7d43861378c0658add1c5fdfeff8b854bdead2993e1586f6c9e
MD5 8dc4d8d5336cb2ed2f9eff160db1e600
BLAKE2b-256 e1d19389d5892cd26c5cdb49b06be28dce28cbf1f5bac8ffe33e7fd093cb111a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ad_searchapi-1.0.2-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