Douyin video API
One Douyin video by URL: title, description, plays, likes, author and stream URLs.
GET /v1/douyin/post2 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/douyin/post?url=https://www.douyin.com/video/7695208374396276006",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 2 credits{ "gid": "7695208374396276006", "title": "野生眉笔太适合新手了吧!轻松搞定根根分明的野生眉", "abstract": "野生眉笔太适合新手了吧!轻松搞定根根分明的野生眉 #防水防汗不晕染 #新手眉笔推荐", "publish_time": 1791680325, "play_count": 19, "digg_count": 0, "cover_image_url": "https://p26-sign.douyinpic.com/tos-cn-v-c9e10a/ocEyIDpfa6MEusI5goyqeAFOy32DObgADBoXJB~tplv-dy-resize-origshort-autoq-75:…", "media_user": { "id": 3097798745021440, "screen_name": "惠筱悠好物", "video_count": "0", "follower_count": "0", "no_display_pgc_icon": true, "avatar_url": "https://p3.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-i-0813c000-ce_oYAe5LS2AIt2fGBAgAlTPqAIDRIDfkogAAKfQa.jpeg?fro…" }, "video_model": "{\"status\":10,\"message\":\"success\",\"version\":3,\"video_id\":\"v02033g10000db5duhfog65grs1ipc3g\",\"enable_ssl\":true,\"video_dura…", "tag": 0, "is_vertical": true, "video_id": "v02033g10000db5duhfog65grs1ipc3g", "shouldMute": false, "url": "https://www.douyin.com/video/7695208374396276006"}Parameters
| Name | Type | Description |
|---|---|---|
urlquery · required | string | A video URL or id. Example: https://www.douyin.com/video/7695208374396276006. |
Response fields
200 with a DouyinVideo, in Douyin’s own JSON.
| Field | Type | Description |
|---|---|---|
gid | string | The video id (aweme id). |
title | string | |
abstract | string | |
publish_time | number | Unix seconds. |
play_count | number | string | |
digg_count | number | string | Likes. |
cover_image_url | string | |
media_user | object | |
video_model | string | Douyin’s player model (JSON string with stream URLs). |
url | string |
Status codes
| Status | Meaning |
|---|---|
200 | The video. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The video or creator does not exist. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Douyin is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Which links work?
douyin.com/video/<id>, share-page links and bare ids.
Douyin is a trademark of ByteDance. We are not affiliated with or endorsed by ByteDance.