{
  "openapi": "3.0.3",
  "info": {
    "title": "邮编区域互查",
    "description": "邮编区域互查API是一个实用的工具，它允许用户通过邮政编码快速查询到具体的地区信息，同时也支持通过地区信息查找对应的邮编。这款API在地图查询等领域有广泛应用，设计简洁，响应快速，结果准确，可满足多种业务场景需求。我们持续优化API性能，欢迎用户反馈意见，共同提升服务品质。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/1917-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "查询详细地区的邮编",
        "description": "查询详细地区邮编的接口，适用于快递物流、在线服务、地图应用、数据分析等多个场景，帮助用户快速获取准确的邮政编码信息。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "allPages": {
                              "type": "number",
                              "description": "最大页码"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0为成功，其余为失败"
                            },
                            "contentlist": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "0": {
                                    "type": "object",
                                    "properties": {
                                      "area": {
                                        "type": "string",
                                        "description": "区县"
                                      },
                                      "county": {
                                        "type": "string",
                                        "description": "街道"
                                      },
                                      "province": {
                                        "type": "string",
                                        "description": "省"
                                      },
                                      "code": {
                                        "type": "string",
                                        "description": "邮编"
                                      },
                                      "city": {
                                        "type": "string",
                                        "description": "城市"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "showapi_fee_code": {
                              "type": "number"
                            },
                            "currentPage": {
                              "type": "number",
                              "description": "当前页"
                            },
                            "allNum": {
                              "type": "number",
                              "description": "最大条数"
                            },
                            "maxResult": {
                              "type": "number",
                              "description": "每页最大记录数"
                            },
                            "msg": {
                              "type": "string",
                              "description": "查询条件"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1917_3_POST",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "页码\n注意：分页最大50页",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "province",
            "in": "query",
            "description": "省，如上海市、云南省",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "市，如昆明市",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "area",
            "in": "query",
            "description": "区县，如西山区",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/1917-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "地区查询邮编",
        "description": "支持通过地区信息查找对应的邮编的接口，适用于快递物流、在线服务、地图应用、数据分析等多个场景，帮助用户快速获取地址信息。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "allPages": {
                              "type": "number",
                              "description": "最大页码"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0为成功，其余为失败"
                            },
                            "contentlist": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "0": {
                                    "type": "object",
                                    "properties": {
                                      "area": {
                                        "type": "string",
                                        "description": "区县"
                                      },
                                      "county": {
                                        "type": "string",
                                        "description": "街道"
                                      },
                                      "province": {
                                        "type": "string",
                                        "description": "省"
                                      },
                                      "code": {
                                        "type": "string",
                                        "description": "邮编"
                                      },
                                      "city": {
                                        "type": "string",
                                        "description": "城市"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "currentPage": {
                              "type": "number",
                              "description": "当前页"
                            },
                            "allNum": {
                              "type": "number",
                              "description": "最大条数"
                            },
                            "maxResult": {
                              "type": "number",
                              "description": "每页最大记录数"
                            },
                            "msg": {
                              "type": "string",
                              "description": "查询条件"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1917_2_POST",
        "parameters": [
          {
            "name": "area",
            "in": "query",
            "description": "地区",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "页码",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/1917-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "邮编查询区域",
        "description": "通过邮政编码查询具体地区信息的接口，适用于快递物流、地址验证、地图服务、在线购物等多个场景，帮助用户快速准确地定位地址。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "allPages": {
                              "type": "number"
                            },
                            "ret_code": {
                              "type": "number"
                            },
                            "contentlist": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "0": {
                                    "type": "object",
                                    "properties": {
                                      "area": {
                                        "type": "string",
                                        "description": "区县"
                                      },
                                      "county": {
                                        "type": "string",
                                        "description": "街道"
                                      },
                                      "province": {
                                        "type": "string",
                                        "description": "省"
                                      },
                                      "code": {
                                        "type": "string",
                                        "description": "邮编"
                                      },
                                      "city": {
                                        "type": "string",
                                        "description": "城市"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "showapi_fee_code": {
                              "type": "number",
                              "description": "成功为0，其余为失败，无其他特别意义"
                            },
                            "currentPage": {
                              "type": "number",
                              "description": "当前页"
                            },
                            "code": {
                              "type": "string",
                              "description": "邮编"
                            },
                            "allNum": {
                              "type": "number",
                              "description": "满足当前条件的所有条数"
                            },
                            "maxResult": {
                              "type": "number",
                              "description": "每页最大条数"
                            },
                            "msg": {
                              "type": "string",
                              "description": "返回说明"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1917_1_POST",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "6位数的邮编号码",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "页码",
            "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/1917?tab=book"
  },
  "x-apiCode": "1917",
  "x-is-own": true,
  "x-is-op": true
}