RESTful 接口说明 · 小程序对接域名 testsqy.ymxh-tech.cn
| 套餐 | 每日次数 | 限速 | 有效期 | 价格 | 说明 |
|---|---|---|---|---|---|
| 普通用户 (regular) | 100 次/天 | 正常 | 永久 | 免费 | 免费使用,每日100次解析 |
| 高级会员-1月 (premium_1m) | 不限 | 不限速 | 30 天 | ¥29.00 | 无限次解析,有效期1个月 |
| 高级会员-3月 (premium_3m) | 不限 | 不限速 | 90 天 | ¥79.00 | 无限次解析,有效期3个月 |
| 高级会员-6月 (premium_6m) | 不限 | 不限速 | 180 天 | ¥149.00 | 无限次解析,有效期6个月 |
| 高级会员-1年 (premium_1y) | 不限 | 不限速 | 365 天 | ¥259.00 | 无限次解析,有效期1年 |
配额可在管理后台自定义调整。超出配额返回 429 错误。
所有 API 请求必须携带 API Key(网页解析需先登录,使用 Session 鉴权)。
Header: X-API-Key: wm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 或 Query 参数: ?api_key=wm_xxxxxxxx
GET /api/v1/parse
解析分享链接,返回无水印视频/图片地址。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| url | string | 是 | 分享链接(URL 编码) |
| api_key | string | 否 | API Key(也可放在 Header) |
{
"code": 200,
"message": "解析成功",
"data": {
"platform": "douyin",
"platform_name": "抖音",
"type": "video",
"video": "https://.../video.mp4",
"cover": "https://.../cover.jpg",
"caption": "视频标题文案",
"author": {
"nickname": "作者昵称",
"avatar": "https://.../avatar.jpg"
}
},
"time": 1234567890
}
GET /api/v1/detect
检测分享链接所属的平台。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| url | string | 是 | 分享链接 |
GET /api/v1/platforms
获取当前支持的所有平台列表。
GET /api/v1/key/info
查询当前 API Key 的使用情况。
适用于自有小程序或「去水印」类产品,通过 HTTPS 调用本站 API 完成全平台去水印解析。
登录 微信公众平台,进入:
开发 → 开发管理 → 开发设置 → 服务器域名
将以下域名添加到小程序开发者后台(仅填写域名,不要带 https:// 或路径):
| 配置项 | 填写域名 | 用途 |
|---|---|---|
| request 合法域名 | testsqy.ymxh-tech.cn | 调用解析、检测等 API 接口 |
| downloadFile 合法域名 | testsqy.ymxh-tech.cn | 经本站代理下载视频/图片(使用 /api/media.php) |
wx.request 会被微信拦截。域名需已完成 ICP 备案并支持 HTTPS。
https://testsqy.ymxh-tech.cn/api/v1
所有接口均在此域名下访问,例如解析接口完整地址:
https://testsqy.ymxh-tech.cn/api/v1/parse
testsqy.ymxh-tech.cn 为合法域名wx.request 请求解析接口,展示无水印视频/图集以下为云函数或后端转发后的调用逻辑;Header 携带 X-API-Key:
// 小程序 pages/parse/parse.js
const API_BASE = 'https://testsqy.ymxh-tech.cn/api/v1';
const API_KEY = '你的API_Key'; // 建议放云函数环境变量
async function parseWatermark(shareUrl) {
return new Promise((resolve, reject) => {
wx.request({
url: `${API_BASE}/parse`,
method: 'GET',
header: {
'X-API-Key': API_KEY
},
data: { url: shareUrl },
success: (res) => {
if (res.data.code === 200) {
resolve(res.data.data);
} else {
reject(new Error(res.data.message));
}
},
fail: reject
});
});
}
// 云函数 cloudfunctions/parse/index.js
const cloud = require('wx-server-sdk');
cloud.init();
const API_KEY = process.env.WATERMARK_API_KEY;
exports.main = async (event) => {
const url = event.url;
const https = require('https');
const qs = new URLSearchParams({ url }).toString();
const apiUrl = `https://testsqy.ymxh-tech.cn/api/v1/parse?${qs}`;
return new Promise((resolve, reject) => {
https.get(apiUrl, { headers: { 'X-API-Key': API_KEY } }, (res) => {
let body = '';
res.on('data', chunk => body += chunk);
res.on('end', () => resolve(JSON.parse(body)));
}).on('error', reject);
});
};
| 接口 | 方法 | 说明 |
|---|---|---|
/api/v1/parse | GET / POST | 解析去水印(核心) |
/api/v1/detect | GET | 检测链接平台 |
/api/v1/platforms | GET | 支持平台列表 |
/api/v1/key/info | GET | 查询 Key 用量 |
/api/v1/logs | GET | 解析记录 |
testsqy.ymxh-tech.cn,与开发者后台一致https,不支持 HTTP 或 IP 直连429,可升级高级会员或购买「去水印」永久方案/api/media.php 注册媒体地址获取 token,再 GET /api/media.php?t=token 拉取(需配置 downloadFile 域名)GET /api/parse.php
首页在线解析使用此接口,需浏览器登录(Cookie Session),自动消耗账号配额。
$url = 'https://v.douyin.com/xxxxx/';
$apiKey = 'demo_key_1234567890abcdef';
$api = "https://testsqy.ymxh-tech.cn/api/v1/parse?url=" . urlencode($url) . "&api_key={$apiKey}";
$result = json_decode(file_get_contents($api), true);
print_r($result['data']);
const res = await fetch('https://testsqy.ymxh-tech.cn/api/v1/parse?url=' + encodeURIComponent(url), {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
const data = await res.json();
console.log(data.data.video);
console.log(data.data.cover);
console.log(data.data.caption);
import requests
r = requests.get('https://testsqy.ymxh-tech.cn/api/v1/parse', params={
'url': 'https://v.douyin.com/xxxxx/',
'api_key': 'demo_key_1234567890abcdef'
})
print(r.json()['data'])
curl -H "X-API-Key: demo_key_1234567890abcdef" \ "https://testsqy.ymxh-tech.cn/api/v1/parse?url=https://v.douyin.com/xxxxx/"
| code | 说明 |
|---|---|
| 200 | 成功 |
| 400 | 参数错误 |
| 401 | API Key 无效 |
| 429 | 请求频率超限 |
| 500 | 解析失败 |