{
    "openapi": "3.0.0",
    "info": {
        "title": "文旅新闻 - API文档",
        "version": "1.0.0",
        "description": "出门在外，日常居家。了解国内外文化和旅游相关新闻资讯，天下事尽在掌握之中。新闻类接口功能扩展，混合全频道数据使用<a href=\"\/apiview\/87\" target=\"_blank\">综合新闻<\/a>接口、按频道分类输出使用<a href=\"\/apiview\/51\" target=\"_blank\">分类新闻<\/a>接口。本接口仅限用于内部数据分析和机器学习，不得用于终端展示。（MCP 服务由 分类新闻 接口统一提供）"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/travel\/index": {
            "get": {
                "summary": "查询新闻列表",
                "tags": [
                    "文旅新闻"
                ],
                "description": "默认返回10条最新资讯支持翻页和关键词搜索",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "返回数量",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 10,
                            "description": "返回数量"
                        }
                    },
                    {
                        "name": "form",
                        "in": "query",
                        "description": "兼容历史问题，建议传1",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 0,
                            "description": "兼容历史问题，建议传1"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "rand",
                        "in": "query",
                        "description": "随机获取",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 1,
                            "description": "随机获取"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "检索关键词",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "天行数据",
                            "description": "检索关键词"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "62ac899e8fcf654a74479b4239b4651f",
                                            "description": "新闻唯一ID"
                                        },
                                        "url": {
                                            "type": "string",
                                            "example": "https:\/\/www.tianapi.com\/article\/154",
                                            "description": "文章地址"
                                        },
                                        "ctime": {
                                            "type": "Date",
                                            "example": "2015-07-17",
                                            "description": "发布时间"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "文章的标题",
                                            "description": "文章标题"
                                        },
                                        "allnum": {
                                            "type": "int",
                                            "example": 625,
                                            "description": "结果数"
                                        },
                                        "picUrl": {
                                            "type": "string",
                                            "example": "https:\/\/www.tianapi.com\/static\/img\/logo.png",
                                            "description": "封面图片"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "文章来源",
                                            "description": "文章来源"
                                        },
                                        "curpage": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "当前页"
                                        },
                                        "description": {
                                            "type": "string",
                                            "example": "文章的描述",
                                            "description": "文章描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": "7f2699fe10d64f1d87ed4af23b91377a",
                                                "url": "http:\/\/travel.news.cn\/2020-12\/18\/c_1126878583.htm",
                                                "ctime": "2020-12-18 00:00",
                                                "title": "安徽升金湖投入资金逾亿元保护10万候鸟越冬地",
                                                "picUrl": "http:\/\/travel.news.cn\/titlepic\/112687\/1126878583_1608280276508_title0h.jpeg",
                                                "source": "旅游资讯",
                                                "description": "记者从升金湖国家级自然保护区管理处了解到，近年来，升金湖保护区生态效益补偿机制试点投入资金逾亿元，越冬候鸟增加到10万只，其中6种水鸟数量达到国际重要湿地标准。"
                                            },
                                            {
                                                "id": "148f2a79c3e34f822204dcad30e4a3bf",
                                                "url": "http:\/\/travel.news.cn\/2020-12\/18\/c_1126875748.htm",
                                                "ctime": "2020-12-18 00:00",
                                                "title": "我国国家全域旅游示范区已达168个",
                                                "picUrl": "http:\/\/travel.news.cn\/titlepic\/112687\/1126875748_1608253318292_title0h.jpg",
                                                "source": "旅游资讯",
                                                "description": "文化和旅游部17日正式对外发布第二批国家全域旅游示范区名单，包括重庆市渝中区、河北省秦皇岛市山海关区在内的97个单位入选，将对今后推进全域旅游、大众旅游发展产生积极示范作用。"
                                            },
                                            {
                                                "id": "a1e279440b712a13f82fa10d2aa00086",
                                                "url": "http:\/\/travel.news.cn\/2020-12\/18\/c_1126875949.htm",
                                                "ctime": "2020-12-18 00:00",
                                                "title": "雪后青海湖",
                                                "picUrl": "http:\/\/travel.news.cn\/titlepic\/112687\/1126875949_1608254677588_title0h.jpg",
                                                "source": "旅游资讯",
                                                "description": "12月17日拍摄的冰雪覆盖下的青海湖一角（无人机照片）。冬日时节，雪后的青海湖在冰雪装扮下宛如童话世界，冰雪覆盖的湖面如同破碎的玉带，形成独特的景观。"
                                            }
                                        ],
                                        "allnum": 500,
                                        "curpage": 1
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询新闻列表",
                "tags": [
                    "文旅新闻"
                ],
                "description": "默认返回10条最新资讯支持翻页和关键词搜索",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 10,
                                        "description": "返回数量"
                                    },
                                    "form": {
                                        "type": "int",
                                        "example": 0,
                                        "description": "兼容历史问题，建议传1"
                                    },
                                    "page": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "rand": {
                                        "type": "int",
                                        "example": 1,
                                        "description": "随机获取"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "天行数据",
                                        "description": "检索关键词"
                                    }
                                },
                                "required": [
                                    "key",
                                    "num"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "62ac899e8fcf654a74479b4239b4651f",
                                            "description": "新闻唯一ID"
                                        },
                                        "url": {
                                            "type": "string",
                                            "example": "https:\/\/www.tianapi.com\/article\/154",
                                            "description": "文章地址"
                                        },
                                        "ctime": {
                                            "type": "Date",
                                            "example": "2015-07-17",
                                            "description": "发布时间"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "文章的标题",
                                            "description": "文章标题"
                                        },
                                        "allnum": {
                                            "type": "int",
                                            "example": 625,
                                            "description": "结果数"
                                        },
                                        "picUrl": {
                                            "type": "string",
                                            "example": "https:\/\/www.tianapi.com\/static\/img\/logo.png",
                                            "description": "封面图片"
                                        },
                                        "source": {
                                            "type": "string",
                                            "example": "文章来源",
                                            "description": "文章来源"
                                        },
                                        "curpage": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "当前页"
                                        },
                                        "description": {
                                            "type": "string",
                                            "example": "文章的描述",
                                            "description": "文章描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": "7f2699fe10d64f1d87ed4af23b91377a",
                                                "url": "http:\/\/travel.news.cn\/2020-12\/18\/c_1126878583.htm",
                                                "ctime": "2020-12-18 00:00",
                                                "title": "安徽升金湖投入资金逾亿元保护10万候鸟越冬地",
                                                "picUrl": "http:\/\/travel.news.cn\/titlepic\/112687\/1126878583_1608280276508_title0h.jpeg",
                                                "source": "旅游资讯",
                                                "description": "记者从升金湖国家级自然保护区管理处了解到，近年来，升金湖保护区生态效益补偿机制试点投入资金逾亿元，越冬候鸟增加到10万只，其中6种水鸟数量达到国际重要湿地标准。"
                                            },
                                            {
                                                "id": "148f2a79c3e34f822204dcad30e4a3bf",
                                                "url": "http:\/\/travel.news.cn\/2020-12\/18\/c_1126875748.htm",
                                                "ctime": "2020-12-18 00:00",
                                                "title": "我国国家全域旅游示范区已达168个",
                                                "picUrl": "http:\/\/travel.news.cn\/titlepic\/112687\/1126875748_1608253318292_title0h.jpg",
                                                "source": "旅游资讯",
                                                "description": "文化和旅游部17日正式对外发布第二批国家全域旅游示范区名单，包括重庆市渝中区、河北省秦皇岛市山海关区在内的97个单位入选，将对今后推进全域旅游、大众旅游发展产生积极示范作用。"
                                            },
                                            {
                                                "id": "a1e279440b712a13f82fa10d2aa00086",
                                                "url": "http:\/\/travel.news.cn\/2020-12\/18\/c_1126875949.htm",
                                                "ctime": "2020-12-18 00:00",
                                                "title": "雪后青海湖",
                                                "picUrl": "http:\/\/travel.news.cn\/titlepic\/112687\/1126875949_1608254677588_title0h.jpg",
                                                "source": "旅游资讯",
                                                "description": "12月17日拍摄的冰雪覆盖下的青海湖一角（无人机照片）。冬日时节，雪后的青海湖在冰雪装扮下宛如童话世界，冰雪覆盖的湖面如同破碎的玉带，形成独特的景观。"
                                            }
                                        ],
                                        "allnum": 500,
                                        "curpage": 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}