IP Query Interface
Last Updated:2021-10-13
IP Test
Verify whether the specified IP is the Baidu AI Cloud CDN service node.
Single IP Query Interface
Method | Path | Action |
---|---|---|
GET | /v2/utils | Query whether the IP is a Baidu CDN node. |
URL parameter:
Parameters | Type | Optional | Description |
---|---|---|---|
action | String | Required | describeIp |
ip | String | Required | Specify an IP address |
Response Body
Parameters | Type | Description |
---|---|---|
cdnIP | Bool | Whether it is a Baidu AI Cloud CDN node. True indicates that it is a CDN node, and false indicates that it is not a CDN node. |
isp | String | ISP |
region | String | Region |
IP List Query Interface
Method | Path | Action |
---|---|---|
POST | /v2/utils/ips | Query whether the IP list is on a Baidu CDN node. |
Request Body
Parameters | Type | Optional | Description |
---|---|---|---|
action | String | Required | describeIp |
ips | list<String> | Required | Specify the IP list you want to query, which cannot be empty or more than 100. |
Response Body
Parameters | Type | Description |
---|---|---|
ipInfo | list<Data> | Query list results |
Description of Data Type
Parameters | Type | Description |
---|---|---|
ip | string | Queried ip |
cdnIP | Bool | Whether it is a Baidu AI Cloud CDN node. True indicates that it is a CDN node, and false indicates that it is not a CDN node. |
isp | String | ISP |
region | String | Region |
request Example
{
"action":"describeIp",
"ips":[
"1.3.5.6",
"2.36.4.1",
"1.56.97.180",
"111.63.51.2"
]
}
response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Thu, 28 May 2020 11:53:45 GMT
Content-Length: 267
[
{
"cdnIP":false,
"ip":"1.3.5.6",
"isp":"China Telecom",
"region":"Guangdong"
},
{
"cdnIP":false,
"ip":"2.36.4.1",
"isp":"unknown",
"region":"unknown"
},
{
"cdnIP":true,
"ip":"1.56.97.180",
"isp":"China Unicom",
"region":"Heilongjiang"
},
{
"cdnIP":true,
"ip":"111.63.51.2",
"isp":"Baidu",
"region":"Hebei"
}
]
Query Interface at the Baidu Origin IP Address Range
Method | Path | Action |
---|---|---|
GET | /v2/nodes/list | Origin IP node |
URL parameter:
None
Response Body
Parameters | Type | Description |
---|---|---|
status | Int | The status 0 indicates that it is normal. |
details | list<Data> | Query list results |
Description of data type
Parameters | Type | Description |
---|---|---|
cnname | String | Node description |
ip | String | IP address |
level | String | Node layer |
province | String | Province |
city | String | City |
isp | String | ISP |
Request Example
GET /v2/nodes/list HTTP/1.1
Host: cdn.baidubce.com
Response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Thu, 28 May 2020 11:53:45 GMT
{
"status": 0,
"details": [
{
"cnname": "Baoding Mobile Level 2",
"ip": "111.63.51.0/24",
"level": "2",
"province": "Hebei",
"city": "Baoding",
"isp": "China Mobile"
},
{
"cnname": "Cangzhou Unicom Level 2",
"ip": "221.195.34.0/24",
"level": "2",
"province": "Hebei",
"city": "Cangzhou",
"isp": "China Unicom"
}
]
}