{
  "openapi": "3.0.3",
  "info": {
    "title": "IP查询专业版",
    "description": "利用大数据挖掘和大规模网络探测技术，对IP地址的基础信息和网络拓扑数据进行采集、处理， 结合IP应用场景与网络属性等因素，通过算法综合分析，完成高精准IP地理位置定位。支持ipv6的查询。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/2653-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "ipv6查询",
        "description": "ipv6地址查询专用，国内地址大部分可以解析到市级，国外地址可以到国家级",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {},
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2653_2_POST",
        "parameters": [
          {
            "name": "ip",
            "in": "query",
            "description": "ipv6地址",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/2653-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 10,
      "x-connect-timeout": 5,
      "post": {
        "summary": "ip查询专业版",
        "description": "查询成功且返回有效数据：扣除1个查询额度；\n查询成功但未返回有效数据：每10次扣除1个查询额度；\n经过对国内外ip查询结果的长期统计，查询成功时约有70%的查询是不扣查询额度的。\n\n注：返回有效数据，指的返回精度达到街道级别的数据。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "remark": {
                              "type": "string",
                              "description": "错误信息"
                            },
                            "isp": {
                              "type": "string",
                              "description": "运营商"
                            },
                            "accuracy": {
                              "type": "string",
                              "description": "精度"
                            },
                            "correctness": {
                              "type": "number",
                              "description": "准确度"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0表示查询成功要扣费，1表示查询成功，但不扣费，-1表示查询失败"
                            },
                            "owner": {
                              "type": "string",
                              "description": "所属机构"
                            },
                            "source": {
                              "type": "string",
                              "description": "采集方式"
                            },
                            "consistency": {
                              "type": "number",
                              "description": "一致性"
                            },
                            "multiAreas": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "radius": {
                                    "type": "string",
                                    "description": "半径（公里）"
                                  },
                                  "lat": {
                                    "type": "string",
                                    "description": "定位坐标纬度"
                                  },
                                  "city": {
                                    "type": "string",
                                    "description": "城市"
                                  },
                                  "address": {
                                    "type": "string",
                                    "description": "街道地址"
                                  },
                                  "district": {
                                    "type": "string",
                                    "description": "区县"
                                  },
                                  "prov": {
                                    "type": "string",
                                    "description": "省"
                                  },
                                  "lng": {
                                    "type": "string",
                                    "description": "定位坐标经度"
                                  },
                                  "areaCode": {
                                    "type": "string",
                                    "description": "该定位点的国内行政区划代码（目前只有中国大陆地区ip有该字段返回）"
                                  }
                                }
                              },
                              "description": "定位区域"
                            },
                            "areacode": {
                              "type": "string",
                              "description": "国家编码"
                            },
                            "timezone": {
                              "type": "string",
                              "description": "时区"
                            },
                            "country": {
                              "type": "string",
                              "description": "国家"
                            },
                            "continent": {
                              "type": "string",
                              "description": "大洲"
                            },
                            "asnumber": {
                              "type": "string",
                              "description": "自治域编码"
                            },
                            "zipcode": {
                              "type": "string",
                              "description": "邮编"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2653_1_POST",
        "parameters": [
          {
            "name": "ip",
            "in": "query",
            "description": "要查询的ip，暂时只能查ipv4哦",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/2653?tab=book"
  },
  "x-apiCode": "2653",
  "x-is-own": true,
  "x-is-op": true
}