LEAPERone Docs

Video Extract API

Reference for GET /v1/social-media/video/extract, including supported share URLs, extracted metadata, fixed pricing, and errors.

Extract video download information from social media share links, including multi-quality video streams, separate audio streams, cover images, and metadata.

Endpoint

GET https://api.leaper.one/v1/social-media/video/extract

Parameters

ParameterTypeRequiredDescription
urlstringYesVideo URL or share text containing a URL

The url parameter accepts either a direct video URL or raw share text copied from a platform. The API automatically extracts the URL from text.

Supported Platforms

PlatformURL PatternsparamNameVideo OutputAudio Output
Douyinv.douyin.com/*, *.douyin.com/*urlMulti-quality 1080p/720p/540pBackground music MP3
TikTok*.tiktok.com/*urlMulti-qualityBackground music MP3
Kuaishou*.kuaishou.com/*, *.gifshow.com/*urlMulti-qualityYes
Xiaohongshu*.xiaohongshu.com/*, xhslink.com/*share_textH.264/H.265
Instagram*.instagram.com/*post_urlMulti-resolution
Bilibilibilibili.com/video/BV*, b23.tv/*url (BV ID extracted)DASH multi-streamDASH separate
YouTubeyoutube.com/watch?v=*, youtu.be/*video_id (extracted)360p–4K, mp4/webmm4a/weba
Twitter/Xx.com/*/status/*, twitter.com/*tweet_id (extracted)Multi-bitrate MP4
Weiboweibo.com/*, weibo.cn/*id (extracted)720p/HD/LD
Xiguaixigua.com/*item_id (extracted)Yes
Pipixiapipix.com/*, pipixia.com/*cell_id (extracted)high/low

"—" means audio is embedded in the video file (audios is an empty array). Bilibili and YouTube use DASH format with separate audio/video streams — merge with ffmpeg after download.

Request

GET /v1/social-media/video/extract
curl -G "https://api.leaper.one/v1/social-media/video/extract" \
  --data-urlencode "url=https://v.douyin.com/L4FJNR3/" \
  -H "Authorization: Bearer sk-your-api-key"

Response Examples

Returns multi-quality video options and background music MP3.

Response
{
  "platform": "douyin",
  "data": {
    "platform": "douyin",
    "videoId": "6918273131559881997",
    "title": "骑白马的也可以是公主#百万转场变身",
    "author": "Real机智张",
    "authorId": "MS4wLjABAAAA...",
    "coverUrl": "https://p3-sign.douyinpic.com/...webp",
    "duration": 10,
    "videos": [
      { "url": "https://...mp4", "quality": "adapt_lowest_1080_1", "format": "mp4", "width": 1080, "height": 1920, "size": 3455733 },
      { "url": "https://...mp4", "quality": "adapt_lowest_720_1", "format": "mp4", "width": 720, "height": 1280, "size": 2205160 },
      { "url": "https://...mp4", "quality": "adapt_540_1", "format": "mp4", "width": 576, "height": 1024, "size": 1681820 }
    ],
    "audios": [
      { "url": "https://sf6-cdn-tos.douyinstatic.com/...mp3", "format": "mp3" }
    ]
  }
}

DASH format with separate video and audio streams. Use ffmpeg to merge.

Response
{
  "platform": "bilibili",
  "data": {
    "platform": "bilibili",
    "videoId": "BV1cAQqBqEpT",
    "title": "《万历黑诏书》第七十一话:帝王之术",
    "author": "虾仁耶YE",
    "authorId": "21741349",
    "coverUrl": "http://i1.hdslb.com/bfs/archive/...jpg",
    "duration": 545,
    "videos": [
      { "url": "https://...bilivideo.com/...mp4", "quality": "480p", "format": "mp4", "codec": "avc1.640033", "width": 852, "height": 480 }
    ],
    "audios": [
      { "url": "https://...bilivideo.com/...m4s", "format": "m4a", "codec": "mp4a.40.2" }
    ]
  }
}
Merge with ffmpeg
ffmpeg -i video.mp4 -i audio.m4a -c copy output.mp4

Returns 20+ video formats (360p to 4K) and multiple audio tracks.

Response
{
  "platform": "youtube",
  "data": {
    "platform": "youtube",
    "videoId": "dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up (Official Video)",
    "author": "Rick Astley",
    "authorId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "coverUrl": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/maxresdefault.webp",
    "duration": 213,
    "videos": [
      { "url": "https://...googlevideo.com/...", "quality": "360p", "format": "mp4", "codec": "avc1.42001E, mp4a.40.2", "width": 640, "height": 360, "size": 11829048 },
      { "url": "https://...googlevideo.com/...", "quality": "720p", "format": "mp4", "codec": "avc1.4d401f", "width": 1280, "height": 720 },
      { "url": "https://...googlevideo.com/...", "quality": "1080p", "format": "webm", "codec": "vp9", "width": 1920, "height": 1080 }
    ],
    "audios": [
      { "url": "https://...googlevideo.com/...", "format": "m4a", "codec": "mp4a.40.2", "size": 3449447 },
      { "url": "https://...googlevideo.com/...", "format": "weba", "codec": "opus", "size": 1231355 }
    ]
  }
}

YouTube 360p mp4 usually includes an audio track and can be played directly. Higher resolution streams are video-only — merge with an audio stream from audios.

Returns multi-quality video streams.

Response
{
  "platform": "kuaishou",
  "data": {
    "platform": "kuaishou",
    "videoId": "5229242270556079433",
    "title": "@爱笑岩❗️还在努力. #三道街 #爱笑岩 #爱笑岩安利挑战",
    "author": "捕风在努力",
    "authorId": "1152464658",
    "coverUrl": "https://p3.a.kwimgs.com/...jpg",
    "duration": 103,
    "videos": [
      { "url": "https://tymov2.a.kwimgs.com/...mp4", "format": "mp4" },
      { "url": "https://tymov2.a.kwimgs.com/...mp4", "format": "mp4" }
    ],
    "audios": []
  }
}

Test URLs

Copy these to test with the API directly:

PlatformTest URL
Douyinhttps://v.douyin.com/L4FJNR3/
TikTokhttps://www.tiktok.com/@bellapoarch/video/6862153058223197445
Kuaishouhttps://v.kuaishou.com/dEHKhN
Bilibilihttps://www.bilibili.com/video/BV1cAQqBqEpT/
YouTubehttps://www.youtube.com/watch?v=dQw4w9WgXcQ

Response Fields

FieldTypeDescription
platformstringDetected platform name
dataobject | nullNormalized video data. null when normalization fails
data.platformstringPlatform name
data.videoIdstringVideo ID on the platform
data.titlestringVideo title / description
data.authorstringAuthor display name
data.authorIdstringAuthor ID on the platform
data.coverUrlstringCover image URL
data.durationnumberDuration in seconds
data.videosMediaItem[]Available video download options
data.audiosMediaItem[]Available audio download options (empty array if embedded in video)
rawobjectRaw upstream response — only returned when normalization fails

MediaItem

FieldTypeDescription
urlstringDownload URL
qualitystring?Quality label: "1080p", "720p", "480p", etc.
formatstring?File format: "mp4", "webm", "m4a", "mp3", "weba"
codecstring?Codec: "avc1.640033", "mp4a.40.2", "opus", "vp9"
widthnumber?Video width in pixels
heightnumber?Video height in pixels
sizenumber?File size in bytes

Error Responses

Pricing

$0.01 per successful request (HTTP 2xx). Failed requests are not billed.

Notes

  • Video/audio URLs are time-limited (hours to days). Download promptly after retrieval.
  • Douyin and TikTok share a hybrid parser — one endpoint supports both.
  • Xiaohongshu supports full URLs and short links (xhslink.com).
  • duration is always in seconds.
  • When data is null, the raw field contains the unprocessed upstream response for debugging.