{
    "openapi": "3.0.0",
    "info": {
        "title": "垃圾分类新闻 - API文档",
        "version": "1.0.0",
        "description": "垃圾分类新闻资讯接口（已合并至<a href=\"https:\/\/www.tianapi.com\/apiview\/168\">环保新闻<\/a>），关于垃圾分类查询、图像识别、语音识别和问答知识等请访问<a href=\"https:\/\/www.tianapi.com\/search\/%E5%9E%83%E5%9C%BE%E5%88%86%E7%B1%BB\">全部垃圾分类相关接口<\/a>。新闻类接口功能扩展，混合全频道数据使用<a href=\"\/apiview\/87\" target=\"_blank\">综合新闻<\/a>接口、按频道分类输出使用<a href=\"\/apiview\/51\" target=\"_blank\">分类新闻<\/a>接口。本接口仅限用于内部数据分析和机器学习，不得用于终端展示。（MCP 服务由 分类新闻 接口统一提供）"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/lajifenleinews\/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": "464ca70abb3271fef4343a5e7580b928",
                                                "url": "http:\/\/k.sina.com.cn\/article_1767961804_6960f4cc02000rr4l.html",
                                                "ctime": "2021-02-04 17:45",
                                                "title": "青云谱区：让垃圾分类习惯渗透到工作中（图）",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/sinakd202124s\/85\/w500h385\/20210204\/543b-kirmait9157267.png",
                                                "source": "垃圾分类新闻",
                                                "description": "对商铺进行宣传教育（危婧怡摄）对于商铺进行宣传教育（危婧怡摄）垃圾分类宣传进机关单位（危婧怡摄）　　大江网\/大江新闻客户端讯通讯员危婧怡报道：近日，青云"
                                            },
                                            {
                                                "id": "a9a7d0f470d5178ba2c5f44b9f5dc929",
                                                "url": "http:\/\/k.sina.cn\/article_1664221137_6331ffd102000tprq.html",
                                                "ctime": "2021-02-04 16:14",
                                                "title": "低碳时尚过新年垃圾分类进小区送新春祝福",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/sinakd20210204s\/764\/w500h264\/20210204\/bd70-kirmait8866171.jpg",
                                                "source": "垃圾分类新闻",
                                                "description": "新春即将来临,春节蕴含着深邃的文化内涵,象征着热闹喜庆,辞旧迎新,为了丰富社区居民文化生活需求,花溪街道联合左岸环境在红光社区理工雅苑小区举办“垃圾分类,时尚过"
                                            },
                                            {
                                                "id": "9bb9ee633f2f4223f3729efd4aba94d8",
                                                "url": "http:\/\/k.sina.cn\/article_1893892941_70e2834d02000xggk.html",
                                                "ctime": "2021-02-04 15:31",
                                                "title": "北京市统计局：近九成受访者满意2020年垃圾分类工作",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/sinakd202124s\/75\/w500h375\/20210204\/4efa-kirmait8327687.png",
                                                "source": "垃圾分类新闻",
                                                "description": "家里用上分类垃圾桶、小区设置定点投放点、减少塑料制品使用……2020年，生活在北京的市民都明显感受到了垃圾分类带来的点滴变化。截至目前，《北京市生活垃圾管理条例"
                                            }
                                        ],
                                        "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": "464ca70abb3271fef4343a5e7580b928",
                                                "url": "http:\/\/k.sina.com.cn\/article_1767961804_6960f4cc02000rr4l.html",
                                                "ctime": "2021-02-04 17:45",
                                                "title": "青云谱区：让垃圾分类习惯渗透到工作中（图）",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/sinakd202124s\/85\/w500h385\/20210204\/543b-kirmait9157267.png",
                                                "source": "垃圾分类新闻",
                                                "description": "对商铺进行宣传教育（危婧怡摄）对于商铺进行宣传教育（危婧怡摄）垃圾分类宣传进机关单位（危婧怡摄）　　大江网\/大江新闻客户端讯通讯员危婧怡报道：近日，青云"
                                            },
                                            {
                                                "id": "a9a7d0f470d5178ba2c5f44b9f5dc929",
                                                "url": "http:\/\/k.sina.cn\/article_1664221137_6331ffd102000tprq.html",
                                                "ctime": "2021-02-04 16:14",
                                                "title": "低碳时尚过新年垃圾分类进小区送新春祝福",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/sinakd20210204s\/764\/w500h264\/20210204\/bd70-kirmait8866171.jpg",
                                                "source": "垃圾分类新闻",
                                                "description": "新春即将来临,春节蕴含着深邃的文化内涵,象征着热闹喜庆,辞旧迎新,为了丰富社区居民文化生活需求,花溪街道联合左岸环境在红光社区理工雅苑小区举办“垃圾分类,时尚过"
                                            },
                                            {
                                                "id": "9bb9ee633f2f4223f3729efd4aba94d8",
                                                "url": "http:\/\/k.sina.cn\/article_1893892941_70e2834d02000xggk.html",
                                                "ctime": "2021-02-04 15:31",
                                                "title": "北京市统计局：近九成受访者满意2020年垃圾分类工作",
                                                "picUrl": "http:\/\/n.sinaimg.cn\/sinakd202124s\/75\/w500h375\/20210204\/4efa-kirmait8327687.png",
                                                "source": "垃圾分类新闻",
                                                "description": "家里用上分类垃圾桶、小区设置定点投放点、减少塑料制品使用……2020年，生活在北京的市民都明显感受到了垃圾分类带来的点滴变化。截至目前，《北京市生活垃圾管理条例"
                                            }
                                        ],
                                        "allnum": 500,
                                        "curpage": 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}