IP查询接口----http://ip.apidatas.com
时间:2014-08-26 15:42:06
收藏:0
阅读:353
IP接口文档说明
接口地址
http://api.apidatas.com/ip/
接口参数
http://api.apidatas.com/ip/127.0.0.1
http://api.apidatas.com/ip?ip=127.0.0.1
接口类型
http://api.apidatas.com/ip/127.0.0.1/json
http://api.apidatas.com/ip/127.0.0.1/js
接口默认是JSON格式(暂未提供XML格式)
如果你想使用JS调用来显示IP的话 那么我们建议:<script type="text/javascript" src="http://api.apidatas.com/ip/127.0.0.1/js"></script>
返回数据
| 名称 | 返回类型 | 说明 为空则返回0 |
|---|---|---|
| country | string | 国家或IANA(计算机保留地址) 为空则返回0 |
| area | string | 区域:华东、华中、华东... 为空则返回0 |
| region | string | 省:北京、上海、山东... 为空则返回0 |
| city | string | 市:杭州、无锡、莱芜... 为空则返回0 |
| county | string | 县级市 为空则返回0 |
| isp | string | 运营商:如电信、联通 为空则返回0 |
错误码
| 名称 | 错误码 | 说明 |
|---|---|---|
| state | 10000 | IP输入错误 |
评论(0)