{
    "openapi": "3.0.0",
    "info": {
        "title": "社会新闻 - API文档",
        "version": "1.0.0",
        "description": "社会新闻API接口服务，我们都在社会里，我们都是社会人。新闻类接口功能扩展，混合全频道数据使用<a href=\"\/apiview\/87\" target=\"_blank\">综合新闻<\/a>接口、按频道分类输出使用<a href=\"\/apiview\/51\" target=\"_blank\">分类新闻<\/a>接口。本接口仅限用于内部数据分析和机器学习，不得用于终端展示。（MCP 服务由 分类新闻 接口统一提供）"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/social\/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": "返回数量1-50，默认10",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 10,
                            "description": "返回数量1-50，默认10"
                        }
                    },
                    {
                        "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": "090004c010607836fac74c79e091c37e",
                                                "url": "https:\/\/news.china.com\/social\/1007\/20210204\/39260539.html",
                                                "ctime": "2021-02-04 15:44",
                                                "title": "沈阳此轮疫情首位确诊患者尹某某新冠肺炎治愈后去世",
                                                "picUrl": "https:\/\/img2.utuku.imgcdc.com\/300x200\/news\/20210204\/25107205-fe3c-4f04-8d92-594fbe6217ee.png",
                                                "source": "中华社会",
                                                "description": "中华社会"
                                            },
                                            {
                                                "id": "2b1af90322b89d87d56f143defcc03c7",
                                                "url": "https:\/\/news.china.com\/social\/1007\/20210204\/39260392.html",
                                                "ctime": "2021-02-04 15:12",
                                                "title": "苏敏的抉择：57岁，为自己活一回",
                                                "picUrl": "https:\/\/img3.utuku.imgcdc.com\/300x200\/news\/20210204\/90356eb4-566d-4591-9ee8-399141571968.jpg",
                                                "source": "中华社会",
                                                "description": "中华社会"
                                            },
                                            {
                                                "id": "66f71b5f822ba033a91b2a01811bdb3a",
                                                "url": "https:\/\/news.china.com\/social\/1007\/20210204\/39258616.html",
                                                "ctime": "2021-02-04 10:33",
                                                "title": "咳出血来才检测香港一老人感染新冠去世",
                                                "picUrl": "https:\/\/img1.utuku.imgcdc.com\/300x200\/news\/20210204\/e384e64b-683c-40f3-865e-430962b65aa8.jpg",
                                                "source": "中华社会",
                                                "description": "中华社会"
                                            }
                                        ],
                                        "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": "返回数量1-50，默认10"
                                    },
                                    "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": "090004c010607836fac74c79e091c37e",
                                                "url": "https:\/\/news.china.com\/social\/1007\/20210204\/39260539.html",
                                                "ctime": "2021-02-04 15:44",
                                                "title": "沈阳此轮疫情首位确诊患者尹某某新冠肺炎治愈后去世",
                                                "picUrl": "https:\/\/img2.utuku.imgcdc.com\/300x200\/news\/20210204\/25107205-fe3c-4f04-8d92-594fbe6217ee.png",
                                                "source": "中华社会",
                                                "description": "中华社会"
                                            },
                                            {
                                                "id": "2b1af90322b89d87d56f143defcc03c7",
                                                "url": "https:\/\/news.china.com\/social\/1007\/20210204\/39260392.html",
                                                "ctime": "2021-02-04 15:12",
                                                "title": "苏敏的抉择：57岁，为自己活一回",
                                                "picUrl": "https:\/\/img3.utuku.imgcdc.com\/300x200\/news\/20210204\/90356eb4-566d-4591-9ee8-399141571968.jpg",
                                                "source": "中华社会",
                                                "description": "中华社会"
                                            },
                                            {
                                                "id": "66f71b5f822ba033a91b2a01811bdb3a",
                                                "url": "https:\/\/news.china.com\/social\/1007\/20210204\/39258616.html",
                                                "ctime": "2021-02-04 10:33",
                                                "title": "咳出血来才检测香港一老人感染新冠去世",
                                                "picUrl": "https:\/\/img1.utuku.imgcdc.com\/300x200\/news\/20210204\/e384e64b-683c-40f3-865e-430962b65aa8.jpg",
                                                "source": "中华社会",
                                                "description": "中华社会"
                                            }
                                        ],
                                        "allnum": 500,
                                        "curpage": 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}