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

鉴权

所有需登录接口须同时携带:

  1. 请求体签名 Signmd5(JSON.stringify(body)).slice(0, 10)
  2. 身份凭证(二选一):请求头 Key(API Key)或 Token(登录 Token)
Content-Type: application/json
Key: u2p5f582fxxxxxxxxxc49a50dbda
Sign: 3a8ee6a1b2

API Key 可在会员中心「API Key」页面生成 / 重置。未携带或无效返回 code=10001 / 10002。

统一抓取入口 POST /api/v3/go

请求体

字段类型必填说明
typestring前端入口类型,见下表
urlsstring | 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>,可作为任务中心打包 job
  • list[].list:该组资源地址;content_type 为 image / video
  • errors:逐条失败原因;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 个链接。
  • 图片地址可能经代理重写,直接使用返回地址即可下载。
  • 豆包 / 千问抓取返回无水印原图。