TikTok Web Guest Cookie
https://api.sandbase.ai/v1/api/tiktok/web/web-guest-cookieReturns guest session cookies for TikTok Web based on a specified browser user agent string. Helps maintain session identity when querying web-based TikTok data.
- Price
- $0.003USD / callFirst 100 calls per day free (shared per organization)
- Method
- POST
- Response
- JSON
- Parameters
- 1 required · 0 optional
Try the model
Playground
[
{
"data": {
"Cookie": "tt_csrf_token=ywaXaQLU--rOjuZB_3jrby1Ny8QQ15htaWrs;ttwid=1%7CEApwHaHDTLZB5Jb-XinqPHzZUz6aisIjXuYSgXl2s9Q%7C1791290496%7C313236d0a37a07997f641229f2273ba668db80b177d347172150c5b6ec5771e5; reg-store-region=;store-idc=;msToken=HNusxz2W9Qlj49radrV_3MbrR7F5PjLkzQl4oY5DKOSfpfv6y2vhKOZDrRUJ1548XaENKger2VSh9wJoCHY9mttwrzL0BAwox8EhZxk1cIL_9CYbK830L4qx;msToken=gCpHPspChOEhH3ZdqJKWAkZFheaptYmuY9Wjw7feWCkpAMGzaoQRZSWPerUuqOM3lLvGuZz_giR3QPUh3X3Cy2N3wnUaqfMs0S1hHp2h5P67b70fRGIjGTOg; ttwid=1%7CVHzgS11G0NNfXOoqG8tjmMkOlAkEqKTsfi5zEm_Tv6o%7C1791290497%7Ccacf3a02092a62828cc19b9f7896edb7c86621506da2e79524a1951630bf37a3;tt_csrf_token=0Z7hh5f9-XBl3P8DIG4UdbGZOWjaaqq9s4r4;tt_chain_token=TWeLeA962En5zd8yJHbcxA==",
"Referer": "https://www.tiktok.com/explore",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0"
}
}
]Examples
Select an example to load its inputs and result into the playground.
Model card
Specifications
Pricing
- Base price
- $0.003 / run
- Daily free calls
- First 100 calls per day free (shared per organization)
Request & response
- Method
- POST
- Request body
- application/json
- Response
- application/json
- Execution
- sync
Parameters
- user_agent
- string · required
Access
- Provider
- TikTok
- API
- Platform API
- Base URL
- https://api.sandbase.ai
- Endpoint
- /v1/api/tiktok/web/web-guest-cookie
- Authentication
- Bearer API key
API README
TikTok Web Guest Cookie API
Retrieve guest session cookies for TikTok Web by providing a browser user_agent string.
Use cases
- Establish guest sessions for scraping public TikTok web data.
- Maintain consistent session identity across web requests to avoid duplicate data.
- Format session headers matching specific browser user agent profiles.
Request
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/web-guest-cookie" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0"}'
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
user_agent | string | Yes | User browser agent |
Notes
- Requires a valid browser user agent string via the
user_agentparameter.
Related APIs
- TikTok Video IDs from URLs (Batch): Resolves and extracts TikTok video IDs from a list of video URLs.
- TikTok User Sec User ID Extractor: Returns a list of sec_user_id identifiers corresponding to TikTok user profile URLs.
- TikTok Profile Unique IDs: Resolves a batch of TikTok user homepage links to retrieve their corresponding unique identifiers.
Start building
Send your first request
Platform API endpoint with unified authentication and usage tracking.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/api/tiktok/web/web-guest-cookie" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0"
}
SANDBASE_JSON
)
printf '%s\n' "$result"Explore more
Related APIs
| API | Price | Response | Released |
|---|---|---|---|
TikTok Web Guest CookieThis API TikTok | $0.003 per call | JSON | Jul 31, 2026 |
TikTok | $0.0015 per call | JSON | Jul 31, 2026 |
TikTok | $0.0015 per call | JSON | Jul 31, 2026 |
TikTok | $0.0015 per call | JSON | Jul 31, 2026 |
TikTok | $0.0015 per call | JSON | Jul 31, 2026 |
TikTok | $0.07 per call | JSON | Jul 31, 2026 |
Questions
FAQ
How do I use the TikTok Web Guest Cookie API?
Send a POST request to https://api.sandbase.ai/v1/api/tiktok/web/web-guest-cookie with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.
How much does the TikTok Web Guest Cookie API cost?
$0.003 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.
What parameters does the TikTok Web Guest Cookie API accept?
Required: user_agent (string). The Parameters table and the Playground on this page list every field.
What does the TikTok Web Guest Cookie API return?
A JSON response returned in the same HTTP request (synchronous).
Do I need a TikTok developer account or API key?
No. TikTok Web Guest Cookie runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for TikTok API access separately.
