A Flask-based service to retrieve domain-specific information.
- Query domain info via a GET request.
- Interactive WebSocket for domain data.
- Built-in URL validation.
- Multi-threaded for concurrent requests.
- Python 3.11.2
- Refer to requirements.txt for the full list of dependencies.
- Ensure Python is installed.
- Create a virtual environment:
python -m venv venv
- Install necessary packages in the virtual environment:
pip install -r requirements.txt
- Get an API key from https://www.whoisxmlapi.com/.
- Set the environment variable (or in the .env file) API_KEY to the API key.
Retrieve domain info:
GET /?url=<DOMAIN_NAME>
Replace <DOMAIN_NAME>
with the target domain.
- Connect to the
/ws
endpoint. - Initiate a domain session with a JSON containing the
url
key. - Send operations using the
operation
key in the message:- get_info for basic details.
{ "operation": "get_info" }
- get_subdomains for subdomains.
{ "operation": "get_subdomains" }
- get_asset_domains for asset domains.
{ "operation": "get_asset_domains" }
- get_info for basic details.
Launch the server with:
python <filename>.py
Access at http://localhost:5000/.
No authentication or rate-limiting; not advisable for production usage. Errors are JSON-formatted with the error key.
Run the test suite with:
python -m pytest
Open source. See the LICENSE file.