IP查询API


接口描述

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

GET https://www.idcd.com/api/ip

输入参数

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

参数名称 类型 必选 描述
ip String IP地址

输出参数

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

示例

  1. 输入示例
curl --location --request GET 'https://www.idcd.com/api/ip?ip=125.71.160.214' \
--header 'ClientID: df77f2de-2924-4499-adda-1c4cc243625a' \
--header 'Nonce: v0j38hHHUEqFwoh0Gc8Rbfi737xtIpLL' \
--header 'Timestamp: 1716085926' \
--header 'Signature: 5b1230f42bad2ffd5ad09890a8ebb47c02d74668be0cf7bb54a0f6a14996117b' \
--header 'SignatureMethod: HmacSHA256'
  1. 输出示例
{
    "status": true,
	"code": 200,
    "message": "Success",
    "request_id": "467f3111-e469-4490-b3ca-5819be2c236d",
    "data": {
        "ip": "125.71.160.214",
        "country": "中国",
        "region": "四川",
        "city": "成都市",
        "county": "温江区",
        "isp": "电信",
        "area": "中国四川成都市 电信/(温江)电信",
        "long": "",
        "lat": ""
    }
}