What is the difference between uid and sec_uid on Douyin, and how do I convert one to the other?
uid is the numeric ID Douyin assigns to an account; sec_uid is a second, opaque ID (it starts with MS4wLjAB) that appears in profile URLs and that most Douyin endpoints expect. Douyin offers no public converter, so tools either read sec_uid from a profile link or convert a uid through a dedicated lookup. XTikAPI reads Douyin with 34 endpoints from $0.002 a call. A failed call is not charged, and a verified account gets $0.5 of trial balance.
Updated 2026-11-18
Which one you need
Profile pages, user video lists and most third-party tools key on sec_uid. Some older data, exports and Xingtu screens give you only the numeric uid. A few endpoints even ask for both.
Converting
douyin.accounts.uid_to_sec_uid turns a numeric uid (id) into its sec_uid. douyin.accounts.id_from_url reads the sec_uid out of a profile link (url). With the sec_uid you can call douyin.videos.list for the account's videos, and with the uid douyin.accounts.detail for the profile.
Why XTikAPI
- One API key for Douyin and every other supported platform, with the same JSON shape: data holds the result, meta says what was billed.
- A failed call or a timeout is not charged; the response says charged: false.
- X-Max-Price caps what one call may cost, and the same Idempotency-Key within 24 hours is never billed twice.
- Prepaid balance, no subscription. Balance never expires, and unused top-up money can be refunded within 14 days.