Skip to content
tiktokapi.io

Free Developer Utility & API Playground

TikTok Video ID, User ID (secUid) & Metadata Finder.

Paste any TikTok video URL or @username below to extract its 19-digit aweme_id, numeric user_id, secUid, and ready-to-run API code.

Interactive TikTok ID & Metadata Extractor
Detected Resource Type
TikTok Video (aweme_id)
Extracted Video ID (aweme_id)
7231338487075638570
Target Gateway Route
GET /v1/videos/detail
Ready-to-Run cURL & Python Snippet10 Credits ($0.001)
# 1. cURL
curl -sS "https://api.tiktokapi.io/v1/videos/detail?url=https%3A%2F%2Fwww.tiktok.com%2F%40tiktok%2Fvideo%2F7231338487075638570&hd=1" \
  -H "x-api-key: tk_your_api_key"

# 2. Python
import requests
res = requests.get(
    "https://api.tiktokapi.io/v1/videos/detail",
    params={"url": "https://www.tiktok.com/@tiktok/video/7231338487075638570", "hd": 1},
    headers={"x-api-key": "tk_your_api_key"}
)
print(res.json()["data"])
Sample Gateway Response JSONHTTP 200 OK
{
  "code": 0,
  "provider": "https://tiktokapi.io",
  "status": "ok",
  "data": {
    "id": "7231338487075638570",
    "title": "take the stage #tiktok",
    "duration": 15,
    "hdplay": "https://v16.tokcdn.com/.../7231338487075638570_1080p.mp4",
    "play": "https://v16m.tiktokcdn-us.com/.../7231338487075638570_720p.mp4",
    "play_count": 1420500,
    "digg_count": 98400,
    "comment_count": 4310,
    "author": {
      "id": "107955",
      "unique_id": "tiktok",
      "nickname": "TikTok",
      "sec_uid": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM"
    },
    "music_info": {
      "id": "7231338505431288622",
      "title": "original sound - TikTok"
    }
  }
}

TikTok Identifier Reference Table

Several TikTok pagination endpoints require numeric IDs (user_id, hashtag_id, sound_id) rather than string handles. Here is how every TikTok identifier maps across endpoints:

IdentifierExample ValueHow to Resolve via APIDownstream Endpoints
Video ID (aweme_id)7231338487075638570URL path /@user/video/{id} or data.id from /v1/videos/detailGET /v1/videos/detail, GET /v1/videos/comments, GET /v1/videos/comments/replies
Numeric User ID (user_id / uid)107955data.user.id from GET /v1/users/profile?username=tiktokGET /v1/users/followers?user_id=107955, GET /v1/users/following?user_id=107955
Encrypted secUidMS4wLjABAAAAv7iSuuXDJGDv...data.user.secUid from GET /v1/users/profileCross-session creator tracking (remains stable even if @username changes)
Sound / Music ID (music_id)7231338505431288622data.music_info.id from /v1/videos/detail or /v1/sounds/infoGET /v1/sounds/videos?sound_id=7231338505431288622
Hashtag / Challenge ID (challenge_id)42164data.id from GET /v1/hashtags/info?hashtag=fypGET /v1/hashtags/videos?hashtag_id=42164

Frequently asked questions

How do I find a TikTok user's numeric user_id from their @username?
Call GET https://api.tiktokapi.io/v1/users/profile?username=tiktok with your x-api-key header. The response includes both the numeric data.user.id (required for /v1/users/followers and /v1/users/following) and data.user.secUid.
How do I extract the 19-digit video_id from a shortened vm.tiktok.com or vt.tiktok.com share link?
Pass the shortened URL directly to GET https://api.tiktokapi.io/v1/videos/detail?url=https://vm.tiktok.com/ZMr... — the gateway automatically resolves the redirect chain and returns the canonical 19-digit data.id along with the 1080p hdplay stream.
What is the difference between TikTok unique_id, user_id, and secUid?
unique_id is the mutable @handle (users can change it every 30 days). user_id is the immutable 64-bit integer assigned at registration, and secUid is ByteDance's signed identifier. For database primary keys, always store user_id or secUid.

Automate ID lookups at scale with 2,000 free Credits.

Sign up in 10 seconds to get your tk_... API key with 2,000 free Credits included.