Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

TikTok User ID by Username

Tài liệu API
https://api.sandbase.ai/v1/api/tiktok/app-v3/user-id-and-sec-user-id-by-username

Returns the user_id and sec_user_id associated with a specific TikTok username. Provide a profile username to resolve account identifiers.

Giá
$0.001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 0 tùy chọn

Phòng thử nghiệm

Đầu vào
Username
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

TikTok User ID by Username API

Returns the user_id and sec_user_id for a TikTok account. You send the profile username and get both identifiers back in a flat JSON object.

Use cases

  • Convert a TikTok handle into the numeric user_id for storage in a database.
  • Get the sec_user_id needed to call profile and video list endpoints for an account.
  • Keep a stable identifier for a creator in case you track them over time.
  • Check that a handle resolves to a real account before you run other lookups.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tiktok/app-v3/user-id-and-sec-user-id-by-username" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "tiktok"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
usernamestringYesUsername

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
  "user_id": "107955"
}

Response fields

FieldMeaning
user_idNumeric account ID for the username, returned as a string.
sec_user_idLong encoded account ID for the same user. Other TikTok user endpoints take this value as input.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.01 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON

Hướng dẫn:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API TikTok User ID by Username?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/tiktok/app-v3/user-id-and-sec-user-id-by-username với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API TikTok User ID by Username có giá bao nhiêu?

$0.001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API TikTok User ID by Username chấp nhận những tham số nào?

Bắt buộc: username (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API TikTok User ID by Username trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của TikTok không?

Không. TikTok User ID by Username chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của TikTok.