{
  "openapi": "3.0.3",
  "info": {
    "title": "天地图",
    "description": "天地图地图服务支持HTTP和HTTPS协议。服务采用OGC WMTS标准，具体使用方法请参考OGC WMTS标准 中GetCapabilities 和GetTile。天地图地图服务对所有用户开放。使用本组服务之前，需要申请Key。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/3021-7": {
      "x-pointCode": 7,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "行政区划",
        "description": "天地图行政区划API是一类简单的HTTP/HTTPS接口，提供由行政区划地名、行政区划编码查询中心点、轮廓、所属上级行政区划的功能。使用行政区划服务前您需要申请Key。\n本接口需到天地图官网购买：http://lbs.tianditu.gov.cn/server/search.html",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0：调用成功\n-1：调用失败"
                            },
                            "remark": {
                              "type": "string",
                              "description": "接口调用说明"
                            },
                            "returncode": {
                              "type": "string",
                              "description": "100 正常 ； 101 没有查到结果 ；其他异常请看描述。"
                            },
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "parents": {
                                    "type": "object",
                                    "properties": {
                                      "country": {
                                        "type": "object",
                                        "properties": {},
                                        "description": "国家（name:行政区划名称,cityCode:行政区划码,adminType:行政区划类别(省市县)）"
                                      },
                                      "province": {
                                        "type": "object",
                                        "properties": {},
                                        "description": "省（name:行政区划名称,cityCode:行政区划码,adminType:行政区划类别(省市县)）"
                                      },
                                      "city": {
                                        "type": "object",
                                        "properties": {},
                                        "description": "市（name:行政区划名称,cityCode:行政区划码,adminType:行政区划类别(省市县)）"
                                      }
                                    },
                                    "description": "上级行政区划信息"
                                  },
                                  "level": {
                                    "type": "number",
                                    "description": "行政区划等级"
                                  },
                                  "nameabbrevation": {
                                    "type": "string",
                                    "description": "行政区划简称。"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "行政区划名称"
                                  },
                                  "cityCode": {
                                    "type": "string",
                                    "description": "行政区划码。"
                                  },
                                  "adminType": {
                                    "type": "string",
                                    "description": "行政区划类别(省市县)"
                                  },
                                  "englishabbrevation": {
                                    "type": "string",
                                    "description": "行政区划英文简称。"
                                  },
                                  "lnt": {
                                    "type": "number",
                                    "description": "经度"
                                  },
                                  "english": {
                                    "type": "string",
                                    "description": "行政区划英文名称"
                                  },
                                  "bound": {
                                    "type": "string",
                                    "description": "四角点坐标"
                                  },
                                  "lat": {
                                    "type": "number",
                                    "description": "纬度"
                                  },
                                  "points": {
                                    "type": "string",
                                    "description": "行政区划范围面。"
                                  },
                                  "region": {
                                    "type": "string",
                                    "description": "行政区划范围"
                                  }
                                }
                              },
                              "description": "返回的行政区划信息。"
                            },
                            "msg": {
                              "type": "string",
                              "description": "返回消息。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3021_7_POST",
        "parameters": [
          {
            "name": "searchWord",
            "in": "query",
            "description": "查询关键字。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "searchType",
            "in": "query",
            "description": "查询类型(0：根据code查询，1：根据名称。)。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needSubInfo",
            "in": "query",
            "description": "是否需要下一级信息。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needAll",
            "in": "query",
            "description": "是否需要所有子节点。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needPolygon",
            "in": "query",
            "description": "是否需要行政区划范围。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needPre",
            "in": "query",
            "description": "是否需要上一级所有信息。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tk",
            "in": "query",
            "description": "您的服务器端密钥",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3021-6": {
      "x-pointCode": 6,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "地址转经纬度",
        "description": "天地图地址转经纬度服务API是一类简单的HTTP/HTTPS接口，提供将坐标点（经纬度）转换为结构化的地址信息的功能。使用地址转经纬度服务前您需要申请Key。\n本接口需到天地图官网购买：http://lbs.tianditu.gov.cn/server/search.html",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "result": {
                              "type": "object",
                              "properties": {
                                "addressComponent": {
                                  "type": "object",
                                  "properties": {
                                    "road_distance": {
                                      "type": "number",
                                      "description": "此点距离此路的距离"
                                    },
                                    "poi_distance": {
                                      "type": "number",
                                      "description": "距离此点最近poi点的距离"
                                    },
                                    "address_distance": {
                                      "type": "number",
                                      "description": "此点距离最近地点信息距离"
                                    },
                                    "province_code": {
                                      "type": "string",
                                      "description": "此点所在省编码"
                                    },
                                    "road": {
                                      "type": "string",
                                      "description": "距离此点最近的路"
                                    },
                                    "nation": {
                                      "type": "string",
                                      "description": "此点所在国家"
                                    },
                                    "city": {
                                      "type": "string",
                                      "description": "此点所在城市"
                                    },
                                    "poi": {
                                      "type": "string",
                                      "description": "距离此点最近poi点"
                                    },
                                    "address_position": {
                                      "type": "string",
                                      "description": "此点在最近地点信息方向"
                                    },
                                    "county": {
                                      "type": "string",
                                      "description": "此点所在区"
                                    },
                                    "address": {
                                      "type": "string",
                                      "description": "此点最近地点信息"
                                    },
                                    "province": {
                                      "type": "string",
                                      "description": "此点所在省"
                                    },
                                    "city_code": {
                                      "type": "string",
                                      "description": "此点所在城市编码"
                                    },
                                    "poi_position": {
                                      "type": "string",
                                      "description": "此点在最近poi点的方向"
                                    },
                                    "county_code": {
                                      "type": "string",
                                      "description": "此点所在区编码"
                                    }
                                  },
                                  "description": "此点的具体信息（分类）"
                                },
                                "location": {
                                  "type": "object",
                                  "properties": {
                                    "lon": {
                                      "type": "number"
                                    },
                                    "lat": {
                                      "type": "number"
                                    }
                                  },
                                  "description": "此点坐标"
                                },
                                "formatted_address": {
                                  "type": "string",
                                  "description": "详细地址"
                                }
                              }
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0：调用成功\n-1：调用失败"
                            },
                            "status": {
                              "type": "string",
                              "description": "返回状态，0：正常返回，101：结果为空，404：出错。"
                            },
                            "remark": {
                              "type": "string",
                              "description": "接口调用说明"
                            },
                            "msg": {
                              "type": "string",
                              "description": "返回信息，OK：正常，其他异常。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3021_6_POST",
        "parameters": [
          {
            "name": "lon",
            "in": "query",
            "description": "坐标的x值",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "description": "坐标的y值",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ver",
            "in": "query",
            "description": "接口版本",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tk",
            "in": "query",
            "description": "您的服务器端密钥",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3021-5": {
      "x-pointCode": 5,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "地理编码",
        "description": "天地图地理编码API是一类简单的HTTP/HTTPS接口，是指由结构化地址数据（如：北京市海淀区莲花池西路28号）转换为对应坐标点（经纬度）功能，地址解析仅限于国内。使用地理编码服务前您需要申请Key。\n本接口需到天地图官网购买：http://lbs.tianditu.gov.cn/server/search.html",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0：调用成功\n-1：调用失败"
                            },
                            "location": {
                              "type": "object",
                              "properties": {
                                "lon": {
                                  "type": "number",
                                  "description": "坐标点显示经度"
                                },
                                "level": {
                                  "type": "string",
                                  "description": "类别名称"
                                },
                                "score": {
                                  "type": "number"
                                },
                                "keyWord": {
                                  "type": "string"
                                },
                                "lat": {
                                  "type": "number",
                                  "description": "坐标点显示纬度"
                                }
                              },
                              "description": "地址信息"
                            },
                            "status": {
                              "type": "string",
                              "description": "返回状态，0：正常返回，101：结果为空，404：出错。"
                            },
                            "remark": {
                              "type": "string",
                              "description": "调用说明"
                            },
                            "msg": {
                              "type": "string",
                              "description": "返回信息，OK：正常，其他异常。"
                            },
                            "searchVersion": {
                              "type": "string",
                              "description": "版本"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3021_5_POST",
        "parameters": [
          {
            "name": "keyWord",
            "in": "query",
            "description": "请求关键字",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tk",
            "in": "query",
            "description": "您的服务器端密钥",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3021-4": {
      "x-pointCode": 4,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "公交规划",
        "description": "驾车服务API是一类简单的HTTP/HTTPS接口，根据输入起点和终点查询公交地铁规划线路。使用公交规划服务前您需要申请Key。\n本接口需到天地图官网购买：http://lbs.tianditu.gov.cn/server/search.html",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0：调用成功\n-1：调用失败"
                            },
                            "hasSubway": {
                              "type": "boolean",
                              "description": "0\t不包含地铁线路。\n1\t包含地铁线路。"
                            },
                            "results": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "lineType": {
                                    "type": "number",
                                    "description": "返回线路结果类型：第0位为1，较快捷；第1位为1，少换乘；第2位为1，少步行；第3位为1，不坐地铁；"
                                  },
                                  "lines": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "segments": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "segmentType": {
                                                "type": "number",
                                                "description": "线路类型"
                                              },
                                              "stationStart": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "站点名称"
                                                    },
                                                    "uuid": {
                                                      "type": "string",
                                                      "description": "站的id信息"
                                                    },
                                                    "lonlat": {
                                                      "type": "string",
                                                      "description": "站点坐标"
                                                    }
                                                  }
                                                },
                                                "description": "起站点内容"
                                              },
                                              "stationEnd": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "name": {
                                                      "type": "string",
                                                      "description": "站的id信息"
                                                    },
                                                    "uuid": {
                                                      "type": "string",
                                                      "description": "站点坐标"
                                                    },
                                                    "lonlat": {
                                                      "type": "string",
                                                      "description": "终站点内容"
                                                    }
                                                  }
                                                },
                                                "description": "终站点内容"
                                              },
                                              "segmentLine": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "segmentName": {
                                                      "type": "string",
                                                      "description": "此段线路的线路名（不包含括号中的内容）"
                                                    },
                                                    "direction": {
                                                      "type": "string",
                                                      "description": "此段线路的完整线路名"
                                                    },
                                                    "linePoint": {
                                                      "type": "string",
                                                      "description": "此段线路的坐标"
                                                    },
                                                    "segmentDistance": {
                                                      "type": "string",
                                                      "description": "一条线路中每小段距离，如果此段是步行且距离小于20米，不返回此线段"
                                                    },
                                                    "segmentStationCount": {
                                                      "type": "string",
                                                      "description": "此段线路需要经过的站点数"
                                                    },
                                                    "segmentTime": {
                                                      "type": "string",
                                                      "description": "此段线路需要的时间"
                                                    }
                                                  }
                                                },
                                                "description": "线路内容"
                                              }
                                            }
                                          },
                                          "description": "单条公交结果中的各段线路信息。"
                                        },
                                        "lineName": {
                                          "type": "string",
                                          "description": "单条公交规划结果所有线路名称"
                                        }
                                      }
                                    },
                                    "description": "公交结果线路(相对应类型的所有线路，最多5条)"
                                  }
                                }
                              },
                              "description": "结果集"
                            },
                            "remark": {
                              "type": "string",
                              "description": "调用说明"
                            },
                            "resultCode": {
                              "type": "number",
                              "description": "0\t正常返回线路。\n1\t找不到起点。\n2\t找不到终点。\n3\t规划线路失败。\n4\t起终点距离200米以内，不规划线路，建议步行。\n5\t起终点距离500米内，返回线路。\n6\t输入参数错误。"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3021_4_POST",
        "parameters": [
          {
            "name": "startposition",
            "in": "query",
            "description": "出发点坐标 “经度，纬度”",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endposition",
            "in": "query",
            "description": "终点坐标 “经度，纬度”",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linetype",
            "in": "query",
            "description": "获取线路规划类型(按位判断规划类型，以支持同时获取多种规划结果)第0位为1，较快捷；第1位为1，少换乘；第2位为1，少步行；第3位为1，不坐地铁。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tk",
            "in": "query",
            "description": "您的服务器端密钥",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3021-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "驾车规划",
        "description": "驾车服务API是一类简单的HTTP/HTTPS接口，根据输入起点、终点和途经点规划查询驾车路线。使用驾车服务前您需要申请Key。\n本接口需到天地图官网购买：http://lbs.tianditu.gov.cn/server/search.html",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "result": {
                              "type": "object",
                              "properties": {
                                "mapinfo": {
                                  "type": "object",
                                  "properties": {
                                    "center": {
                                      "type": "string",
                                      "description": "全部结果同时显示的适宜中心经纬度"
                                    },
                                    "scale": {
                                      "type": "string",
                                      "description": "全部结果同时显示的适宜缩放比例"
                                    }
                                  },
                                  "description": "地图信息"
                                },
                                "duration": {
                                  "type": "string",
                                  "description": "全长（单位：公里）"
                                },
                                "distance": {
                                  "type": "string",
                                  "description": "行驶总时间（单位：秒）"
                                },
                                "dest": {
                                  "type": "string",
                                  "description": "终点加密经纬度"
                                },
                                "routes": {
                                  "type": "object",
                                  "properties": {
                                    "time": {
                                      "type": "string",
                                      "description": "查询时间"
                                    },
                                    "count": {
                                      "type": "string",
                                      "description": "分段总数"
                                    },
                                    "item": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "description": "序号"
                                          },
                                          "strguide": {
                                            "type": "string",
                                            "description": "每段线路文字描述"
                                          },
                                          "turnlatlon": {
                                            "type": "string",
                                            "description": "转折点经纬度"
                                          },
                                          "tollStatus": {
                                            "type": "string",
                                            "description": "道路收费信息(0=免费路段，1=收费路段，2=部分收费路段)"
                                          },
                                          "nextStreetName": {
                                            "type": "string",
                                            "description": "下一段道路名称"
                                          },
                                          "signage": {
                                            "type": "string",
                                            "description": "“路牌”引导提示/高速路收费站出口信息"
                                          },
                                          "streetName": {
                                            "type": "string",
                                            "description": "当前路段名称"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "description": "路由信息"
                                },
                                "simple": {
                                  "type": "object",
                                  "properties": {
                                    "item": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "description": "序号"
                                          },
                                          "strguide": {
                                            "type": "string",
                                            "description": "每段线路文字描述"
                                          },
                                          "streetNames": {
                                            "type": "string",
                                            "description": "当前行驶路段名称（含多个路段）"
                                          },
                                          "turnlatlon": {
                                            "type": "string",
                                            "description": "转折点经纬度"
                                          },
                                          "linkStreetName": {
                                            "type": "string",
                                            "description": "合并段之间衔接的道路名称"
                                          },
                                          "tollStatus": {
                                            "type": "string",
                                            "description": "道路收费信息(0=免费路段，1=收费路段，2=部分收费路段)"
                                          },
                                          "signage": {
                                            "type": "string",
                                            "description": "“路牌”引导提示/高速路收费站出口信息"
                                          },
                                          "streetLatLon": {
                                            "type": "string",
                                            "description": "线路经纬度"
                                          },
                                          "streetDistance": {
                                            "type": "string",
                                            "description": "行驶总距离（单位：米）"
                                          },
                                          "segmentNumber": {
                                            "type": "string",
                                            "description": "合并后的号段，对应详细描述中的号段"
                                          },
                                          "lastStreetName": {
                                            "type": "string",
                                            "description": "最后一段道路名称"
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "description": "详解"
                                },
                                "routelatlon": {
                                  "type": "string",
                                  "description": "线路经纬度字符串"
                                },
                                "orig": {
                                  "type": "string",
                                  "description": "起点加密经纬度"
                                },
                                "parameters": {
                                  "type": "object",
                                  "properties": {
                                    "height": {
                                      "type": "string",
                                      "description": "地图高度"
                                    },
                                    "sort": {
                                      "type": "string",
                                      "description": "排序方式"
                                    },
                                    "dest": {
                                      "type": "string",
                                      "description": "终点加密经纬度"
                                    },
                                    "style": {
                                      "type": "string",
                                      "description": "导航路线类型"
                                    },
                                    "width": {
                                      "type": "string",
                                      "description": "地图宽度"
                                    },
                                    "orig": {
                                      "type": "string",
                                      "description": "起点加密经纬度"
                                    },
                                    "mid": {
                                      "type": "string",
                                      "description": "途径点加密经纬度集合"
                                    },
                                    "key": {
                                      "type": "string",
                                      "description": "经纬度加密的 key 值"
                                    },
                                    "version": {
                                      "type": "string",
                                      "description": "版本控制"
                                    }
                                  }
                                },
                                "mid": {
                                  "type": "string",
                                  "description": "途径点加密经纬度集合"
                                }
                              },
                              "description": "结果集"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0：调用成功\n-1：调用失败"
                            },
                            "remark": {
                              "type": "string",
                              "description": "调用说明"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3021_3_POST",
        "parameters": [
          {
            "name": "orig",
            "in": "query",
            "description": "起点经纬度\n注：-180,-90,180,90。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dest",
            "in": "query",
            "description": "终点经纬度\n注：-180,-90,180,90。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mid",
            "in": "query",
            "description": "途径点经纬度字符串\n注：途径点字符串格式：116.35506,39.92277;116.35506,39.92277两个坐标之间以分号隔开，坐标xy之间用逗号隔开(都是半角)。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "style",
            "in": "query",
            "description": "导航路线类型:\t默认0 （0：最快路线，1：最短路线，2：避开高速，3：步行）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tk",
            "in": "query",
            "description": "您的服务器端密钥",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3021-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "地名搜索V2",
        "description": "地名搜索服务V2.0是一类简单的HTTP/HTTPS接口，包括普通搜索、视野内搜索、周边搜索、多边形搜索、行政区域搜索、分类搜索、统计搜索。\n使用搜索服务V2.0前您需要申请Key，并在控制台中配置权限。本接口需到天地图官网购买：http://lbs.tianditu.gov.cn/server/search.html",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0：调用成功\n-1：调用失败"
                            },
                            "count": {
                              "type": "string",
                              "description": "返回总条数"
                            },
                            "status": {
                              "type": "object",
                              "properties": {
                                "infocode": {
                                  "type": "number",
                                  "description": "信息码"
                                },
                                "cndesc": {
                                  "type": "string",
                                  "description": "返回中文描述"
                                }
                              },
                              "description": "返回状态信息"
                            },
                            "remark": {
                              "type": "string",
                              "description": "调用说明"
                            },
                            "resultType": {
                              "type": "number"
                            },
                            "pois": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "phone": {
                                    "type": "string",
                                    "description": "电话"
                                  },
                                  "poiType": {
                                    "type": "string",
                                    "description": "poi类型（101:POI数据 102:公交站点）"
                                  },
                                  "lonlat": {
                                    "type": "string",
                                    "description": "坐标（坐标 x，y）"
                                  },
                                  "source": {
                                    "type": "string",
                                    "description": "数据信息来源"
                                  },
                                  "address": {
                                    "type": "string",
                                    "description": "地址"
                                  },
                                  "hotPointID": {
                                    "type": "string",
                                    "description": "poi热点ID"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Poi点名称"
                                  },
                                  "eaddress": {
                                    "type": "string",
                                    "description": "英文地址"
                                  },
                                  "ename": {
                                    "type": "string",
                                    "description": "poi点英文名称"
                                  },
                                  "province": {
                                    "type": "string",
                                    "description": "所属省名称"
                                  },
                                  "provinceCode": {
                                    "type": "string",
                                    "description": "省行政区编码"
                                  },
                                  "city": {
                                    "type": "string",
                                    "description": "所属城市名称"
                                  },
                                  "cityCode": {
                                    "type": "string",
                                    "description": "市行政区编码"
                                  },
                                  "county": {
                                    "type": "string",
                                    "description": "所属区县名称"
                                  },
                                  "countyCode": {
                                    "type": "string",
                                    "description": "区县行政区编码"
                                  },
                                  "typeCode": {
                                    "type": "string",
                                    "description": "分类编码"
                                  },
                                  "typeName": {
                                    "type": "string",
                                    "description": "分类名称"
                                  },
                                  "stationData": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "lineName": {
                                          "type": "string",
                                          "description": "线路名称"
                                        },
                                        "uuid": {
                                          "type": "string",
                                          "description": "线路的id"
                                        },
                                        "stationUuid": {
                                          "type": "string",
                                          "description": "公交站uuid"
                                        }
                                      }
                                    },
                                    "description": "车站信息结构体 数据（poiType=102）"
                                  }
                                }
                              },
                              "description": "针对点（类型1）集合返回"
                            },
                            "prompt": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "number",
                                    "description": "提示类型，1：是否在where搜what，2：在where无搜索what的结果，3：多个可跳转的行政区提示，4：城市"
                                  },
                                  "admins": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "adminName": {
                                          "type": "string",
                                          "description": "行政区名称"
                                        },
                                        "adminCode": {
                                          "type": "number",
                                          "description": "行政区划编码"
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "description": "提示信息，如“您是否在XXX，搜索XXX”，其中包含提示文字及对应的行政区码"
                            },
                            "keyWord": {
                              "type": "string",
                              "description": "搜索关键词"
                            },
                            "statistics": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "count": {
                                    "type": "number",
                                    "description": "返回搜索POI总数量"
                                  },
                                  "adminCount": {
                                    "type": "number",
                                    "description": "行政区数量"
                                  },
                                  "priorityCitys": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "description": "行政区名称"
                                        },
                                        "count": {
                                          "type": "number",
                                          "description": "城市数量"
                                        },
                                        "lonlat": {
                                          "type": "string",
                                          "description": "行政区中心点经纬度"
                                        },
                                        "ename": {
                                          "type": "string",
                                          "description": "英文行政名称"
                                        },
                                        "adminCode": {
                                          "type": "number",
                                          "description": "城市国标码（9位国标码）"
                                        }
                                      }
                                    },
                                    "description": "推荐行政区名称"
                                  },
                                  "allAdmins": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "description": "行政区名称"
                                        },
                                        "count": {
                                          "type": "number",
                                          "description": "包含数量"
                                        },
                                        "lonlat": {
                                          "type": "string",
                                          "description": "行政区中心点经纬度"
                                        },
                                        "adminCode": {
                                          "type": "string",
                                          "description": "省国标码"
                                        },
                                        "ename": {
                                          "type": "string",
                                          "description": "英文行政名称"
                                        },
                                        "isleaf": {
                                          "type": "boolean",
                                          "description": "有无下一级行政区(有则false，无则true)"
                                        }
                                      }
                                    },
                                    "description": "各省包含信息集合"
                                  }
                                }
                              },
                              "description": "针对统计（类型2）集合返回"
                            },
                            "area": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "名称"
                                  },
                                  "bound": {
                                    "type": "string",
                                    "description": "定位范围(“minx,miny,maxx,maxy”)"
                                  },
                                  "lonlat": {
                                    "type": "string",
                                    "description": "定位中心点坐标"
                                  },
                                  "adminCode": {
                                    "type": "number",
                                    "description": "行政区编码"
                                  },
                                  "level": {
                                    "type": "number",
                                    "description": "显示级别（1-18级）"
                                  }
                                }
                              },
                              "description": "针对行政区省（类型3）集合点"
                            },
                            "lineData": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "stationNum": {
                                    "type": "string",
                                    "description": "站数量"
                                  },
                                  "poiType": {
                                    "type": "string",
                                    "description": "类型"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "线路名称"
                                  },
                                  "uuid": {
                                    "type": "string",
                                    "description": "线路id"
                                  }
                                }
                              },
                              "description": "线路（类型5）结果"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3021_2_POST",
        "parameters": [
          {
            "name": "tk",
            "in": "query",
            "description": "您的服务器端密钥",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyWord",
            "in": "query",
            "description": "搜索的关键字",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mapBound",
            "in": "query",
            "description": "查询的地图范围(“minx,miny,maxx,maxy”)\t\n注：\t-180,-90至180,90。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "description": "目前查询的级别\n注：1-18级",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specify",
            "in": "query",
            "description": "指定行政区的国标码（行政区划编码表）严格按照行政区划编码表中的（名称，gb码）。如指定的行政区划编码是省以上级别则返回是统计数据（不包括直辖市）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryType",
            "in": "query",
            "description": "搜索类型\n1:普通搜索（含地铁公交）;\n2:视野内搜索;\n3:周边搜索服务;\n7:地名搜索;\n10:多边形搜索服务;\n12:行政区划区域搜索服务;\n13:分类搜索服务;\n14:统计搜索服务;",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "返回结果起始位（用于分页和缓存）\n注：0-300，表示返回结果的起始位置。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "返回的结果数量（用于分页和缓存）\n注：1-300，返回结果的条数。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataTypes",
            "in": "query",
            "description": "数据分类",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "show",
            "in": "query",
            "description": "返回poi结果信息类别\n注：取值为1，则返回基本poi信息； 取值为2，则返回详细poi信息",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryRadius",
            "in": "query",
            "description": "查询半径\n注：单位:米 （10公里内）\n",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pointLonlat",
            "in": "query",
            "description": "点坐标\n注：中心点，经纬度坐标\n",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "polygon",
            "in": "query",
            "description": "多边形范围数据(经纬度坐标对)\t\n注：经度和纬度用\",\"分割，首尾坐标对需相同。实例(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x1,y1)\n",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3021-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "地名搜索",
        "description": "地名搜索服务API是一类简单的HTTP/HTTPS接口，包括普通搜索、视野内搜索、周边搜索、拉框搜索、普通建议词搜索等。使用搜索服务前您需要申请Key。使用本接口需到天地图官网购买：http://lbs.tianditu.gov.cn/server/search.html",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "0：调用成功\n-1：调用失败"
                            },
                            "count": {
                              "type": "string",
                              "description": "搜索总条数"
                            },
                            "remark": {
                              "type": "string",
                              "description": "调用说明"
                            },
                            "resultType": {
                              "type": "number",
                              "description": "显示类型，1（普通POI），2（统计），3（行政区)，4（普通建议词搜索），5（线路结果）"
                            },
                            "pois": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "phone": {
                                    "type": "string",
                                    "description": "电话"
                                  },
                                  "lonlat": {
                                    "type": "string",
                                    "description": "坐标"
                                  },
                                  "address": {
                                    "type": "string",
                                    "description": "地址"
                                  },
                                  "hotPointID": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "Poi点名称"
                                  },
                                  "ename": {
                                    "type": "string",
                                    "description": "poi点英文名称"
                                  },
                                  "eaddress": {
                                    "type": "string",
                                    "description": "英文地址"
                                  },
                                  "poiType": {
                                    "type": "number",
                                    "description": "resultType=5返回，poi点的poi类型（102 公交站，普通poi 该参数可以不返回）"
                                  },
                                  "stationData": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "lineName": {
                                          "type": "string",
                                          "description": "线路名称"
                                        },
                                        "uuid": {
                                          "type": "string",
                                          "description": "线路的id"
                                        }
                                      }
                                    },
                                    "description": "resultType=3返回，车站信息结构体 数据"
                                  },
                                  "stationUuid": {
                                    "type": "string",
                                    "description": "resultType=3返回，公交站uuid"
                                  },
                                  "distance": {
                                    "type": "number",
                                    "description": "resultType=3返回，距离（周边时有）"
                                  }
                                }
                              },
                              "description": "针对点（类型1）集合返回"
                            },
                            "landmarkcount": {
                              "type": "number"
                            },
                            "dataversion": {
                              "type": "string"
                            },
                            "prompt": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "number",
                                    "description": "提示类型： 1：是否在where搜what，2：在where无搜索what的结果，3：多个可跳转的行政区提示，4：城市"
                                  },
                                  "admins": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "description": "行政区名称"
                                        },
                                        "adminCode": {
                                          "type": "number",
                                          "description": "行政区码"
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "description": "提示信息，如“您是否在XXX，搜索XXX”，其中包含提示文字及对应的行政区码"
                            },
                            "mclayer": {
                              "type": "string"
                            },
                            "searchversion": {
                              "type": "string"
                            },
                            "engineversion": {
                              "type": "string"
                            },
                            "keyWord": {
                              "type": "string",
                              "description": "关键字"
                            },
                            "statistics": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "count": {
                                    "type": "number",
                                    "description": "本次统计POI总数量"
                                  },
                                  "citysCount": {
                                    "type": "number",
                                    "description": "城市数量"
                                  },
                                  "countryCount": {
                                    "type": "number",
                                    "description": "国家数量"
                                  },
                                  "priorityCitys": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "description": "城市名称"
                                        },
                                        "count": {
                                          "type": "number",
                                          "description": "城市数量"
                                        },
                                        "gbCode": {
                                          "type": "number",
                                          "description": "城市国标码"
                                        }
                                      }
                                    },
                                    "description": "推荐显示城市"
                                  },
                                  "allAdmins": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "description": "省名称"
                                        },
                                        "count": {
                                          "type": "number",
                                          "description": "包含数量"
                                        },
                                        "adminCode": {
                                          "type": "string",
                                          "description": "省国标码"
                                        },
                                        "childAdmins": {
                                          "type": "array",
                                          "items": {
                                            "type": "object"
                                          },
                                          "description": "包括各市级集合"
                                        }
                                      }
                                    },
                                    "description": "各省包含信息集合"
                                  },
                                  "provinceCount": {
                                    "type": "number",
                                    "description": "省份数量"
                                  }
                                }
                              },
                              "description": "针对统计（类型2）集合返回"
                            },
                            "area": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "名称"
                                  },
                                  "bound": {
                                    "type": "string",
                                    "description": "定位范围（矩形）"
                                  },
                                  "Points": {
                                    "type": "array",
                                    "items": {
                                      "type": "object"
                                    },
                                    "description": "点集合{121.3333 39.222,121.4444 39.223,121.5555 39.265,......}(省级才有)"
                                  },
                                  "lonlat": {
                                    "type": "string",
                                    "description": "{121.111,43.111}(定位点)"
                                  },
                                  "level": {
                                    "type": "number",
                                    "description": "3（显示级别,判断是否存在）"
                                  },
                                  "type": {
                                    "type": "number",
                                    "description": "1：正常区域，2：特殊区域"
                                  },
                                  "info": {
                                    "type": "string",
                                    "description": "type=2返回，区域信息简介"
                                  },
                                  "Address": {
                                    "type": "string",
                                    "description": "type=2返回，特殊区域的地址信息。"
                                  }
                                }
                              },
                              "description": "针对行政区省（类型3）集合点"
                            },
                            "suggests": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "名称"
                                  },
                                  "address": {
                                    "type": "string",
                                    "description": "地区地址"
                                  },
                                  "gbCode": {
                                    "type": "string",
                                    "description": "国标码"
                                  }
                                }
                              },
                              "description": "针对建议词（类型4）搜索"
                            },
                            "lineData": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "线路名称"
                                  },
                                  "uuid": {
                                    "type": "string",
                                    "description": "线路的id"
                                  },
                                  "stationNum": {
                                    "type": "string",
                                    "description": "站数"
                                  }
                                }
                              },
                              "description": "针对线路（类型5）结果"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3021_1_POST",
        "parameters": [
          {
            "name": "tk",
            "in": "query",
            "description": "您的服务器端密钥",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyWord",
            "in": "query",
            "description": "搜索的关键字\n注：不支持’与&符号。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mapBound",
            "in": "query",
            "description": "查询的地图范围(\"-x,-y,x,y\")\n注：-180,-90至180,90。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "description": "目前查询的级别\t\n注：1-20。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specifyAdminCode",
            "in": "query",
            "description": "指定行政区的国标码\n注：\t9位国标码，如：北京：156110000，优先级高于视野内。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryRadius",
            "in": "query",
            "description": "查询半径（周边搜索时）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pointLonlat",
            "in": "query",
            "description": "点坐标（周边搜索）",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryType",
            "in": "query",
            "description": "搜索类型\n1：普通搜索，\n2：视野内搜索，\n3：周边搜索，\n4：普通建议词搜索，\n5：公交规划建议词搜索，\n6：公交规划起止点搜索（只搜索公交站），7： 纯地名搜索（不搜公交线），\n10：拉框搜索\n注：传递参数为1-10，分别对应不同的搜索类型。暂无8和9。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "返回结果起始位（用于分页和缓存）默认0\n注：0-300，表示返回结果的起始位置。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "返回的结果数量（用于分页和缓存）\n注：1-300，标书返回结果的条数。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lonlat",
            "in": "query",
            "description": "查询城市中心点坐标（经纬度坐标）\n例如：北京坐标点是'lonlat':'116.38094,39.92362'。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bound",
            "in": "query",
            "description": "查询城市矩形范围\n例如：北京矩形范围是'bound':'116.18198,39.84396,116.5799,40.00327'。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zoom",
            "in": "query",
            "description": "查询城市缩放级别（1—18级）\n例如：北京的是'zoom':'12'。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "layers",
            "in": "query",
            "description": "查询城市图层（vec：表示矢量、Cva：表示注记）\n例如：'layers':'vec,cva'。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projection",
            "in": "query",
            "description": "查询城市投影（c:平面坐标投影、w:墨卡托投影）\n例如：'projection':'c'。",
            "required": false,
            "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/3021?tab=book"
  },
  "x-apiCode": "3021",
  "x-is-own": true,
  "x-is-op": true
}