API 文档
抓取大师 v3 接口:输入网页 / APP 分享链接,返回图片或视频地址数组。支持 Agent Skill 一键下载。
下载 Agent Skill
标准 SKILL.md,可供 AI Agent 加载后直接调用
基础信息
- 站点
https://url2pic.php127.com - API 根
https://url2pic.php127.com/api - 统一抓取
POST /api/v3/go - 任务中心
POST /api/v2/job-center/submitPOST /api/v2/job-center/list
鉴权
所有需登录接口须同时携带:
- 请求体签名
Sign:md5(JSON.stringify(body)).slice(0, 10) - 身份凭证(二选一):请求头
Key(API Key)或Token(登录 Token)
Content-Type: application/json Key: u2p5f582fxxxxxxxxxc49a50dbda Sign: 3a8ee6a1b2
API Key 可在会员中心「API Key」页面生成 / 重置。未携带或无效返回 code=10001 / 10002。
统一抓取入口 POST /api/v3/go
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 是 | 前端入口类型,见下表 |
urls | string | string[] | 是 | 一或多个链接,最多 10 个 |
type 取值
| type | 说明 | 适用链接 |
|---|---|---|
web | 通用网页图片提取 | 任意网页 |
mp-weixin | 微信公众号文章 | mp.weixin.qq.com/s/* |
douyin-image | 抖音图集 | douyin.com 分享链接 |
douyin-video | 抖音视频 | douyin.com 分享链接 |
kuaishou-image | 快手图集 | kuaishou.com 分享链接 |
kuaishou-video | 快手视频 | kuaishou.com 分享链接 |
xiaohongshu-image | 小红书图集 | xiaohongshu.com / xhslink.com |
xiaohongshu-video | 小红书视频 | xiaohongshu.com / xhslink.com |
doubao | 豆包 AI 生图分享页 | doubao.com/thread/* |
qianwen | 千问 AI 生图分享页 | qianwen.com/share/* |
后端按 URL 自动路由;APP 图集 / 视频由同一链接自动识别内容类型。
响应结构
{
"code": 1,
"msg": "success",
"data": {
"all_url": ["https://...", "https://..."],
"list": [
{
"id": 12345,
"type": "webpic.douyin",
"url": "https://v.douyin.com/xxxx",
"content_type": "image",
"list": ["https://...", "https://..."],
"media": {
"platform": "douyin",
"title": "标题",
"cover": "https://...",
"videos": [{ "url": "https://...", "quality": "1080p" }]
}
}
],
"errors": [],
"usage_count": 12
}
}all_url:全部资源地址(去重合并)list[].type:形如webpic.<subtype>,可作为任务中心打包 joblist[].list:该组资源地址;content_type为 image / videoerrors:逐条失败原因;usage_count:当前用户已用次数
调用示例
cURL
curl -X POST https://url2pic.php127.com/api/v3/go \
-H 'Content-Type: application/json' \
-H 'Key: YOUR_API_KEY' \
-H 'Sign: 3a8ee6a1b2' \
-d '{"type":"douyin-image","urls":"https://v.douyin.com/xxxx"}'Node.js
const body = JSON.stringify({ type: 'qianwen', urls: 'https://www.qianwen.com/share/chat/xxxx' });
const sign = require('crypto').createHash('md5').update(body).digest('hex').slice(0, 10);
const res = await fetch('https://url2pic.php127.com/api/v3/go', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Key: 'YOUR_API_KEY', Sign: sign },
body,
});
const json = await res.json();
const images = json.data.list.flatMap((g) => g.list);任务中心(打包下载)
通过 list[].type + list[].id 提交打包任务:
POST /api/v2/job-center/submit
{ "job": "webpic.douyin", "params": { "id": 12345 } }
// 通用图片打包
{ "job": "zip", "params": { "urls": ["https://..."] } }注意事项
- 链接需与 type 匹配,否则该条记入 errors。
- 单次最多 10 个链接。
- 图片地址可能经代理重写,直接使用返回地址即可下载。
- 豆包 / 千问抓取返回无水印原图。