Douyin API
15 endpoints for accounts, posts and the hot list.
Every Douyin endpoint, by group. Each is a GET under /v1/douyin.
Quick Reference
| Property | Value |
|---|---|
| Base path | /v1/douyin |
| Endpoints | 15 |
| Credits | See Below |
| Guide | Douyin |
Accounts
GETProfile
/v1/douyin/profileAn account with its followers, likes and post count.2 creditsGETProfile Playlists/v1/douyin/profile/playlistsAn account's series (合集).1 creditGETProfile Posts/v1/douyin/profile/postsAn account's latest posts, about 10.2 creditsGETLive/v1/douyin/liveA live room, on air or not.1 creditPosts
GETPlaylist Posts
/v1/douyin/playlist/postsA series' posts, in order, 10 a page.1 creditGETPost/v1/douyin/postOne post with its likes, comments, shares and saves.2 creditsGETPost Comments/v1/douyin/post/commentsA post's comments, 20 a page.1 creditGETPost Comment Replies/v1/douyin/post/comment/repliesA comment's replies, up to 50.1 creditGETPost Related/v1/douyin/post/relatedPosts like a post, 10.1 creditDiscovery
GETHashtag
/v1/douyin/hashtagA hashtag with its views.1 creditGETSearch Suggestions/v1/douyin/search/suggestionsWhat Douyin's search box suggests for a query.1 creditGETSound/v1/douyin/soundA sound with the number of posts using it.1 creditGETSound Posts/v1/douyin/sound/postsPosts using a sound.1 creditGETTrending/v1/douyin/trendingDouyin's hot search list, about 50.10 creditsGETTrending Posts/v1/douyin/trending/postsRecommended posts, 10, or a category's.1 creditExample Request
Every Douyin endpoint is called this way: its path, and what to read as query parameters.
import { SocialAPI } from "@socialapihq/sdk";
const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });
const { data } = await client.douyin.profile({ secUid: "MS4wLjABAAAA8U_l6rBzmy7bcy6xOJel4v0RzoR_wfAubGPeJimN__4" });{
"data": {
"id": "104255897823",
"username": "rmrbxmt",
"displayName": "人民日报",
"bio": "参与、沟通、记录时代。",
"avatarUrl": "https://p3-pc.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_21b4383e542b8991bcd33d33eeda7d8d.jpeg?from=2956013662",
"url": "https://www.douyin.com/user/MS4wLjABAAAA8U_l6rBzmy7bcy6xOJel4v0RzoR_wfAubGPeJimN__4",
"verified": true,
"private": false,
"followers": 203912912,
"following": 35,
"likes": 19445869999,
"posts": 12986,
"externalUrl": null,
"createdAt": null,
"ext": {
"secUid": "MS4wLjABAAAA8U_l6rBzmy7bcy6xOJel4v0RzoR_wfAubGPeJimN__4",
"shortId": null,
"verification": "人民日报官方账号",
"ipLocation": null,
"live": false,
"series": 0,
"coverUrl": "https://p3-pc-sign.douyinpic.com/obj/douyin-user-image-file/a0fed342d45f11ee57830326fa8bb1b1?lk3s=93de098e&x-expires=1795971600&x-signature=BQcW6nFUv7nzrCmTA6wyIHE29%2BM%3D&from=2480802190"
}
}
}Errors
A call that fails costs nothing. See Errors for every code.