How to Find a TikTok User ID (and What It's Used For)

Published Updated
TikTok has three different user identifiers: the numeric UID, the sec_uid string, and the API's open_id. Here is which one you need and how to get it.

TikTok uses more than one user identifier, which is the first thing to understand. There is a long numeric UID tied to the account permanently, a separate opaque sec_uid string that many internal endpoints require, and an open_id that TikTok's official API returns only for users who have authorised your app. They are not interchangeable.

This is why TikTok integrations go wrong more often than Instagram or YouTube ones. A developer finds "the TikTok user ID", passes it to something that wanted a different identifier, and gets an error that does not explain the mismatch. Sorting out which identifier you are holding is most of the work.

What are TikTok's three user identifiers?

Each exists for a different reason and lives in a different place.

IdentifierFormWhere it comes fromWhat it is for
Numeric UIDLong integer, commonly 19 digitsPublic profile dataStable identification of an account
sec_uidOpaque alphanumeric stringPublic profile dataRequired by many web and app endpoints
open_idOpaque string, app-scopedTikTok's official API, after OAuthIdentifying an authorised user within your app
union_idOpaque string, developer-scopedTikTok's official API, after OAuthSame user across your several apps

The numeric UID is the one people usually mean by "TikTok user ID". It is permanent, surviving username changes, and accounts created in recent years commonly have nineteen-digit UIDs. That length matters: nineteen digits is well past the safe integer range in JavaScript and past the range of a signed 64-bit integer in some contexts, so store it as a string or watch it silently lose its last digits.

The sec_uid is the one that surprises people. It is a long opaque string rather than a number, it cannot be derived or guessed from the username or from the numeric UID, and it has to be read from a profile lookup. Many endpoints that return a user's videos, followers or following list key on sec_uid and will not accept a bare handle or the numeric UID. Field naming varies by surface, appearing as secUid on the web, sec_uid in app contexts, and sometimes sec_user_id in request bodies, which adds to the confusion.

Does TikTok's official API give you another user's ID?

No, and this is the single most important thing to understand before planning a TikTok integration. It is also the point most tutorials skip.

TikTok's Display API endpoint at https://open.tiktokapis.com/v2/user/info/ returns information for a user who has authorised your application through OAuth, using that user's access token. It is not a directory lookup. You cannot pass it an arbitrary username and get back an ID. TikTok's own migration notice states that the user.info.basic scope retrieves only open_id, union_id, avatar_url, avatar_url_100, avatar_large_url and display_name, with fields such as follower count and bio requiring separate scopes like user.info.profile or user.info.stats.

Note also what open_id is: TikTok documents it as unique to the user within your current application. Two apps get two different open_id values for the same person. The union_id is persistent across apps belonging to the same developer, but not beyond that. Neither is a platform-wide public identifier, so neither is a substitute for the numeric UID when you need a stable global key.

The practical consequence: if your project needs identifiers for accounts that have not logged into your app, TikTok's official API is not the route. That is a design decision on TikTok's part, not a gap you can configure around. TikTok also notes a migration plan attached to these user info endpoints, so check the current documentation before building, since the field and scope picture has moved before and will again.

How do you find a TikTok numeric UID from a username?

Two realistic routes, given the API constraint above.

Read it from the public profile

Open the profile in a browser and inspect the page source. TikTok embeds profile data in the HTML in order to render the page, and both the numeric UID and the sec_uid appear there. Search the source for secUid or for a long numeric value near the username.

This works but treat it as a one-off technique rather than a workflow. TikTok's markup is minified and changes frequently, so a search pattern that works this month may find nothing next month. For a single stubborn account it is fine. For a list of two hundred creators it is not.

Resolve the public profile with a lookup

Paste the profile URL or @handle into the TikTok user ID finder and read the result. No login, no app registration, no OAuth flow. This handles the bulk case that the official API cannot: converting a list of public handles into stable identifiers.

The honest limit, as with every platform: public accounts only. A private TikTok account's identifiers are not publicly derivable, and a lookup that fails on one is behaving correctly. Any tool claiming to resolve private accounts is either guessing or operating outside the rules.

What is the TikTok UID actually used for?

Less for API calls than you might expect, given the constraints above, and more for identification and record-keeping.

Its primary value is as a stable key. TikTok usernames change often, more often than on most platforms, and a freed handle can be claimed by someone else. An agency tracking fifty creators with a spreadsheet keyed on handles will spend time every month reconciling renames. Keyed on numeric UIDs, it needs none.

For analytics, the UID is what lets you keep one creator's performance history as a single series rather than fragmenting it at every rename. For influencer marketing records, it is what proves two entries refer to the same person. For deduplication across data sources, it is the join key that handles do not reliably provide.

Where the sec_uid comes in is third-party data tooling. Services that return a creator's video list, followers or following generally require it, which is why many such tools ask for both identifiers and why storing both is sensible advice. Keep the UID for identification and the sec_uid for whatever calls need it.

What the UID is not for is content work. Saving a specific video starts from that video's URL rather than from an account identifier, and the TikTok video downloader takes the URL directly. If a link arrived in the shortened mobile form, resolve it with the TikTok web link converter first, since the short form hides the destination. For sharing, the TikTok URL shortener goes the other direction.

Why does TikTok use two public identifiers at once?

TikTok has not published a detailed explanation, so anything specific here would be speculation. What can be said is the observable behaviour: the numeric UID appears to serve as the account's permanent internal key, while the sec_uid behaves like a derived, non-guessable reference that endpoints require, which has the effect of making it hard to enumerate accounts by iterating through numbers.

That is a plausible reading rather than a documented rationale, and it is worth being clear about the difference. What matters operationally is the consequence: you cannot compute one identifier from the other. Both have to be obtained from a profile lookup, and if your pipeline needs both, obtain both in the same pass rather than planning to derive the second later.

How does TikTok compare to other platforms?

TikTok is the most awkward of the major platforms for identifier work, specifically because of the two-identifier split and because its official API deliberately does not support third-party lookups.

Instagram is cleaner. One numeric user ID, and Meta provides a documented Business Discovery endpoint that returns another public professional account's id, albeit with demanding permission requirements. See the Instagram user ID lookup for the detail.

YouTube is cleanest of all, because the /channel/UC... URL form contains the channel ID outright and the Data API has a documented filter for resolving a handle. The YouTube channel ID lookup covers the three-way split between channel ID, handle and custom URL.

Facebook sits in between: several legacy URL formats expose the ID directly, but the object model is messier, with profiles, Pages and groups sharing an indistinguishable numeric format. The Facebook ID finder handles all three.

Frequently asked questions

Can I get a TikTok user's ID through the official API?

Only for users who have authorised your app through OAuth, and what you get is an open_id scoped to your application rather than a public platform-wide ID. TikTok's user info endpoint is not a directory lookup, so you cannot pass it an arbitrary username. For public accounts that have not authorised your app, use a public profile lookup instead.

What is the difference between sec_uid and the numeric UID?

The numeric UID is a long integer, commonly nineteen digits, that permanently identifies the account. The sec_uid is an opaque alphanumeric string that many endpoints require instead, and it cannot be computed from the UID or the username. Store both, since they serve different purposes and neither substitutes for the other.

Does the TikTok UID change when a user changes their username?

No. The numeric UID stays with the account permanently, which is exactly why it is worth storing. TikTok usernames change relatively frequently and a freed handle can be claimed by someone else, so records keyed on handles can silently start pointing at the wrong person. Records keyed on UIDs do not.

Why does my TikTok UID lose its last digits in JavaScript?

Because nineteen digits exceeds the safe integer range, so a JSON parse returns a value that is close but wrong, without raising any error. The ID simply stops matching. Store the UID as a string throughout, compare it as a string, and use a string column in your database rather than an integer field.

Can I look up a private TikTok account's ID?

No. A private account's identifiers are not publicly derivable, and a lookup failing on one is correct behaviour rather than a defect. TikTok's official API will not help either, since it only returns identifiers for users who have authorised your app. Record private accounts as unresolvable rather than retrying them.

Do I need a user ID to download a TikTok video?

No, downloading works from the video URL and involves no account identifier at all. If the link arrived in TikTok's shortened mobile form, convert it to the full web URL first, because the short form hides its destination. The ID lookup and the download workflow are unrelated tasks that happen to involve the same platform.