What is a Douyin sec_uid, and how do I get it?
A Douyin sec_uid is the long code starting `MS4wLjABAAAA` that identifies an account, in a profile's web link after `/user/`. To get it, copy it from that link, or give the profile call any profile link or share text, 2 credits, and read `id` in the answer. It is not the short Douyin number on a profile, and not a Xingtu creator ID.
Where to get it
| You have | What it looks like | How to get it |
|---|---|---|
| A profile's web link | https://www.douyin.com/user/MS4wLjABAAAAZ0aPDJzFhBrs0q3wVsp2a9WWrBuAUMsVyygoaO0bCw8 | Copy what follows /user/, up to any ? |
| A share link from the app | https://v.douyin.com/… | Give it to the call below; the answer's id is the sec_uid |
| Only a name | Search first with search and take the account from a result, or search Xingtu if you need its data |
Not to be confused with
| ID | What it is | Takes it |
|---|---|---|
| sec_uid | The long code starting MS4w. Every Douyin account has one | Account profile, account posts |
| Douyin number | The handle shown on a profile, which its owner can change | Not taken as an ID here; search for it |
| Xingtu creator ID | A string of digits on Xingtu, the platform's creator marketplace | The Xingtu interfaces |
One real request
curl https://api.socialtoai.com/v1/user_profile \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "douyin", "id": "MS4wLjABAAAAZ0aPDJzFhBrs0q3wVsp2a9WWrBuAUMsVyygoaO0bCw8" }'{ "request_id": "req_00000000-0000-4000-8000-000000000001", "schema_version": "v1", "fetched_at": "2026-10-12T19:01:22.000Z", "action": "user_profile", "platform": "douyin", "status": "ok", "items": [ { "platform": "douyin", "id": "…", "ref": "…", "approx": [], "type": "account", "username": "…", "name": "…", "url": "https://example.com/…", "bio": "…", "verified": true, "followers": 4022, "following": 115, "posts_count": 1094 } ], "unavailable": [], "warnings": [], "applied_params": { "id": "MS4wLjABAAAAZ0aPDJzFhBrs0q3wVsp2a9WWrBuAUMsVyygoaO0bCw8" }, "cost_credits": 2, "billing": { "cost_credits": 2, "balance_credits": 98, "today_spend_credits": 2, "daily_limit_credits": null, "daily_remaining_credits": null, "display": "This call: 2 credits (≈ $0.0067). Balance: 98 credits (≈ $0.33)." }, "replayed": false}FAQ
Why do all sec_uids start the same?
MS4wLjABAAAA is a fixed prefix of the format; what tells accounts apart comes after it. This is what we see in the IDs, not something Douyin documents.
Does it change?
It stays with the account as far as we have seen, unlike the Douyin number, which its owner can change. Keep it rather than the name.
Do I need to sign in to Douyin?
No. It uses no account of yours, so it cannot affect your account.
Douyin account profile APIThe whole call, every parameter and field.Douyin APIEvery call on Douyin and its credits.
Published: Last updated: