远程网页快照,预防未知网站
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| url | string | 是 | 需要快照的网站,可以不需要带HTTP/HTTPS | https://api-v2.317ak.com/ |
| type | string | 否 | 以填写text/json/image,如果不写则默认json | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "url",
"type": "string",
"required": true,
"description": "需要快照的网站,可以不需要带HTTP/HTTPS",
"example": "https://api-v2.317ak.com/"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "以填写text/json/image,如果不写则默认json",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "网页快照",
"description": "远程网页快照,预防未知网站",
"version": "1.0.0"
},
"paths": {
"/api/zzgj/wzjt/api.php": {
"get": {
"summary": "网页快照",
"description": "远程网页快照,预防未知网站",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "https://api-v2.317ak.com/"
},
"description": "需要快照的网站,可以不需要带HTTP/HTTPS"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "以填写text/json/image,如果不写则默认json"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "网页快照",
"description": "远程网页快照,预防未知网站",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "https://api-v2.317ak.com/"
},
"description": "需要快照的网站,可以不需要带HTTP/HTTPS"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "以填写text/json/image,如果不写则默认json"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"图片链接": "https://api.317ak.com/api/zzgj/wzjt/data/505789a2dad6dc2b2b475f6f58d4fb7c.png",
"截图服务": "thum.io",
"图片格式": "image/png",
"截图模式": "PC端 1920px 整页长截图",
"时间戳": 1790718499
}
提供远程网页快照能力,用于生成网页内容的可视化快照。
适用于需要快速查看网页状态或保存网页画面的应用场景。
https://api-v2.317ak.com/api/zzgj/wzjt/api.php
支持 GET、POST 请求方式。
接口调用需要密钥鉴权,请在 Query 参数中传递密钥:
key=你的接口密钥
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| url | string | 是 | 需要快照的网站地址,可以不需要带 HTTP/HTTPS |
| type | string | 否 | 返回内容类型,可填写 text、json、image,不填写时默认使用 json |
{
"图片链接": "https://api.317ak.com/api/zzgj/wzjt/data/505789a2dad6dc2b2b475f6f58d4fb7c.png",
"截图服务": "thum.io",
"图片格式": "image/png",
"截图模式": "PC端 1920px 整页长截图",
"时间戳": 1790718499
}
| 字段 | 类型 | 说明 |
|---|---|---|
| 图片链接 | string | 网页快照生成后的图片访问地址 |
| 截图服务 | string | 提供快照生成服务的信息 |
| 图片格式 | string | 返回图片的格式类型 |
| 截图模式 | string | 快照生成时使用的页面截图模式说明 |
| 时间戳 | integer | 快照生成时间标识 |
{
"code": 0,
"msg": "未提供调用密钥",
"errcode": 11001
}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | ***地址无效 |
| 11015 | ***地址不允许 |
| 11016 | ***请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
curl -G "https://api-v2.317ak.com/api/zzgj/wzjt/api.php" \
--data-urlencode "key=你的接口密钥" \
--data-urlencode "url=https://api-v2.317ak.com/" \
--data-urlencode "type=json"
// PHP
url 参数为必填项,请填写需要生成快照的网页地址;可填写完整网址,也可省略 http:// 或 https:// 前缀。type 参数为可选项,可填写 text、json、image。未填写时接口默认返回 json 格式数据。curl \
-G \
"https://api-v2.317ak.com/api/zzgj/wzjt/api.php?key=YOUR_API_KEY" \
--data-urlencode "url=https://api-v2.317ak.com/" \
--data-urlencode "type=json"