
寻求免费 ip 所属地区查询接口
ip 所属地区的查询对于许多应用场景至关重要,比如内容定位、欺诈检测和地理跟踪。尤其对于开发者而言,拥有简洁高效且免费的 api 接口尤为重要。
以下推荐几个免费的 ip 所属地区查询 api 接口:
- ip-api.com:一个纯文本 json 接口,支持指定查询语言。
- 百度:一个响应 json 格式的 restful 接口,提供 ip 地址、国家、省份和城市等信息。
- https://ip.useragentinfo.com/api:一个可直接调用的接口,无频率限制。
- https://api.vore.top/api/ipdata:一个无频率限制的接口,支持 ipv4 和 ipv6,可自定义返回内容。
接口演示
以 ip-api.com 接口为例,我们查询 ip 地址 117.136.12.79 所属地区:
http://ip-api.com/json/117.136.12.79?lang=zh-cn
返回结果如下:
{
"status": "success",
"country": "中国",
"countryCode": "CN",
"region": "GD",
"regionName": "广东",
"city": "广州市",
"zip": "",
"lat": 23.1181,
"lon": 113.2539,
"timezone": "Asia/Shanghai",
"isp": "China Mobile communications corporation",
"org": "China Mobile",
"as": "AS56040 China Mobile communications corporation",
"query": "117.136.12.79"
}其中,"region" 和 "regionname" 分别表示省份和省份名称,"city" 表示城市。通过这些信息,我们可以轻松获取 ip 地址所属的具体地区。










