IP批量查询API


接口描述

IP查询接口,批量查询IP归属区域。

POST https://www.idcd.com/api/ip-batch

输入参数

以下请求参数列表仅列出了接口请求参数,不包含公共参数,完整公共参数列表见 公共请求参数。

参数名称 类型 必选 描述
list Array IP地址数组,最大允许数量1000条

输出参数

参数名称 类型 必选 描述
ip String IP地址
country String 国家
region String 区域/省份
city String 城市
county String 县级
area String 地区
long String 经度坐标
lat String 纬度坐标

示例

  1. 输入示例
curl --location --request POST 'https://www.idcd.com/api/ip-batch' \
--header 'ClientID: df77f2de-2924-4499-adda-1c4cc243625a' \
--header 'Nonce: v0j38hHHUEqFwoh0Gc8Rbfi737xtIpLL' \
--header 'Timestamp: 1716085926' \
--header 'Signature: 5b1230f42bad2ffd5ad09890a8ebb47c02d74668be0cf7bb54a0f6a14996117b' \
--header 'SignatureMethod: HmacSHA256' \
--header 'Content-Type: application/json' \
--data-raw '{
    "list": ["8.8.8.8", "8.8.4.4"]
}'
  1. 输出示例
{
    "status": true,
    "code": 200,
    "message": "Success",
    "request_id": "a7f46185-0232-42db-957d-e723cee2239e",
    "data": [
        {
            "ip": "8.8.8.8",
            "country": "美国加利福尼亚州圣克拉拉县山景市",
            "region": "",
            "city": "",
            "county": "",
            "isp": "",
            "area": "美国加利福尼亚州圣克拉拉县山景市 谷歌公司DNS服务器",
            "long": "",
            "lat": ""
        },
        {
            "ip": "8.8.4.4",
            "country": "美国加利福尼亚州圣克拉拉县山景市",
            "region": "",
            "city": "",
            "county": "",
            "isp": "",
            "area": "美国加利福尼亚州圣克拉拉县山景市 谷歌公司DNS服务器",
            "long": "",
            "lat": ""
        }
    ]
}