urlstringwymagane
User homepage link
https://api.sandbase.ai/v1/api/tiktok/web/sec-user-idReturns the internal TikTok sec_user_id string for a specified user homepage URL. This identifier serves as a key parameter for downstream TikTok web endpoints.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Returns the sec_user_id string for a TikTok user. You send the full profile homepage link in url, for example https://www.tiktok.com/@tiktok.
sec_user_id that other TikTok web endpoints ask for.curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/sec-user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.tiktok.com/@tiktok"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | User homepage link |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
"MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM"
| Field | Meaning |
|---|---|
$ | The whole body is one JSON string. It is the sec_user_id of the profile in url. There is no wrapper object and there are no other keys. |
$[0:8] | The first 8 characters of the string. In the example they are MS4wLjAB. |
$[8:] | The rest of the string after the first 8 characters. Keep the full value together and pass it unchanged to other endpoints. |
https://www.tiktok.com/@username.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/sec-user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@tiktok"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
urlstringwymaganeUser homepage link
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.05 za wywołanie | JSON |
Przewodniki:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/tiktok/web/sec-user-id z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: url (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. TikTok Profile Sec User ID działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API TikTok.