{
    "openapi": "3.0.0",
    "info": {
        "title": "获取网页信息 - API文档",
        "version": "1.0.0",
        "description": "该API接口可以获取网页头部meta等信息，包括网页标题title、描述description、关键词keywords、浏览模式renderer、接入端ip、favicon图片以及是否支持自适应（viewport=>1，支持）等。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/webinfo\/index": {
            "get": {
                "summary": "获取网页信息",
                "tags": [
                    "获取网页信息"
                ],
                "description": "查询指定URL网页TDK数据和兼容性",
                "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": {
                                        "ip": {
                                            "type": "string",
                                            "example": "125.37.206.219",
                                            "description": "接入端ip"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "天行数据TianAPI - 开发者API数据平台",
                                            "description": "网页标题"
                                        },
                                        "favicon": {
                                            "type": "string",
                                            "example": "https:\/\/www.tianapi.com\/favicon.ico",
                                            "description": "收藏夹图标"
                                        },
                                        "keywords": {
                                            "type": "string",
                                            "example": "天行数据、天行接口、txapi",
                                            "description": "网页关键词"
                                        },
                                        "renderer": {
                                            "type": "string",
                                            "example": "webkit",
                                            "description": "网页建议的浏览引擎"
                                        },
                                        "viewport": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "是否自适应，1为是"
                                        },
                                        "description": {
                                            "type": "string",
                                            "example": "天行数据TianAPI开发者API数据平台......",
                                            "description": "网页描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "ip": "125.37.206.219",
                                        "title": "天行数据TianAPI - 开发者API数据平台",
                                        "favicon": "https:\/\/www.tianapi.com\/favicon.ico",
                                        "keywords": "天行数据、天行接口、txapi",
                                        "renderer": "webkit",
                                        "viewport": 1,
                                        "description": "天行数据TianAPI开发者API数据平台，在这里您可以免费且轻松的调用各种API数据接口用于应用软件程序、移动App、Web网站、微信小程序开发等。"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "获取网页信息",
                "tags": [
                    "获取网页信息"
                ],
                "description": "查询指定URL网页TDK数据和兼容性",
                "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": {
                                        "ip": {
                                            "type": "string",
                                            "example": "125.37.206.219",
                                            "description": "接入端ip"
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "天行数据TianAPI - 开发者API数据平台",
                                            "description": "网页标题"
                                        },
                                        "favicon": {
                                            "type": "string",
                                            "example": "https:\/\/www.tianapi.com\/favicon.ico",
                                            "description": "收藏夹图标"
                                        },
                                        "keywords": {
                                            "type": "string",
                                            "example": "天行数据、天行接口、txapi",
                                            "description": "网页关键词"
                                        },
                                        "renderer": {
                                            "type": "string",
                                            "example": "webkit",
                                            "description": "网页建议的浏览引擎"
                                        },
                                        "viewport": {
                                            "type": "int",
                                            "example": 1,
                                            "description": "是否自适应，1为是"
                                        },
                                        "description": {
                                            "type": "string",
                                            "example": "天行数据TianAPI开发者API数据平台......",
                                            "description": "网页描述"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "ip": "125.37.206.219",
                                        "title": "天行数据TianAPI - 开发者API数据平台",
                                        "favicon": "https:\/\/www.tianapi.com\/favicon.ico",
                                        "keywords": "天行数据、天行接口、txapi",
                                        "renderer": "webkit",
                                        "viewport": 1,
                                        "description": "天行数据TianAPI开发者API数据平台，在这里您可以免费且轻松的调用各种API数据接口用于应用软件程序、移动App、Web网站、微信小程序开发等。"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}