Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

TikTok Web TTWID Identifier

Dokumentacja API
https://api.sandbase.ai/v1/api/tiktok/web/generate-ttwid

Returns a valid TikTok ttwid cookie value for web session handling. Accepts an optional user_agent string to match specific browser environments.

Cena
$0.001USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
0 wymaganych · 1 opcjonalnych

Playground

Wejście
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

TikTok Web TTWID Identifier API

Returns a TikTok ttwid cookie value as a single string. The only input is an optional user_agent string, so you can call it with an empty body.

Use cases

  • Set the ttwid cookie on a web client before it sends requests to TikTok web endpoints.
  • Pair the cookie with a specific browser user_agent so your request headers stay consistent.
  • Fetch a new cookie value when a scraper needs a fresh web session identity.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-ttwid" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

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

Parameters

NameTypeRequiredDescription
user_agentstringNo

Example response

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

{
  "ttwid": "1%7C0K27…"
}

Response fields

FieldMeaning
ttwidThe full cookie value as a URL-encoded string. Send it as ttwid=<value> in a Cookie header.
ttwidThe value has four segments separated by %7C, which decodes to /. The segments are 1, a short token, a 10-digit number, and a 64-character hex string.
ttwidThe 10-digit third segment looks like a Unix timestamp in seconds. The response does not say if it marks creation or expiry.

Notes

Pricing

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

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.05 za wywołanieJSON

Przewodniki:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

Pytania

FAQ

Jak używać API TikTok Web TTWID Identifier?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/tiktok/web/generate-ttwid 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.

Ile kosztuje API TikTok Web TTWID Identifier?

$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API TikTok Web TTWID Identifier?

Nie są wymagane żadne parametry. Opcjonalne: user_agent (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API TikTok Web TTWID Identifier?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego TikTok lub klucza API?

Nie. TikTok Web TTWID Identifier 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.