{
    "openapi": "3.0.0",
    "info": {
        "title": "网页正文抓取 - API文档",
        "version": "1.0.0",
        "description": "该接口可支持实时抓取网页正文内容（包含图片等富媒体url）。由于网页结构复杂多变，建议对content字段进行非空判断。请注意：如网页url实际访问时跳转到了https等情况，请用跳转后的真实地址传参。禁止抓取违法违规内容，版权内容需获得对方授权。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/htmltext\/index": {
            "get": {
                "summary": "网页正文查询",
                "tags": [
                    "网页正文抓取"
                ],
                "description": "根据url返回抓取到的正文数据",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "url",
                        "in": "query",
                        "description": "网页地址",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "https:\/\/www.tianapi.com\/article\/131",
                            "description": "网页地址"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ctime": {
                                            "type": "Date",
                                            "example": "2011-08-20 23:54:41",
                                            "description": "网页时间"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "科尔透露追梦将于本周五归队",
                                            "description": "标题"
                                        },
                                        "content": {
                                            "type": "text",
                                            "example": "勇士主帅科尔在赛后接受采访时表示...",
                                            "description": "网页内容"
                                        },
                                        "picture": {
                                            "type": "string",
                                            "example": "https:\/\/www.sohu.com\/201903091552128845326601.png",
                                            "description": "网页中的第一张图片"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "ctime": "2020-03-26",
                                        "title": "天行机器人新增八项能力",
                                        "content": "天行机器人新增八项娱乐和知识问答能力，包括十万个为什么、中西药查询、早晚安一句话等。以上新增能力除了早晚安一句话外，都可以在天行数据控制台机器人设置中开启或关闭。",
                                        "picture": "https:\/\/static.tianapi.com\/article\/20200326\/06a8c53337c0a80fb57f380201f19aa5.png"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "网页正文查询",
                "tags": [
                    "网页正文抓取"
                ],
                "description": "根据url返回抓取到的正文数据",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "url": {
                                        "type": "string",
                                        "example": "https:\/\/www.tianapi.com\/article\/131",
                                        "description": "网页地址"
                                    }
                                },
                                "required": [
                                    "key",
                                    "url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ctime": {
                                            "type": "Date",
                                            "example": "2011-08-20 23:54:41",
                                            "description": "网页时间"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "科尔透露追梦将于本周五归队",
                                            "description": "标题"
                                        },
                                        "content": {
                                            "type": "text",
                                            "example": "勇士主帅科尔在赛后接受采访时表示...",
                                            "description": "网页内容"
                                        },
                                        "picture": {
                                            "type": "string",
                                            "example": "https:\/\/www.sohu.com\/201903091552128845326601.png",
                                            "description": "网页中的第一张图片"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "ctime": "2020-03-26",
                                        "title": "天行机器人新增八项能力",
                                        "content": "天行机器人新增八项娱乐和知识问答能力，包括十万个为什么、中西药查询、早晚安一句话等。以上新增能力除了早晚安一句话外，都可以在天行数据控制台机器人设置中开启或关闭。",
                                        "picture": "https:\/\/static.tianapi.com\/article\/20200326\/06a8c53337c0a80fb57f380201f19aa5.png"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}