# What is sec_uid on Douyin, and how is it different from uid and the Douyin ID?

sec_uid is the long ID starting with MS4wLjABAAAA in a Douyin profile link, which DataXAPI's account endpoints take. uid is the account's numeric ID, which the trend-index (巨量算数) endpoints take. The Douyin ID (抖音号) is the handle the user picks and can change. DataXAPI reads Douyin with 36 endpoints, from $0.0020 a call; a failed call is not charged.

## Three IDs of one account

A profile's web link is `https://www.douyin.com/user/<sec_uid>`. As public open-source tools describe it, `sec_uid` is the stable key of an author, and the Douyin ID, the field `unique_id`, is never used as a key because users can change it.

| ID | Looks like (made up) | In DataXAPI |
| --- | --- | --- |
| `sec_uid` | `MS4wLjABAAAAexampleexampleexample` | `id` of `douyin.users.get` and `douyin.users.videos.list`; returned as the account's `id` |
| `uid` | A string of digits | `id` of `douyin.index.creators.metrics` and `douyin.users.history`; `ext.uid` of a Xingtu creator |
| Douyin ID (抖音号) | Letters and digits the user picks | Returned as `username`; not taken as an input |

## How to go from one to another

With a profile link, give it to `douyin.users.get` as `url`: the answer's `id` is the `sec_uid`, and `username` is the Douyin ID. Where the user has picked none, `username` is the number Douyin assigned.

For a creator on Xingtu, `douyin.xingtu.creators.get` with one Xingtu creator ID returns all three: `account_id` is the `sec_uid`, `username` the Douyin ID, and `ext.uid` the numeric ID, in the full view. The Xingtu creator ID itself is a fourth number, not the Douyin account's.

## Endpoints

- [Douyin user profile](https://dataxapi.com/apis/douyin/users/get/) ($0.0020 / a call): Get a Douyin user's profile by account ID or profile link: name, handle, bio, follower, following and post counts, total likes, verification.
- [Douyin user videos](https://dataxapi.com/apis/douyin/users/videos/list/) ($0.0020 / a call): Get a page of the videos a Douyin account has posted, newest first: caption, engagement counts, time posted.
- [Douyin trend-index creator core metrics](https://dataxapi.com/apis/douyin/index/creators/metrics/) ($0.0020 / a call): Get a Douyin creator's core figures from the platform's own index tool, by the account's numeric ID: new likes, followers, shares and comments a day on average over the last week and the last month, each as a ratio against the period before. An account the tool has nothing on (every figure 0) is answered as not found.
- [Douyin Xingtu creator profile](https://dataxapi.com/apis/douyin/xingtu/creators/get/) ($0.0040 / a call): Get a Douyin creator's profile on Xingtu by Xingtu creator ID: name, location, content categories, followers; one ID also gives the Douyin account ID and handle, several IDs (up to 50) give what a video of each of two lengths costs and the views expected of one instead.

## Sources

What this page says of other services is from their own pages and documents, read on 2026-10-29. Prices and features change: check the source before you decide.

- [MediaCrawler (open-source project): reading a Douyin profile link](https://github.com/NanmiCoder/MediaCrawler/blob/main/media_platform/douyin/help.py#L141-L164)
- [Douyin_TikTok_Download_API (open-source project): FAQ and glossary](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/blob/main/documents/zh/17-faq.md)

## More about Douyin

- [Douyin API](https://dataxapi.com/apis/douyin/)
- [Douyin trend-index API](https://dataxapi.com/apis/douyin/index/)
- [Douyin Xingtu API](https://dataxapi.com/apis/douyin/xingtu/)
- [How do I export Douyin data?](https://dataxapi.com/answers/export-douyin-data/)
- [What are aweme_id and modal_id on Douyin, and what is a v.douyin.com link?](https://dataxapi.com/answers/douyin-aweme-id-modal-id/)
- [Is the Douyin search index a number of searches?](https://dataxapi.com/answers/douyin-search-index-vs-search-count/)
- [What is the Douyin keyword index (Ocean Engine)?](https://dataxapi.com/answers/what-is-douyin-keyword-index-ocean-engine/)
- [What is Douyin Xingtu?](https://dataxapi.com/answers/what-is-douyin-xingtu/)
- [How to get Douyin keyword trends in bulk](https://dataxapi.com/guides/douyin-keyword-trends/)
- [How to export Douyin video comments in bulk](https://dataxapi.com/guides/douyin-video-comments/)
- [How to look up a Douyin creator's Xingtu rate card](https://dataxapi.com/guides/douyin-xingtu-creator-rates/)

---

Catalog revision 5c3194deef3264cc. [HTML version](https://dataxapi.com/answers/douyin-sec-uid/)
