网络查询
查询 IP 地址 RDAP
GET
公开访问/rdap/ip按 IANA ipv4.json 或 ipv6.json 的最长前缀选择注册局,查询 IP 网络 RDAP。只使用 HTTPS,不查询 WHOIS。 访问类别:匿名 API,可携带 Token 使用独立额度
请求参数
addressquery必填- IPv4、IPv6,或 IPv4 映射的 IPv6。映射地址按 IPv4 查询。
- string · IPv4、IPv6,或 IPv4 映射的 IPv6。映射地址按 IPv4 查询。 · 最短:1 字符 · 最长:128 字符
rawquery- true 时在 raw 返回注册局原始 RDAP JSON
- string · true 时在 raw 返回注册局原始 RDAP JSON · 默认值:"false" · 可选:true、false
响应
200 IP 网络注册数据。成功结果缓存 300 秒。
application/json
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"domain",
"ip",
"asn"
]
},
"query": {
"type": "string"
},
"service": {
"type": "string",
"description": "命中的 IANA 引导项,例如 com、8.0.0.0/8 或 13312-15359"
},
"registry": {
"type": "string",
"description": "选中的 HTTPS RDAP 基址"
},
"objectClass": {
"type": "string"
},
"handle": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"status": {
"type": "array",
"items": {
"type": "string"
}
},
"dates": {
"type": "object",
"properties": {
"registration": {
"type": [
"string",
"null"
]
},
"expiration": {
"type": [
"string",
"null"
]
},
"lastChanged": {
"type": [
"string",
"null"
]
},
"lastUpdateOfRdap": {
"type": [
"string",
"null"
]
}
},
"required": [
"registration",
"expiration",
"lastChanged",
"lastUpdateOfRdap"
],
"description": "保留注册局返回的时间原文;缺失为 null"
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"date": {
"type": "string"
}
},
"required": [
"action",
"date"
]
}
},
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"handle": {
"type": [
"string",
"null"
]
},
"roles": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": [
"string",
"null"
]
},
"kind": {
"type": [
"string",
"null"
]
}
},
"required": [
"handle",
"roles",
"name",
"kind"
]
}
},
"nameservers": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"ipv4": {
"type": "array",
"items": {
"type": "string"
}
},
"ipv6": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"ipv4",
"ipv6"
]
},
"description": "仅域名对象提供;IP 与 ASN 为 null"
},
"network": {
"type": [
"object",
"null"
],
"properties": {
"startAddress": {
"type": "string"
},
"endAddress": {
"type": "string"
},
"ipVersion": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
]
},
"parentHandle": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
}
},
"required": [
"startAddress",
"endAddress",
"ipVersion",
"name",
"type",
"parentHandle",
"country"
]
},
"asn": {
"type": [
"object",
"null"
],
"properties": {
"start": {
"type": "integer"
},
"end": {
"type": "integer"
},
"name": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
}
},
"required": [
"start",
"end",
"name",
"type",
"country"
]
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rel": {
"type": [
"string",
"null"
]
},
"href": {
"type": "string"
},
"type": {
"type": [
"string",
"null"
]
}
},
"required": [
"rel",
"href",
"type"
]
}
},
"raw": {
"description": "raw=true 时为注册局返回的 RDAP JSON;默认省略"
}
},
"required": [
"type",
"query",
"service",
"registry",
"objectClass",
"handle",
"name",
"status",
"dates",
"events",
"entities",
"nameservers",
"network",
"asn",
"links"
]
}400 请求校验或执行失败
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}401 凭据无效、停用、过期或缺少所需 Token
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}403 需要管理员 Token
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}404 请求校验或执行失败
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}413 请求体过大
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}415 请求内容类型无效
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}422 请求校验或执行失败
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}429 请求过于频繁,Retry-After 为建议等待秒数;匿名额度及认证保护在各 Cloudflare 地点近似计数,Token 业务额度使用 D1 原子计数
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}500 内部执行失败
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}502 请求校验或执行失败
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}504 请求校验或执行失败
application/json
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"body",
"query",
"path",
"header"
]
},
"field": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"location",
"field",
"code",
"message"
]
}
}
},
"required": [
"code",
"message"
]
}
},
"required": [
"error"
]
}在线调试
调用示例
curl -X GET 'https://evax.top/rdap/ip?address=8.8.8.8'