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
  • Automatic caching of 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.1.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.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ad_searchapi-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 800959806a08a158f013e1e9269e4049b7967b91f9b46ec306f4ca096648b996
MD5 6894b4473953e42e65c5c7a5624c3164
BLAKE2b-256 ebdf4cd0a17a9b7e9546be0588691d88a286eff9b01f79b34a10973379fdeda6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ad_searchapi-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0431730fb42b5ba38e6107eb862d5f0faeb3d66f06e2b565c88e52c4b1cbebc6
MD5 7b49d6ecd04123f5cf29a83181871180
BLAKE2b-256 a53ae9b1e6fdf2c52e4d803a51701d0366f53cc894a4efd6ec379cccd80b5964

See more details on using hashes here.

Provenance

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