网页截图
展示网页截图
接口介绍
请求方式:
GET返回格式:
IMG
接口地址:
http://api.szfx.top/shot/
请求示例:
https://api.szfx.top/shot/?type=json&url=https://www.baidu.com
请求参数
| 参数 | 参数值 | 必填 | 说明 |
|---|---|---|---|
| type | json | 否 | 返回json数据,为空时直接输出图片 |
| url | string | 是 | 需展示的网页链接 |
返回参数
| 名称 | 类型 | 说明 |
|---|---|---|
| code | string | 返回状态码 |
| url | string | 网页链接 |
| shot | string | 网页截图链接 |
返回示例
{
"code": 200,
"url": "https://www.baidu.com",
"shot": "https://s0.wp.com/mshots/v1/https://www.baidu.com?w=1800&h=12024"
}
代码示例
<img src="http://api.szfx.top/shot/?url=https://www.baidu.com" alt="百度">