urlstringobrigatório
The requested API URL, no need to URL encode
https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarlyReturns generated X-Gnarly signature values for TikTok web requests based on a target endpoint URL and optional request body data.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
Returns signature values for a TikTok web request, including xGnarly, xBogus and xDynosaur, plus a signed copy of the URL. It needs the full request url and an optional body string for POST requests.
xGnarly value to attach to a request that needs it.body.user_agent so your request headers match the signature.curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly" \
-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.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The requested API URL, no need to URL encode |
body | string | No | The API parameters of the request, applicable for POST requests |
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": "MwDqFZsDyJz0WUQqmwWXyw3eVqiiAocN4i8HrXlDijQD7wFNRr2Tz5/6YUbiz4AE3BgF2bNXJHozDynN…",
"xGnarly": "MkD6M/0-wSOgEHM72xx9Pmya70CI67jZFmlC6-SUgWujQf0-x/rRdQxOIvXBvWjzh0hCieJoa1YfSSWb…"
},
"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"
}
| Field | Meaning |
|---|---|
signature.xGnarly | The X-Gnarly signature value generated for the given url. |
signature.xBogus | The X-Bogus value for the same request. It is 1 in this example. |
signature.xDynosaur | The X-Dynosaur value generated for the request. |
signature.signedUrl | The input url with the X-Dynosaur parameter appended as a query parameter. |
body | The request body that was signed. It is an empty string when you send no body. |
user_agent | The browser User-Agent string the signature was generated with. |
version | The version string of the signing logic, for example 5.3.2. |
status | Whether the call worked. A good call returns success. |
url as plain text. You do not need to URL encode it.body only for POST requests. Leave it out for GET requests.xGnarly and xBogus in one call, use TikTok Web X-Gnarly and X-Bogus Signatures.$0.002 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly" \
-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"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
urlstringobrigatórioThe requested API URL, no need to URL encode
bodyanyThe API parameters of the request, applicable for POST requests
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
TikTok Web X-Gnarly SignatureEsta API TikTok | $0.002 por chamada | JSON |
TikTok | $0.001 por chamada | JSON |
TikTok | $0.001 por chamada | JSON |
TikTok | $0.001 por chamada | JSON |
TikTok | $0.001 por chamada | JSON |
TikTok | $0.05 por chamada | JSON |
Guias:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.002 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: url (string). Opcionais: body (any). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. TikTok Web X-Gnarly Signature funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do TikTok separadamente.