## IPv4归属地 ![](https://img.kancloud.cn/a0/90/a0902cf9351a2de081c2d9d9f4a1598e_300x200.jpg) > IPv4归属地是将网络空间地图测绘技术与人工智能(AI)算法相结合,利用动态密度聚类算法和基于多层神经网络的IP地址定位算法,完成IP地址地理位置定位。IPv4归属地数据接口是IP地址定位数据库的在线调用接口,分为高精准-公安版、高精准-商业版、区县级、城市级共4个版本类型,能够满足客户不同定位精度的需求。 ## 版本区别 ![](https://img.kancloud.cn/1f/70/1f702d2a4edc24eae443a0715d6b997c_945x453.png) ## 应用领域 ### 网络安全 1. 互联网攻防定位 2. 嫌疑人溯源跟踪 3. 日志审计 4. 危险情报态势感知 ### 业务安全 1. 互联网征信位置核验 2. 互联网在线广告反作弊 3. 重点办公网络资产普查 4. 金融信贷风险控制审查 5. 交易支付反欺诈、反薅羊毛 ### 精准营销 1. 互联网广告精准投放 2. 互联网广告智能推荐 3. 用户位置信息画像 4. 渠道流量反作弊 ### 网络优化 1. 用户分布区域画像分析 2. CDN节点资源布局 3. 网络流量调度支持 4. 精准识别网络流量地域 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ## 接口1:高精准公安版 ( [点击购买](https://market.topthink.com/product/484)) ### 接口费用 > 最低 0.15元/次 > ### 请求地址 ``` GET https://api.topthink.com/ip/police ``` ### 请求参数 | 名称 | 必填 | 类型 | 示例值 | 描述 | | --- | --- | --- | --- | --- | | appCode| 是|string| |用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | ip | 是 | String | 166.111.4.100 | 查询的IP | | coordsys | 否 | String | WGS84 | 坐标系,分为WGS84和BD09,默认为WGS84 | | area | 否 | String | multi | 区域类型,分为multi和single,默认为multi | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->ipPolice() ->withIp('166.111.4.100') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": { "multiAreas": { "address":"", "lat":"40.009424", "lng":"116.332556", "radius":"105.2321", "prov":"北京市", "city":"北京市", "district":"海淀区", } "continent":"亚洲", "country":"中国", "consistency":"2", "correctness":"3", "owner":"imported inetnum object for IIINT", "isp": "China Education and Research Network Center,Tsinghua University,Beijing 100084", "zipcode":"100038", "timezone":"UTC+8", "accuracy":"城市", "source":"数据挖掘", "areacode":"CN", "asnumber":"4538", } } ~~~ ## 接口2:高精准商业版( [点击购买](https://market.topthink.com/product/424)) ### 接口费用 > 最低 0.048元/次 > ### 请求地址 ``` GET https://api.topthink.com/ip/street ``` ### 请求参数 | 名称 | 必填 | 类型 | 示例值 | 描述 | | --- | --- | --- | --- | --- | | appCode| 是|string| |用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | ip | 是 | String | 166.111.4.100 | 查询的IP | | coordsys | 否 | String | WGS84 | 坐标系,分为WGS84和BD09,默认为WGS84 | | area | 否 | String | multi | 区域类型,分为multi和single,默认为multi | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->ipStreet() ->withIp('166.111.4.100') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": { "multiAreas": { "address":"", "lat":"40.009424", "lng":"116.332556", "radius":"105.2321", "prov":"北京市", "city":"北京市", "district":"海淀区", } "continent":"亚洲", "country":"中国", "consistency":"2", "correctness":"3", "owner":"imported inetnum object for IIINT", "isp": "China Education and Research Network Center,Tsinghua University,Beijing 100084", "zipcode":"100038", "timezone":"UTC+8", "accuracy":"城市", "source":"数据挖掘", "areacode":"CN", "asnumber":"4538", } } ~~~ ## 接口3:区县级( [点击购买](https://market.topthink.com/product/425)) ### 接口费用 > 最低 0.001元/次 > ### 请求地址 ``` GET https://api.topthink.com/ip/district ``` ### 请求参数 | 名称 | 必填 | 类型 | 示例值 | 描述 | | --- | --- | --- | --- | --- | | appCode| 是|string| |用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | ip | 是 | String | 166.111.4.100 | 查询的IP | | coordsys | 否 | String | WGS84 | 坐标系,分为WGS84和BD09,默认为WGS84 | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->IpDistrict() ->withIp('166.111.4.100') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": { "continent":"亚洲", "country":"中国", "owner":"imported inetnum object for IIINT", "isp": "China Education and Research Network Center,Tsinghua University,Beijing 100084", "zipcode":"100038", "timezone":"UTC+8", "accuracy":"城市", "source":"数据挖掘", "areacode":"CN", "adcode":"110100", "asnumber":"4538", "lat":"40.009424", "lng":"116.332556", "radius":"105.2321", "prov":"北京市", "city":"北京市", "district":"东城区", } } ~~~ ## 接口4:城市级( [点击购买](https://market.topthink.com/product/485)) ### 接口费用 > 最低 0.0008元/次 > ### 请求地址 ``` GET https://api.topthink.com/ip/city ``` ### 请求参数 | 名称 | 必填 | 类型 | 示例值 | 描述 | | --- | --- | --- | --- | --- | | appCode| 是|string| |用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | ip | 是 | String | 166.111.4.100 | 查询的IP | | coordsys | 否 | String | WGS84 | 坐标系,分为WGS84和BD09,默认为WGS84 | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->ipCity() ->withIp('166.111.4.100') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": { "continent":"亚洲", "country":"中国", "owner":"imported inetnum object for IIINT", "isp": "China Education and Research Network Center,Tsinghua University,Beijing 100084", "zipcode":"100038", "timezone":"UTC+8", "accuracy":"城市", "source":"数据挖掘", "areacode":"CN", "adcode":"110100", "asnumber":"4538", "lat":"40.009424", "lng":"116.332556", "radius":"105.2321", "prov":"北京市", "city":"北京市", } } ~~~