https://dreamname.net所有 API 请求需在 Header 中携带 API Token:
Authorization: Bearer YOUR_API_TOKEN Content-Type: application/json
登录后前往「用户中心」→「API 密钥」标签页,点击「生成 API 密钥」按钮即可获取。
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /api/whois?domain=example.com | WHOIS 查询 |
GET | /api/dns?domain=example.com&type=A | DNS 记录查询 |
GET | /api/ssl?domain=example.com | SSL 证书信息查询 |
GET | /api/tld-price?tld=com | 查询后缀价格 |
GET | /api/domain-value?domain=example.com | 域名估值 |
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /api/coupon?code=xxx | 验证优惠券 |
GET | /api/transfer-check?domain=xxx | 转入状态检查 |
GET | /api/check-user?name=xxx | 查询用户是否存在 |
POST | /api/user-pref | 更新用户偏好设置 |
curl "https://dreamname.net/api/whois?domain=example.com"
返回:
{
"ok": true,
"registered": true,
"domain_ascii": "example.com",
"overview": {
"registrar": "RESERVED-Internet Assigned Numbers Authority",
"created": "1995-08-14",
"expires": "2025-08-13",
"ns": ["a.iana-servers.net", "b.iana-servers.net"]
}
}
curl "https://dreamname.net/api/dns?domain=example.com&type=A"
curl "https://dreamname.net/api/tld-price?tld=com"
所有接口在出错时返回 {"ok": false, "error": "错误描述"},HTTP 状态码为 4xx 或 5xx。
| 状态码 | 说明 |
|---|---|
| 400 | 请求参数错误 |
| 401 | 未认证 / Token 无效 |
| 429 | 请求频率超限 |
| 500 | 服务器内部错误 |