Start Me
API Stats
累计调用:202
网站截图 快照
GET|POST网页截图。输入网址,一键截图,生成高清网页截图,可自由调整截图尺寸,截取整个网页或高分屏效果。
接口地址:
https://api.qster.top/API/v2/webimage
接口示例:
https://api.qster.top/API/v2/webimage/?qskey=qstertop&type=image&url=https://example.com
请求参数
响应参数
参数 | 说明 |
---|---|
image_url | 图片链接 |
base64 | base64编码图片 |
code | 200正常400失败 查看更多 |
代码示例
自行调用测试
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qster.top/API/v2/webimage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => [
"type" => "默认返回image,可以选择url(图片链接)或者base64(图片编码)返回",
"url" => "网站链接",
"width" => "网站图片宽度,默认1280",
"height" => "网站图片高度,默认800",
"quality" => "图片质量,默认50(平常使用这图片质量够了),范围0-100",
"qskey" => "qstertop",
],
CURLOPT_HTTPHEADER => [
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
import requests
url = "https://api.qster.top/API/v2/webimage";
params = {
"type" : "默认返回image,可以选择url(图片链接)或者base64(图片编码)返回",
"url" : "网站链接",
"width" : "网站图片宽度,默认1280",
"height" : "网站图片高度,默认800",
"quality" : "图片质量,默认50(平常使用这图片质量够了),范围0-100",
"qskey" => "qstertop"
}
response = requests.get(url, params=params)
print(response.text)
function fetchData(url, params) {
const queryString = Object.keys(params)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
.join('&');
const fullUrl = `${url}?${queryString}`;
fetch(fullUrl)
.then(response => response.text())
.then(data => {
const resultElement = document.createElement('pre');
resultElement.textContent = data;
document.body.appendChild(resultElement);
})
.catch(error => console.error('Error fetching data:', error));
}
// 示例用法
const url = "https://api.qster.top/API/v2/webimage";
const params = {
"type" : "默认返回image,可以选择url(图片链接)或者base64(图片编码)返回",
"url" : "网站链接",
"width" : "网站图片宽度,默认1280",
"height" : "网站图片高度,默认800",
"quality" : "图片质量,默认50(平常使用这图片质量够了),范围0-100",
"qskey" => "qstertop"
};
fetchData(url, params);
在线调试
小小赞助支持
