Domain Query
Queries the 接口盒子 API for ICP filing and WHOIS registration information for any domain — all in one command.
Execution Rule
Run the user's requested command directly without pre-checking dependencies, environment variables, or configuration. If something is wrong, the script will fail with a clear error — check and fix only then.
Environment Variables
| Variable | Description |
|---|---|
JKHZ_ID |
接口盒子 (apihz.cn) user ID |
JKHZ_KEY |
接口盒子 API key |
The script loads these from ~/.wmyskills/.env (shared across skills) automatically; a scripts/.env in the script directory takes priority if present. Use scripts/.env.example as the template — add the variables to ~/.wmyskills/.env, never overwriting an existing file.
Requirements
pip install python-dotenv
Usage
Script: scripts/domain_query.py
Query all (ICP + WHOIS)
python scripts/domain_query.py example.com
WHOIS live query (skip cache)
python scripts/domain_query.py example.com --live
Query only one item
python scripts/domain_query.py example.com --only icp
python scripts/domain_query.py example.com --only whois
Output raw JSON
python scripts/domain_query.py example.com --json
Query Items
| Item | Content |
|---|---|
| 📋 ICP Filing (ICP 备案) | Filing number, organization name, type, review date |
| 📝 WHOIS | Registrar, registration/expiration dates, DNS servers, domain status, etc. |
Arguments
| Arg | Description |
|---|---|
domain |
Domain name (required), e.g. example.com |
--live |
WHOIS live query (bypasses cache; cached is faster) |
--only |
Query only one of: icp, whois |
--json |
Output raw JSON (debugging) |
Notes
- Default behavior queries both items at once
- WHOIS cache mode is faster;
--livegives the freshest data but takes longer