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

TikTok Web X-Gnarly and X-Bogus Signatures

Tài liệu API
https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly-and-xbogus

Generates X-Gnarly and X-Bogus signature tokens for TikTok web requests using a target endpoint URL and optional request body parameters.

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

Phòng thử nghiệm

Đầu vào
The requested API URL, no need to URL encode
The API parameters of the request, applicable for POST requests
Đầ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 Web X-Gnarly and X-Bogus Signatures API

Returns signature tokens for a TikTok web request. You send the full target url, and optionally a body string for POST requests. The response contains xGnarly, xBogus, xDynosaur, and a signedUrl.

Use cases

  • Sign a TikTok tag page URL before you request it from your own HTTP client.
  • Get an xGnarly value to attach to a TikTok web request that needs it.
  • Build a signed POST request by passing the request parameters in body.
  • Reuse the returned user_agent so your signed request uses the same browser string.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly-and-xbogus" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.tiktok.com/tag/cat?_r=1&name=cat&u_code=f02lm2f78d1elh&_d=f02ll161mcjihj&share_challenge_id=7551&sharer_language=en&source=h5_m"}'

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

Parameters

NameTypeRequiredDescription
urlstringYesThe requested API URL, no need to URL encode
bodystringNoThe API parameters of the request, applicable for POST requests

Example response

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

{
  "body": "",
  "signature": {
    "signedUrl": "https://www.tiktok.com/tag/cat?_r=1&name=cat&u_code=f02lm2f78d1elh&_d=f02ll161mc…",
    "xBogus": "1",
    "xDynosaur": "MaFdT8S5zzDCNu2FdzJoSPebgrTnVCKYHQQuRjpE8iRm1-MxvNak5hedfIyt4/NiDVBNySaJIg6kfva0…",
    "xGnarly": "MaTjg74vTVfgmm0vW/dwPfk43OgEtyKRP28T6NjvhZPZhZ9JI-9WdjukhjSDmoIRoEMljTcYD8oyJ4gE…"
  },
  "status": "success",
  "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/1…",
  "version": "5.3.2"
}

Response fields

FieldMeaning
signature.signedUrlThe input url with the signature parameters added, such as X-Dynosaur. You can use it as the request URL.
signature.xGnarlyThe X-Gnarly token generated for the given url.
signature.xBogusThe X-Bogus value for the given url. In this sample it is 1, so check it before you rely on it.
signature.xDynosaurThe X-Dynosaur token. The signedUrl carries this same value as a query parameter.
bodyThe body string used for signing. It is empty when you send no body.
user_agentThe browser user agent string used when the signatures were made. Send the same value in your request headers.
versionThe version string of the signing logic, here 5.3.2.
statusResult of the call. A successful call returns success.

Notes

  • Pass url as a plain string. You do not need to URL encode it.
  • Set body only for POST requests. Leave it out for GET requests.
  • Send the returned user_agent with your signed request so the headers match the signature.
  • For single-token needs, see TikTok Web X-Gnarly Signature or TikTok Web X-Bogus Signature.

Pricing

$0.005 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.005 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
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.05 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 Web X-Gnarly and X-Bogus Signatures?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly-and-xbogus 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 Web X-Gnarly and X-Bogus Signatures có giá bao nhiêu?

$0.005 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 Web X-Gnarly and X-Bogus Signatures chấp nhận những tham số nào?

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

API TikTok Web X-Gnarly and X-Bogus Signatures 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 Web X-Gnarly and X-Bogus Signatures 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.