{
    "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": {
        "\/petnews\/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": "0f6c3e7827c44b107b8064dd36ea2e08",
                                                "url": "https:\/\/k.sina.com.cn\/article_6381647155_17c60353300101d5md.html",
                                                "ctime": "2022-04-22 16:35",
                                                "title": "爸爸说敢养宠物就搬出去，女孩冒险带回一只猫，结果自己没地位了",
                                                "picUrl": "https:\/\/n.sinaimg.cn\/sinakd20220422ac\/40\/w480h360\/20220422\/ecb6-68e76539cbbf40a81d4bcdeec168e3c2.jpg",
                                                "source": "新浪宠物",
                                                "description": "有的没有养宠物的人会特别讨厌这些小动物，然后要是自己的家人想要养宠物的，他们就会变得很生气，可是如果..."
                                            },
                                            {
                                                "id": "afd8371d851233036581c5f7fda50d7f",
                                                "url": "https:\/\/k.sina.com.cn\/article_6348919861_17a6cd435001019dts.html",
                                                "ctime": "2022-04-22 16:35",
                                                "title": "男子带回蜥蜴当宠物，众人看后不敢靠近，男子一句话众人无语了",
                                                "picUrl": "https:\/\/n.sinaimg.cn\/sinakd20220422ac\/40\/w480h360\/20220422\/d303-2b40f71637f16ddd5643698ada95234a.jpg",
                                                "source": "新浪宠物",
                                                "description": "现在很多人家里都比较喜欢养一些宠物，其中比较多的可能就是猫狗了吧，可是有些人并不喜欢这种比较平常的动..."
                                            },
                                            {
                                                "id": "9b53b4b45982393fd7849bdf7f55cad9",
                                                "url": "https:\/\/finance.sina.com.cn\/stock\/newstock\/zrzdt\/2022-04-22\/doc-imcwipii5836208.shtml",
                                                "ctime": "2021-04-22 16:35",
                                                "title": "源飞宠物境外收入占9成，与中宠股份关联交易，披露数据差异大",
                                                "picUrl": "https:\/\/n.sinaimg.cn\/spider20220422\/294\/w640h454\/20220422\/6ba3-3b4ab1485a56d29433484e301d85b9b9.png",
                                                "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": "0f6c3e7827c44b107b8064dd36ea2e08",
                                                "url": "https:\/\/k.sina.com.cn\/article_6381647155_17c60353300101d5md.html",
                                                "ctime": "2022-04-22 16:35",
                                                "title": "爸爸说敢养宠物就搬出去，女孩冒险带回一只猫，结果自己没地位了",
                                                "picUrl": "https:\/\/n.sinaimg.cn\/sinakd20220422ac\/40\/w480h360\/20220422\/ecb6-68e76539cbbf40a81d4bcdeec168e3c2.jpg",
                                                "source": "新浪宠物",
                                                "description": "有的没有养宠物的人会特别讨厌这些小动物，然后要是自己的家人想要养宠物的，他们就会变得很生气，可是如果..."
                                            },
                                            {
                                                "id": "afd8371d851233036581c5f7fda50d7f",
                                                "url": "https:\/\/k.sina.com.cn\/article_6348919861_17a6cd435001019dts.html",
                                                "ctime": "2022-04-22 16:35",
                                                "title": "男子带回蜥蜴当宠物，众人看后不敢靠近，男子一句话众人无语了",
                                                "picUrl": "https:\/\/n.sinaimg.cn\/sinakd20220422ac\/40\/w480h360\/20220422\/d303-2b40f71637f16ddd5643698ada95234a.jpg",
                                                "source": "新浪宠物",
                                                "description": "现在很多人家里都比较喜欢养一些宠物，其中比较多的可能就是猫狗了吧，可是有些人并不喜欢这种比较平常的动..."
                                            },
                                            {
                                                "id": "9b53b4b45982393fd7849bdf7f55cad9",
                                                "url": "https:\/\/finance.sina.com.cn\/stock\/newstock\/zrzdt\/2022-04-22\/doc-imcwipii5836208.shtml",
                                                "ctime": "2021-04-22 16:35",
                                                "title": "源飞宠物境外收入占9成，与中宠股份关联交易，披露数据差异大",
                                                "picUrl": "https:\/\/n.sinaimg.cn\/spider20220422\/294\/w640h454\/20220422\/6ba3-3b4ab1485a56d29433484e301d85b9b9.png",
                                                "source": "新浪宠物",
                                                "description": "伴随着独自生活的人群增多，“吸猫”“撸狗”的新生活方式正逐渐盛行。为宠“氪金”催生了宠物经济的火..."
                                            }
                                        ],
                                        "allnum": 500,
                                        "curpage": 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}