{
    "openapi": "3.0.0",
    "info": {
        "title": "ip地址查询 - API文档",
        "version": "1.0.0",
        "description": "专业的全球IP地理位置查询接口，根据IP地址查询归属地\/州\/国家\/省市区县\/经纬度及网络运营商ISP等信息。不传IP参数的情况下，默认为请求来源ip的相关信息。定期维护更新，欢迎体验使用。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/ipquery\/index": {
            "get": {
                "summary": "查询ip地址详情",
                "tags": [
                    "ip地址查询"
                ],
                "description": "指定IP地址查询详细归属地信息",
                "parameters": [
                    {
                        "name": "ip",
                        "in": "query",
                        "description": "IP地址",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "183.192.70.211",
                            "description": "IP地址"
                        }
                    },
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "full",
                        "in": "query",
                        "description": "省市全称",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "省市全称"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "isp": {
                                            "type": "string",
                                            "example": "中国移动",
                                            "description": "网络运营商"
                                        },
                                        "city": {
                                            "type": "string",
                                            "example": "上海市",
                                            "description": "城市"
                                        },
                                        "country": {
                                            "type": "string",
                                            "example": "中国",
                                            "description": "国家"
                                        },
                                        "areacode": {
                                            "type": "string",
                                            "example": "310100",
                                            "description": "地区编码"
                                        },
                                        "district": {
                                            "type": "string",
                                            "example": "黄埔区",
                                            "description": "地区"
                                        },
                                        "latitude": {
                                            "type": "string",
                                            "example": "31.231706",
                                            "description": "纬度"
                                        },
                                        "province": {
                                            "type": "string",
                                            "example": "上海市",
                                            "description": "省级行政区"
                                        },
                                        "timezone": {
                                            "type": "string",
                                            "example": "UTC+8",
                                            "description": "国际时区"
                                        },
                                        "continent": {
                                            "type": "string",
                                            "example": "亚洲",
                                            "description": "大陆州"
                                        },
                                        "longitude": {
                                            "type": "string",
                                            "example": "121.472644",
                                            "description": "经度"
                                        },
                                        "countrycode": {
                                            "type": "string",
                                            "example": "CN",
                                            "description": "国家代码"
                                        },
                                        "countryenglish": {
                                            "type": "string",
                                            "example": "China",
                                            "description": "国家英文名称"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "ip": "183.192.70.211",
                                        "isp": "中国移动",
                                        "city": "上海市",
                                        "country": "中国",
                                        "areacode": "310100",
                                        "district": "徐汇区",
                                        "latitude": "31.23160",
                                        "province": "上海市",
                                        "timezone": "UTC+8",
                                        "continent": "亚洲",
                                        "longitude": "121.47272",
                                        "countrycode": "CN",
                                        "countryenglish": "China"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询ip地址详情",
                "tags": [
                    "ip地址查询"
                ],
                "description": "指定IP地址查询详细归属地信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "ip": {
                                        "type": "string",
                                        "example": "183.192.70.211",
                                        "description": "IP地址"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "full": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "省市全称"
                                    }
                                },
                                "required": [
                                    "ip",
                                    "key",
                                    "full"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "isp": {
                                            "type": "string",
                                            "example": "中国移动",
                                            "description": "网络运营商"
                                        },
                                        "city": {
                                            "type": "string",
                                            "example": "上海市",
                                            "description": "城市"
                                        },
                                        "country": {
                                            "type": "string",
                                            "example": "中国",
                                            "description": "国家"
                                        },
                                        "areacode": {
                                            "type": "string",
                                            "example": "310100",
                                            "description": "地区编码"
                                        },
                                        "district": {
                                            "type": "string",
                                            "example": "黄埔区",
                                            "description": "地区"
                                        },
                                        "latitude": {
                                            "type": "string",
                                            "example": "31.231706",
                                            "description": "纬度"
                                        },
                                        "province": {
                                            "type": "string",
                                            "example": "上海市",
                                            "description": "省级行政区"
                                        },
                                        "timezone": {
                                            "type": "string",
                                            "example": "UTC+8",
                                            "description": "国际时区"
                                        },
                                        "continent": {
                                            "type": "string",
                                            "example": "亚洲",
                                            "description": "大陆州"
                                        },
                                        "longitude": {
                                            "type": "string",
                                            "example": "121.472644",
                                            "description": "经度"
                                        },
                                        "countrycode": {
                                            "type": "string",
                                            "example": "CN",
                                            "description": "国家代码"
                                        },
                                        "countryenglish": {
                                            "type": "string",
                                            "example": "China",
                                            "description": "国家英文名称"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "ip": "183.192.70.211",
                                        "isp": "中国移动",
                                        "city": "上海市",
                                        "country": "中国",
                                        "areacode": "310100",
                                        "district": "徐汇区",
                                        "latitude": "31.23160",
                                        "province": "上海市",
                                        "timezone": "UTC+8",
                                        "continent": "亚洲",
                                        "longitude": "121.47272",
                                        "countrycode": "CN",
                                        "countryenglish": "China"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}