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 addresscity: Optional[str]- City namestate: Optional[str]- State abbreviationpostal_code: Optional[str]- Postal codecountry: Optional[str]- Country namezestimate: Optional[Decimal]- Estimated property valuezpid: Optional[str]- Zillow Property IDbedrooms: Optional[int]- Number of bedroomsbathrooms: Optional[float]- Number of bathrooms (supports half-baths)living_area: Optional[int]- Square footagehome_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
EmailSearchResultwith 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 by email address. Returns an
-
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
PhoneSearchResultobjects 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 by phone number. Returns a list of
-
search_domain(domain: str) -> DomainSearchResult- Search by domain name. Returns a
DomainSearchResultwith a list of associated email results.
- Search by domain name. Returns a
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c975fc1b57e3241448c5b25bb182384dd180530c74621ccca1ca946a07be010
|
|
| MD5 |
68edc017a34d89e4d1f5e92781742baf
|
|
| BLAKE2b-256 |
b2e5cb6e334484d77c2cb0f4f1183de9b97e9afa002a221363b7399ad63a1242
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ad_searchapi-1.0.2.tar.gz -
Subject digest:
8c975fc1b57e3241448c5b25bb182384dd180530c74621ccca1ca946a07be010 - Sigstore transparency entry: 238806573
- Sigstore integration time:
-
Permalink:
AntiChrist-Coder/search_api_library@e1bbf8180fc9993b290193ca648ea76127bcf188 -
Branch / Tag:
refs/tags/Release1.0.2 - Owner: https://github.com/AntiChrist-Coder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1bbf8180fc9993b290193ca648ea76127bcf188 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f8bb60db646a7d43861378c0658add1c5fdfeff8b854bdead2993e1586f6c9e
|
|
| MD5 |
8dc4d8d5336cb2ed2f9eff160db1e600
|
|
| BLAKE2b-256 |
e1d19389d5892cd26c5cdb49b06be28dce28cbf1f5bac8ffe33e7fd093cb111a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ad_searchapi-1.0.2-py3-none-any.whl -
Subject digest:
8f8bb60db646a7d43861378c0658add1c5fdfeff8b854bdead2993e1586f6c9e - Sigstore transparency entry: 238806580
- Sigstore integration time:
-
Permalink:
AntiChrist-Coder/search_api_library@e1bbf8180fc9993b290193ca648ea76127bcf188 -
Branch / Tag:
refs/tags/Release1.0.2 - Owner: https://github.com/AntiChrist-Coder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1bbf8180fc9993b290193ca648ea76127bcf188 -
Trigger Event:
release
-
Statement type: