免费IP归属地查询
IP9官网
IP9官网
    • 免费IP归属地查询API
      GET

      免费IP归属地查询API

      GET
      https://ip9.com.cn/get

      请求参数

      Query 参数
      ip
      string 
      可选
      ipv4 或 ipv6
      示例值:
      58.30.0.0

      示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request GET 'https://ip9.com.cn/get?ip=58.30.0.0'

      返回响应

      🟢200成功
      application/json
      Body
      ret
      integer 
      状态码
      必需
      data
      object 
      数据体
      必需
      country
      string 
      国家/地区
      必需
      country_code
      string 
      国家/地区简码
      必需
      prov
      string 
      省份
      必需
      city
      string 
      城市
      必需
      city_code
      string 
      城市简码
      必需
      city_short_code
      string 
      城市简码
      必需
      area
      string 
      区县
      必需
      post_code
      string 
      邮政编码
      必需
      area_code
      string 
      电话编号
      必需
      isp
      string 
      运营商
      必需
      lng
      string 
      城市中心-经度
      必需
      lat
      string 
      城市中心-纬度
      必需
      long_ip
      number 
      longip
      必需
      big_area
      string 
      国内大区划分
      必需
      qt
      number 
      查询时间-秒
      必需
      示例
      {
        "ret": 200,
        "data": {
          "country": "中国",
          "country_code": "cn",
          "prov": "北京",
          "city": "北京",
          "city_code": "beijing",
          "city_short_code": "bj",
          "area": "东城",
          "post_code": "100000",
          "area_code": "010",
          "isp": "国研科技/歌华有线",
          "lng": "116.41005",
          "lat": "39.93157",
          "long_ip": 975044608,
          "big_area": "华北"
        },
        "qt": 0.001
      }
      Built with