# How do I convert a Douyin sec_uid to a uid, and back? (2026)

1 call does it: give douyin.users.get the sec_uid as id and add view=full, and ext.uid in the answer is the numeric uid, at $0.0020. A profile link works as url too. Going back from a uid takes 2 calls, and works where douyin.users.history has data for that account. DataXAPI reads Douyin with 36 endpoints, from $0.0020 a call; a failed call is not charged.

Updated 2026-11-04

## From a sec_uid to a uid

Call `https://api.dataxapi.com/v1/douyin/users/get` with `id` set to the `sec_uid` and `view=full`. The uid is at `data.item.ext.uid`, which needs `view=full`: without it there is no `ext`. Do not take `username` for it: that is the Douyin handle (抖音号), and it is often digits too.

## From a uid back to a sec_uid

`douyin.users.history` with `id` set to the uid answers with `url`, the account's profile link. Pass that link to `douyin.users.get` as `url`, and `data.item.id` is the `sec_uid`. That is $0.0020 and $0.0020, $0.004 in all. Accounts with very few followers have no such data: when tried, a few hundred followers failed and over thirty thousand worked, and retrying does not help.

## Which endpoint wants which

They are two IDs of one account, and an endpoint refuses the other kind.

| ID | Looks like | Taken by |
| --- | --- | --- |
| `sec_uid` | A long string starting with `MS4w` | `douyin.users.get` and `douyin.users.videos.list`, as `id`. `douyin.users.search` gives it from a name |
| `uid` | A string of digits | `douyin.users.history` and `douyin.index.creators.metrics`, as `id` |

## What a batch comes to

The uid for 200 accounts is 200 calls at $0.0020, $0.40. Their 7-day history adds 200 at $0.0020, $0.40, so $0.80. A failed call is not charged.

## 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 creator engagement and follower trends](https://dataxapi.com/apis/douyin/users/history/) ($0.0020 / a call): Get how a Douyin account's numbers moved over the last 7 or 30 days, by its numeric ID, from the platform's own index tool: net new followers, new likes, comments, shares and posts, each as a ratio against the period before, and the totals now; up to five accounts in one request. It is one period's sum, not a day-by-day series.
- [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 user search](https://dataxapi.com/apis/douyin/users/search/) ($0.0020 / a call): Search Douyin accounts by terms, a page at a time: account ID, display name, avatar, follower count, post count, total likes.

## More about Douyin

- [Douyin API](https://dataxapi.com/apis/douyin/)
- [Douyin trend-index API](https://dataxapi.com/apis/douyin/index/)
- [How do I export Douyin data?](https://dataxapi.com/answers/export-douyin-data/)
- [What is sec_uid on Douyin, and how is it different from uid and the Douyin ID?](https://dataxapi.com/answers/douyin-sec-uid/)
- [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/)
- [Can Douyin's open platform read other people's videos and comments? (2026)](https://dataxapi.com/answers/douyin-open-platform-api/)
- [How do I check a keyword's heat on Douyin and Xiaohongshu before advertising? (2026)](https://dataxapi.com/answers/douyin-xiaohongshu-keyword-heat/)
- [How do I export all of a Douyin creator's video data? (2026)](https://dataxapi.com/answers/export-douyin-creator-videos/)
- [How do I export Douyin comments in bulk to find what users want? (2026)](https://dataxapi.com/answers/export-douyin-comments-user-needs/)
- [How do I find Douyin videos that took off from small accounts, and can I pull them in bulk? (2026)](https://dataxapi.com/answers/douyin-low-fan-viral-videos/)
- [What are a_bogus and X-Bogus on Douyin? (2026)](https://dataxapi.com/answers/douyin-a-bogus-x-bogus/)
- [What is msToken on Douyin? (2026)](https://dataxapi.com/answers/douyin-mstoken/)
- [Which Douyin API should I use for search, accounts and comments? (2026)](https://dataxapi.com/answers/which-douyin-api-to-use/)
- [How do I pull Douyin's hot-topic data by program? (2026)](https://dataxapi.com/answers/douyin-hot-topics-by-program/)
- [How do I use AI to audit and review an account? (2026)](https://dataxapi.com/answers/ai-account-audit-and-review/)
- [How do I filter Xingtu creators in bulk and see their rates? (2026)](https://dataxapi.com/answers/douyin-xingtu-creators-bulk-filter/)
- [What is ttwid on Douyin? (2026)](https://dataxapi.com/answers/douyin-ttwid/)
- [What are verifyFp and s_v_web_id on Douyin? (2026)](https://dataxapi.com/answers/douyin-verifyfp-s-v-web-id/)
- [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 bf04cdef3b75e745. [HTML version](https://dataxapi.com/answers/douyin-sec-uid-to-uid/)
