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/extractParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Video 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
| Platform | URL Patterns | paramName | Video Output | Audio Output |
|---|---|---|---|---|
| Douyin | v.douyin.com/*, *.douyin.com/* | url | Multi-quality 1080p/720p/540p | Background music MP3 |
| TikTok | *.tiktok.com/* | url | Multi-quality | Background music MP3 |
| Kuaishou | *.kuaishou.com/*, *.gifshow.com/* | url | Multi-quality | Yes |
| Xiaohongshu | *.xiaohongshu.com/*, xhslink.com/* | share_text | H.264/H.265 | — |
*.instagram.com/* | post_url | Multi-resolution | — | |
| Bilibili | bilibili.com/video/BV*, b23.tv/* | url (BV ID extracted) | DASH multi-stream | DASH separate |
| YouTube | youtube.com/watch?v=*, youtu.be/* | video_id (extracted) | 360p–4K, mp4/webm | m4a/weba |
| Twitter/X | x.com/*/status/*, twitter.com/* | tweet_id (extracted) | Multi-bitrate MP4 | — |
weibo.com/*, weibo.cn/* | id (extracted) | 720p/HD/LD | — | |
| Xigua | ixigua.com/* | item_id (extracted) | Yes | — |
| Pipixia | pipix.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
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.
{
"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.
{
"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" }
]
}
}ffmpeg -i video.mp4 -i audio.m4a -c copy output.mp4Returns 20+ video formats (360p to 4K) and multiple audio tracks.
{
"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.
{
"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:
| Platform | Test URL |
|---|---|
| Douyin | https://v.douyin.com/L4FJNR3/ |
| TikTok | https://www.tiktok.com/@bellapoarch/video/6862153058223197445 |
| Kuaishou | https://v.kuaishou.com/dEHKhN |
| Bilibili | https://www.bilibili.com/video/BV1cAQqBqEpT/ |
| YouTube | https://www.youtube.com/watch?v=dQw4w9WgXcQ |
Response Fields
| Field | Type | Description |
|---|---|---|
platform | string | Detected platform name |
data | object | null | Normalized video data. null when normalization fails |
data.platform | string | Platform name |
data.videoId | string | Video ID on the platform |
data.title | string | Video title / description |
data.author | string | Author display name |
data.authorId | string | Author ID on the platform |
data.coverUrl | string | Cover image URL |
data.duration | number | Duration in seconds |
data.videos | MediaItem[] | Available video download options |
data.audios | MediaItem[] | Available audio download options (empty array if embedded in video) |
raw | object | Raw upstream response — only returned when normalization fails |
MediaItem
| Field | Type | Description |
|---|---|---|
url | string | Download URL |
quality | string? | Quality label: "1080p", "720p", "480p", etc. |
format | string? | File format: "mp4", "webm", "m4a", "mp3", "weba" |
codec | string? | Codec: "avc1.640033", "mp4a.40.2", "opus", "vp9" |
width | number? | Video width in pixels |
height | number? | Video height in pixels |
size | number? | 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). durationis always in seconds.- When
dataisnull, therawfield contains the unprocessed upstream response for debugging.