IP画像查询
https://v1.nsuuu.com/api/ip_portrait接口描述
免费API提供快速的IP查询服务,基于本地数据实现高效响应,支持位置查询等功能。如需额外支持,请联系管理员获取更多信息。
请求参数
怎么传递这个 Key?
推荐
方法 1:Bearer Token (Header)
标准规范,兼容性最好,最安全
Authorization:Bearer Key
方法 2:放在请求头 (Header)
直接使用 Authorization,无需前缀
Authorization:Key
方法 3:放在请求头 (Header)
自定义 Header key 字段
key:Key
不推荐
方法 4:放在网址后面 (Query)
不安全,可能泄露 Key,即将弃用
网址?key=Key
请求示例
var axios = require('axios')
var config = {
method: 'get',
url: ''
}
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data))
})
.catch(function (error) {
console.log(error)
})axios
ajax
fetch
xhr
php
python
返回示例
{
"code": 0,
"data": {
"ip": "124.127.8.33",
"hostname": "33.8.127.124.broad.bj.bj.static.163data.com.cn",
"geo": {
"city": "Beijing",
"region": "Beijing",
"region_code": "BJ",
"country": "China",
"country_code": "CN",
"continent": "Asia",
"continent_code": "AS",
"latitude": 39.9075,
"longitude": 116.39723,
"timezone": "Asia/Shanghai",
"postal_code": "100000",
"geoname_id": "1816670",
"radius": 50,
"last_changed": "2025-06-01"
},
"as": {
"asn": "AS4847",
"name": "China Networks Inter-Exchange",
"domain": "bta.net.cn",
"type": "business",
"last_changed": "2021-05-01"
},
"mobile": [],
"anonymous": {
"is_proxy": false,
"is_relay": false,
"is_tor": false,
"is_vpn": false
},
"is_anonymous": false,
"is_anycast": false,
"is_hosting": false,
"is_mobile": false,
"is_satellite": false,
"v1": {
"country_name": "中国",
"region_name": "北京",
"city_name": "北京",
"owner_domain": "",
"isp_domain": "chinatelecom.com.cn",
"latitude": "39.95931",
"longitude": "116.29812",
"timezone": "Asia/Shanghai",
"utc_offset": "UTC+8",
"china_admin_code": "110000",
"idd_code": "86",
"country_code": "CN",
"continent_code": "AP",
"idc": "",
"base_station": "",
"country_code3": "",
"european_union": "",
"currency_code": "",
"currency_name": "",
"anycast": ""
}
},
"request_id": "a14a1ecc8048d17c0bc70000"
}