{
  "openapi": "3.0.3",
  "info": {
    "title": "地震信息",
    "description": "【地震信息查询器】一款专注于根据时间查询地震信息的实用api。虽然它不能在地震发生时实时提供关键信息以确保人身安全，但它能帮助您了解历史地震情况，以便更好地预防和准备。无论您是在家中、办公室还是旅途中，这款应用都能为您提供宝贵的历史数据，便于用户进行教育和研究，提高地震防范意识。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/2274-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 25,
      "x-connect-timeout": 10,
      "post": {
        "summary": "地震信息",
        "description": "地震信息接口提供近一年内地震数据的查询，适用于地震研究机构、政府应急部门、地震预警系统等，用于地震监测、灾害预警、科学研究等场景。",
        "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表示找到，-1表示没有找到或出错"
                            },
                            "count": {
                              "type": "number",
                              "description": "找到记录条数"
                            },
                            "remark": {
                              "type": "string",
                              "description": "错误信息"
                            },
                            "earthquakes": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "timestampLocal": {
                                    "type": "number",
                                    "description": "当地时间时间戳"
                                  },
                                  "location": {
                                    "type": "string",
                                    "description": "震源大体位置"
                                  },
                                  "mag": {
                                    "type": "number",
                                    "description": "烈度"
                                  },
                                  "timestampUTC": {
                                    "type": "number",
                                    "description": "UTC时间时间戳"
                                  },
                                  "timeUTC": {
                                    "type": "string",
                                    "description": "UTC时间"
                                  },
                                  "lng": {
                                    "type": "number",
                                    "description": "震源经度"
                                  },
                                  "from": {
                                    "type": "string",
                                    "description": "数据来源"
                                  },
                                  "timeLocal": {
                                    "type": "string",
                                    "description": "当地时间"
                                  },
                                  "dep": {
                                    "type": "number",
                                    "description": "震源深度"
                                  },
                                  "lat": {
                                    "type": "number",
                                    "description": "震源纬度"
                                  }
                                }
                              },
                              "description": "记录集合"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "2274_1_POST",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "description": "要查询的地震发生的日期（北京时间）格式为yyyyMMdd",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "area",
            "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/2274?tab=book"
  },
  "x-apiCode": "2274",
  "x-is-own": false,
  "x-is-op": false
}