{
  "openapi": "3.0.3",
  "info": {
    "title": "新闻API接口",
    "description": "多频道，本接口仅限于内部数据分析统计、机器学习，不得用于终端展示。版权问题需要您联系新闻发布者获取。为保证数据的及时性，每5-10分钟刷新一次。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/109-37": {
      "x-pointCode": 37,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "热搜新闻",
        "description": "返回热搜列表，每30分钟左右更新",
        "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": "是否调用成功"
                            },
                            "top": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "link": {
                                    "type": "string",
                                    "description": "链接"
                                  },
                                  "top": {
                                    "type": "string",
                                    "description": "新闻标题"
                                  }
                                }
                              },
                              "description": "置顶新闻列表"
                            },
                            "hot": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "hot_research": {
                                    "type": "string",
                                    "description": "热搜新闻"
                                  },
                                  "link": {
                                    "type": "string",
                                    "description": "链接"
                                  }
                                }
                              },
                              "description": "全网热搜排行"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "109_37_POST",
        "parameters": []
      }
    },
    "/109-36": {
      "x-pointCode": 36,
      "x-mode": "mapping",
      "x-read-timeout": 15,
      "x-connect-timeout": 15,
      "post": {
        "summary": "用发布时间检索新闻",
        "description": "这个接入点可以按新闻的发布时间来检索新闻。建议使用最新类的新闻频道，例如9a15d3d4b5cab17f34e6d7976b1b1f30【电商最新】频道。这类频道新闻源更多，更新更快！",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "pagebean": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "allNum": {
                                    "type": "number",
                                    "description": "所有记录数"
                                  },
                                  "allPages": {
                                    "type": "number",
                                    "description": "所有页数"
                                  },
                                  "currentPage": {
                                    "type": "number",
                                    "description": "当前页"
                                  },
                                  "maxResult": {
                                    "type": "number",
                                    "description": "每页最大记录数"
                                  },
                                  "contentlist": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "title": {
                                          "type": "string",
                                          "description": "新闻标题"
                                        },
                                        "link": {
                                          "type": "string",
                                          "description": "新闻详情链接"
                                        },
                                        "pubDate": {
                                          "type": "string",
                                          "description": "发布时间"
                                        },
                                        "source": {
                                          "type": "string",
                                          "description": "来源网站"
                                        },
                                        "channelId": {
                                          "type": "string",
                                          "description": "频道id"
                                        },
                                        "channelName": {
                                          "type": "string",
                                          "description": "频道名称"
                                        },
                                        "nid": {
                                          "type": "string",
                                          "description": "新闻对应的外网id"
                                        }
                                      }
                                    },
                                    "description": "数据条目列表"
                                  }
                                }
                              },
                              "description": "返回的分页结构"
                            },
                            "ret_code": {
                              "type": "string",
                              "description": "成功为0，其他失败"
                            },
                            "remark": {
                              "type": "string",
                              "description": "错误信息"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "109_36_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "channelId": {
                    "type": "string",
                    "description": "新闻频道id，必须精确匹配"
                  },
                  "channelName": {
                    "type": "string",
                    "description": "新闻频道名称，必须精确匹配"
                  },
                  "title": {
                    "type": "string",
                    "description": "标题名称，可模糊匹配"
                  },
                  "page": {
                    "type": "string",
                    "description": "页数，默认1，最大返回新闻条数为1万条"
                  },
                  "maxResult": {
                    "type": "string",
                    "description": "每页返回记录数，值在20-100之间。"
                  },
                  "beginTime": {
                    "type": "string",
                    "description": "最早的发布时间，使用格式yyyy-MM-dd HH:mm:ss，不传默认当日0点"
                  },
                  "endTime": {
                    "type": "string",
                    "description": "最晚的发布时间，使用格式yyyy-MM-dd HH:mm:ss，不传默认当前时间"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/109-35": {
      "x-pointCode": 35,
      "x-mode": "mapping",
      "x-read-timeout": 15,
      "x-connect-timeout": 15,
      "post": {
        "summary": "新闻查询接口",
        "description": "根据频道、关键词查询新闻 建议使用最新类的新闻频道，例如9a15d3d4b5cab17f34e6d7976b1b1f30【电商最新】频道。这类频道新闻源更多，更新更快！",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "pagebean": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "allNum": {
                                    "type": "number",
                                    "description": "所有记录数"
                                  },
                                  "allPages": {
                                    "type": "number",
                                    "description": "所有页数"
                                  },
                                  "currentPage": {
                                    "type": "number",
                                    "description": "当前页"
                                  },
                                  "maxResult": {
                                    "type": "number",
                                    "description": "每页最大记录数"
                                  },
                                  "contentlist": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "title": {
                                          "type": "string",
                                          "description": "新闻标题"
                                        },
                                        "link": {
                                          "type": "string",
                                          "description": "新闻详情链接"
                                        },
                                        "pubDate": {
                                          "type": "string",
                                          "description": "发布时间"
                                        },
                                        "source": {
                                          "type": "string",
                                          "description": "来源网站"
                                        },
                                        "channelId": {
                                          "type": "string",
                                          "description": "频道id"
                                        },
                                        "channelName": {
                                          "type": "string",
                                          "description": "频道名称"
                                        },
                                        "nid": {
                                          "type": "string",
                                          "description": "新闻对应的外网id"
                                        }
                                      }
                                    },
                                    "description": "数据条目列表"
                                  }
                                }
                              },
                              "description": "返回的分页结构"
                            },
                            "ret_code": {
                              "type": "string",
                              "description": "成功为0，其他失败"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "109_35_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "channelId": {
                    "type": "string",
                    "description": "新闻频道id，必须精确匹配"
                  },
                  "channelName": {
                    "type": "string",
                    "description": "新闻频道名称，可模糊匹配"
                  },
                  "title": {
                    "type": "string",
                    "description": "标题名称，可模糊匹配"
                  },
                  "page": {
                    "type": "string",
                    "description": "页数，默认1，最大返回新闻条数为1万条"
                  },
                  "maxResult": {
                    "type": "string",
                    "description": "每页返回记录数，值在20-100之间。"
                  },
                  "id": {
                    "type": "string",
                    "description": "新闻id，可用此信息取得一条新闻记录"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/109-34": {
      "x-pointCode": 34,
      "x-mode": "mapping",
      "x-read-timeout": 15,
      "x-connect-timeout": 15,
      "post": {
        "summary": "新闻频道查询",
        "description": "建议使用最新类的新闻频道，例如9a15d3d4b5cab17f34e6d7976b1b1f30【电商最新】频道。这类频道新闻源更多，更新更快！",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "totalNum": {
                              "type": "number",
                              "description": "总记录数"
                            },
                            "channelList": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "频道id"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "频道名称"
                                  }
                                }
                              },
                              "description": "频道列表"
                            },
                            "ret_code": {
                              "type": "string",
                              "description": "0为成功，其他失败"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "109_34_POST",
        "parameters": []
      },
      "put": {
        "summary": "新闻频道查询",
        "description": "建议使用最新类的新闻频道，例如9a15d3d4b5cab17f34e6d7976b1b1f30【电商最新】频道。这类频道新闻源更多，更新更快！",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "totalNum": {
                              "type": "number",
                              "description": "总记录数"
                            },
                            "channelList": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "频道id"
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "频道名称"
                                  }
                                }
                              },
                              "description": "频道列表"
                            },
                            "ret_code": {
                              "type": "string",
                              "description": "0为成功，其他失败"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "109_34_PUT",
        "parameters": []
      }
    }
  },
  "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/109?tab=book"
  },
  "x-apiCode": "109",
  "x-is-own": false,
  "x-is-op": true
}