Get TikTok User Info by Username

Give PrimeApi a TikTok handle and it returns the account behind it. A single call resolves the username into the full profile record: numeric ID, secUid, display name, avatar, bio text, verification flag, region and the follower, following, like and video totals. This is usually the first call in a workflow, since the secUid it returns is the identifier that the follower, following and post endpoints expect as input.

Try on Playground
PrimeApi Endpoints > User Endpoints > User Info by Username
Endpoint Info
Request Method
:
GET
Request URL
:
https://api.primeapi.co/userinfo-by-username?username={username}
Required Parameters
:
username
Request Examples
Request Flow
:
User Info by Username is a single GET call to /userinfo-by-username, and username has to travel with it in the query string. Swap YOUR_API_KEY for your own key and both snippets below run as they are.
Authentication
:
Header based. Send X-PrimeAPI-Key with every request — there is no OAuth handshake and no token to refresh.
Credits
:
One User Info by Username call costs 1 credit. Your remaining balance comes back on every response in the X-PrimeAPI-Balance header, so you can watch usage without a second lookup.
cURL
curl -X GET "https://api.primeapi.co/userinfo-by-username?username=taylorswift" \
  -H "X-PrimeAPI-Key: YOUR_API_KEY"
Python - Requests
import requests

url = "https://api.primeapi.co/userinfo-by-username?username=taylorswift"
headers = {"X-PrimeAPI-Key": "YOUR_API_KEY"}

response = requests.get(url, headers=headers)

print(response.json())
print("Credits left:", response.headers.get("X-PrimeAPI-Balance"))
Endpoint Response
Example URL
:
https://api.primeapi.co/userinfo-by-username?username=taylorswift
Content Type
:
JSON
Example Response
{
    "userInfo": {
        "user": {
            "id": "6881290705605477381",
            "shortId": "",
            "uniqueId": "taylorswift",
            "nickname": "Taylor Swift",
            "avatarLarger": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f8c7cad75f3a12205d31d6662d2555d5~c5_1080x1080.jpeg?lk3s=a5d48078&nonce=63171&refresh_token=43a1959878a3f0c05ff3c145542164b4&x-expires=1737158400&x-signature=wS4KruiXE1HMgfwG16cwIvLOrOg%3D&shp=a5d48078&shcp=81f88b70",
            "avatarMedium": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f8c7cad75f3a12205d31d6662d2555d5~c5_720x720.jpeg?lk3s=a5d48078&nonce=94219&refresh_token=ecf5bf6a35883b42418f2dce4437ae4d&x-expires=1737158400&x-signature=G6rkRczIup3Xp3EsRh1Gd4eVRbs%3D&shp=a5d48078&shcp=81f88b70",
            "avatarThumb": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f8c7cad75f3a12205d31d6662d2555d5~c5_100x100.jpeg?lk3s=a5d48078&nonce=10119&refresh_token=9610f8f701a49ab653be389180fea00b&x-expires=1737158400&x-signature=CtmLtNnrFWbzkLMohZ6ihwZWoA4%3D&shp=a5d48078&shcp=81f88b70",
            "signature": "This is pretty much just a cat account",
            "createTime": 1628514847,
            "verified": true,
            "secUid": "MS4wLjABAAAAqB08cUbXaDWqbD6MCga2RbGTuhfO2EsHayBYx08NDrN7IE3jQuRDNNN6YwyfH6_6",
            "ftc": false,
            "relation": 0,
            "openFavorite": true,
            "bioLink": {
                "link": "taylorswift.com",
                "risk": 0
            },
            "commentSetting": 0,
            "commerceUserInfo": {
                "commerceUser": false
            },
            "duetSetting": 0,
            "stitchSetting": 0,
            "privateAccount": false,
            "secret": false,
            "isADVirtual": false,
            "roomId": "",
            "uniqueIdModifyTime": 0,
            "ttSeller": false,
            "region": "US",
            "downloadSetting": 0,
            "profileTab": {
                "showMusicTab": true,
                "showQuestionTab": false,
                "showPlayListTab": false
            },
            "followingVisibility": 1,
            "recommendReason": "",
            "nowInvitationCardUrl": "",
            "nickNameModifyTime": 1629723423,
            "isEmbedBanned": false,
            "canExpPlaylist": true,
            "profileEmbedPermission": 1,
            "language": "en",
            "eventList": [],
            "suggestAccountBind": false,
  ... (truncated)
Contact
You can contact us via Telegram or Gmail
Telegram Logo
Telegram
@primeapi_co
Gmail Logo
Gmail
primeapico@gmail