TikTok Username to user ID API

Turn a TikTok handle, a profile link or a sec_uid into the numeric user_id and the sec_uid of the account, together with username and url, for $0.56 per 1,000 calls.

  • It returns only the identifier fields user_id, sec_uid, username and url
  • It carries no profile data such as follower count or bio
  • Failed calls and empty results are not charged.

API health

24h health
Normal
  • Healthy / normal
  • Available
Normal

Last 24 hours

Last 30 days

  1. 1Request

    POST /api/v1/social
    {
      "platform": "tiktok",
      "action": "resolve_user",
      "params": {
        "username": "nasa"
      }
    }
  2. 2JSON response

    {
      "results": {
        "user_id": "",
        "username": "nasa",
        …
      }
    }
  3. 3Fields

    user_idusername
    nasa
  4. 4CSV

    tiktok-resolve_user-sample.csv user_id,sec_uid,username,url,platform

A request with username goes in, and one JSON object with only identifier fields comes back: user_id, sec_uid, username and url, listed as a field table and a CSV file.

What data you get

The table shows a real call for nasa, captured November 21, 2026 at 07:21 (UTC), that returned one object; gray bars mark removed personal information (••• in the CSV). Your own calls return these fields as listed in the field reference.

user_idsec_uidusernameurlplatform
nasahttps://www.tiktok.com/@nasatiktok

Use cases

  • Turn handles in a list into IDs

    Call once for each handle in a list and store user_id and sec_uid, so you do not have to look them up again.

  • Get the handle from a profile link

    Pass a profile link and read username to get the bare handle.

  • Turn a `sec_uid` back into a handle

    The username parameter also takes a sec_uid, and the returned username and url are the handle and profile link of that account.

  • Then read the account profile

    For follower counts and bio, pass username to profile.

Limits and gotchas

  • username is required: a handle (such as nasa, with or without @), the profile link https://www.tiktok.com/@<handle>, or the sec_uid of the account.
  • One call converts one account and returns one object.
  • The response has no follower count, following count or bio. To read profile data, use profile.

Pricing

You pay $0.000556 per call. One call reads one result. Failed calls and empty results are not charged.

CallsCost
10,000$5.56
100,000$55.56
1,000,000$555.56

Totals use the list price per call.

Code samples

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "tiktok",
  "action": "resolve_user",
  "params": {
    "username": "nasa"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

API reference

See the parameters, response fields, errors and billing for resolve_user, and copy the page or open it as Markdown for an AI assistant.

POST

AI prompt

#
Please help me write a data collection script with the EveryInfra TikTok Username to user ID endpoint (tiktok/resolve_user).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to tiktok and action to resolve_user, and put the parameters inside params.
- Required parameters:
  - username: A TikTok username such as nasa (a leading @ is removed), a profile link, or the account's sec_uid.
- Returns one object. Main fields: user_id, sec_uid, username, url.
- Example request body:
{
  "platform": "tiktok",
  "action": "resolve_user",
  "params": {
    "username": "nasa"
  }
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYestiktokPlatform identifier, fixed value.
actionbodystringYesresolve_userCapability identifier, fixed value.
usernamebody.paramsstringYes-A TikTok username such as nasa (a leading @ is removed), a profile link, or the account's sec_uid.

Response example

#
Captured November 21, 2026 at 07:21 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed. id, billing and quota differ on every call, so only their shape is shown.
json
{  "id": "req_…",  "platform": "tiktok",  "action": "resolve_user",  "results": {    "user_id": "•••",    "sec_uid": "•••",    "username": "nasa",    "url": "https://www.tiktok.com/@nasa",    "platform": "tiktok"  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Response fields

#

Business data is in results. The table lists the fields a record can contain. Values the platform does not show are never made up.

FieldMeaning
user_idUser's unique ID on the platform.
sec_uidKeeps the platform's own meaning
usernameUsername (@handle).
urlLink to the record on the platform.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

FAQ

What does the handle-to-ID API return?

One object: user_id, sec_uid, username and url.

Which endpoint reads follower counts and bio?

Use profile for the account profile, and followers when you only need the follower count. This endpoint only converts identifiers.

How much does it cost to convert one account?

It costs $0.000556 per call, or $0.56 per 1,000 calls. One call reads one result. Failed calls and empty results are not charged.

You can call the other TikTok endpoints with the same EveryInfra API key, for example profile.

Google Analytics needs consent. Privacy