{
    "openapi": "3.0.0",
    "info": {
        "title": "地区新闻 - API文档",
        "version": "1.0.0",
        "description": "全国各省级行政区（省、直辖市、特别行政区）新闻资讯查询，areaname参数传递对应的地区名称，可通过word参数检索和page参数翻页。注意地区名称不能带有“省”或“市”，例如湖北或上海。生成小程序时，默认为湖北新闻，修改默认指定地区在压缩包util.js文件里。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/areanews\/index": {
            "get": {
                "summary": "查询地区新闻列表",
                "tags": [
                    "地区新闻"
                ],
                "description": "默认返回指定省份新闻支持关键词搜索",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "搜索某地区下的新闻关键词",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "疫情",
                            "description": "搜索某地区下的新闻关键词"
                        }
                    },
                    {
                        "name": "areaname",
                        "in": "query",
                        "description": "地区名，不要带“省”或“市”",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "湖北",
                            "description": "地区名，不要带“省”或“市”"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "9a876fae9e98e9a07ed9c457e8504d1f",
                                            "description": "新闻唯一ID"
                                        },
                                        "url": {
                                            "type": "string",
                                            "example": "http:\/\/hb.sina.com.cn\/news\/j\/2019-12-02\/detail-iihnzhfz3050537.shtml",
                                            "description": "新闻链接"
                                        },
                                        "ctime": {
                                            "type": "string",
                                            "example": "2019-12-02 10:51:00",
                                            "description": "新闻时间"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "大雾橙色预警！湖北多地现能见度小于200米的雾",
                                            "description": "新闻标题"
                                        },
                                        "picUrl": {
                                            "type": "string",
                                            "example": "http:\/\/n.sinaimg.cn\/hb\/87\/w574h313\/20191202\/00f9-ikcacer4044078.jpg",
                                            "description": "新闻配图"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "湖北天气",
                                            "description": "新闻来源"
                                        },
                                        "description": {
                                            "type": "string",
                                            "description": "新闻描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": "9a876fae9e98e9a07ed9c457e8504d1f",
                                                "url": "http:\/\/hb.sina.com.cn\/news\/zwzl\/2019-12-02\/detail-iihnzhfz3116800.shtml",
                                                "ctime": "2019-12-02 15:16:00",
                                                "title": "建始县公安局原党组副书记向绪燕被开除党籍和公职",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/hb\/transform\/20170901\/O0NN-fykpysa2405885.jpg",
                                                "source": "湖北省纪委监委网站",
                                                "description": ""
                                            },
                                            {
                                                "id": "c61ec74133a789fa2cfcdd29f45355b5",
                                                "url": "http:\/\/hb.sina.com.cn\/news\/zwzl\/2019-12-02\/detail-iihnzhfz3113678.shtml",
                                                "ctime": "2019-12-02 15:07:00",
                                                "title": "武汉地铁集团有限公司原党委书记周少东被双开",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/hb\/transform\/20171107\/1TUF-fynmzuk3918902.jpg",
                                                "source": "湖北省纪委监察厅网站",
                                                "description": ""
                                            },
                                            {
                                                "id": "686ea5d58a5fdb7e1ef1ab641210ae92",
                                                "url": "http:\/\/news.cnhan.com\/html\/yaowen\/20191202\/1048058.htm",
                                                "ctime": "2019-12-02 14:13:00",
                                                "title": "【中国稳健前行】把握党的领导制度体系丰富内涵",
                                                "picUrl": "",
                                                "source": "汉网",
                                                "description": ""
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询地区新闻列表",
                "tags": [
                    "地区新闻"
                ],
                "description": "默认返回指定省份新闻支持关键词搜索",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "page": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "疫情",
                                        "description": "搜索某地区下的新闻关键词"
                                    },
                                    "areaname": {
                                        "type": "string",
                                        "example": "湖北",
                                        "description": "地区名，不要带“省”或“市”"
                                    }
                                },
                                "required": [
                                    "key",
                                    "areaname"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "9a876fae9e98e9a07ed9c457e8504d1f",
                                            "description": "新闻唯一ID"
                                        },
                                        "url": {
                                            "type": "string",
                                            "example": "http:\/\/hb.sina.com.cn\/news\/j\/2019-12-02\/detail-iihnzhfz3050537.shtml",
                                            "description": "新闻链接"
                                        },
                                        "ctime": {
                                            "type": "string",
                                            "example": "2019-12-02 10:51:00",
                                            "description": "新闻时间"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "大雾橙色预警！湖北多地现能见度小于200米的雾",
                                            "description": "新闻标题"
                                        },
                                        "picUrl": {
                                            "type": "string",
                                            "example": "http:\/\/n.sinaimg.cn\/hb\/87\/w574h313\/20191202\/00f9-ikcacer4044078.jpg",
                                            "description": "新闻配图"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "湖北天气",
                                            "description": "新闻来源"
                                        },
                                        "description": {
                                            "type": "string",
                                            "description": "新闻描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": "9a876fae9e98e9a07ed9c457e8504d1f",
                                                "url": "http:\/\/hb.sina.com.cn\/news\/zwzl\/2019-12-02\/detail-iihnzhfz3116800.shtml",
                                                "ctime": "2019-12-02 15:16:00",
                                                "title": "建始县公安局原党组副书记向绪燕被开除党籍和公职",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/hb\/transform\/20170901\/O0NN-fykpysa2405885.jpg",
                                                "source": "湖北省纪委监委网站",
                                                "description": ""
                                            },
                                            {
                                                "id": "c61ec74133a789fa2cfcdd29f45355b5",
                                                "url": "http:\/\/hb.sina.com.cn\/news\/zwzl\/2019-12-02\/detail-iihnzhfz3113678.shtml",
                                                "ctime": "2019-12-02 15:07:00",
                                                "title": "武汉地铁集团有限公司原党委书记周少东被双开",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/hb\/transform\/20171107\/1TUF-fynmzuk3918902.jpg",
                                                "source": "湖北省纪委监察厅网站",
                                                "description": ""
                                            },
                                            {
                                                "id": "686ea5d58a5fdb7e1ef1ab641210ae92",
                                                "url": "http:\/\/news.cnhan.com\/html\/yaowen\/20191202\/1048058.htm",
                                                "ctime": "2019-12-02 14:13:00",
                                                "title": "【中国稳健前行】把握党的领导制度体系丰富内涵",
                                                "picUrl": "",
                                                "source": "汉网",
                                                "description": ""
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}