{
    "openapi": "3.0.0",
    "info": {
        "title": "抽取网页图片 - API文档",
        "version": "1.0.0",
        "description": "该接口可以抽取网页中任何图片，并支持指定的图片格式。默认抽取全部格式的图片，如只抽取网页中的png图片，则传递参数format=>'png'即可。注意：有些网页内容的url地址是http开头的，但实际访问时会跳转到https，请用跳转后的真实地址传参。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/htmlpic\/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": "URL地址，支持http\/https",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "https:\/\/www.tianapi.com\/article\/62",
                            "description": "URL地址，支持http\/https"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "description": "图片格式，如png",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "png",
                            "description": "图片格式，如png"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "picUrl": {
                                            "type": "string",
                                            "example": "https:\/\/static.tianapi.com\/article\/20201130\/154-1.jpg",
                                            "description": "图片地址"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20201130\/154-1.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20200524\/e9ae5caaf3bd674889a27a19fdb818a4.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20170604\/62-9.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20201130\/154-4.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20220518\/20220518140439.jpg"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "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\/62",
                                        "description": "URL地址，支持http\/https"
                                    },
                                    "format": {
                                        "type": "string",
                                        "example": "png",
                                        "description": "图片格式，如png"
                                    }
                                },
                                "required": [
                                    "key",
                                    "url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "picUrl": {
                                            "type": "string",
                                            "example": "https:\/\/static.tianapi.com\/article\/20201130\/154-1.jpg",
                                            "description": "图片地址"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20201130\/154-1.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20200524\/e9ae5caaf3bd674889a27a19fdb818a4.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20170604\/62-9.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20201130\/154-4.jpg"
                                            },
                                            {
                                                "picUrl": "https:\/\/static.tianapi.com\/article\/20220518\/20220518140439.jpg"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}