usernamestringobrigatório
Username, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok.
https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-usernameReturns the registered country code, user IDs, and username modification timestamp for a specified TikTok profile using their username.
[
{
"data": {
"api_version": "v1",
"country": "US",
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"user_id": 107955,
"username": "tiktok",
"username_modify_time": 1791290369
}
}
]Selecione um exemplo para carregar as entradas e o resultado no playground.
Returns the registered country code, the numeric and secure user IDs, and a username modification timestamp for a TikTok account. It needs one input: the account username, without the @ sign.
username into user_id and sec_user_id for later API calls.curl -X POST "https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-username" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "tiktok"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Username, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"api_version": "v1",
"country": "US",
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"user_id": 107955,
"username": "tiktok",
"username_modify_time": 1793691840
}
| Field | Meaning |
|---|---|
country | Two-letter country code for the account, such as US. |
user_id | Numeric ID of the TikTok user. |
sec_user_id | Secure user ID string for the same account. Other TikTok endpoints accept it in place of the username. |
username | The username that was looked up, returned as the account currently holds it. |
username_modify_time | Unix timestamp in seconds for the account's username modification. |
api_version | Version label of the response format, v1 in this response. |
username from the profile URL. In https://www.tiktok.com/@tiktok, the value is tiktok.$0.001 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/app-v3/user-country-by-username" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "tiktok"
}'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.
usernamestringobrigatórioUsername, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok.
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
[
{
"data": {
"api_version": "v1",
"country": "US",
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"user_id": 107955,
"username": "tiktok",
"username_modify_time": 1791290369
}
}
]Explorar mais
| API | Preço | Resposta |
|---|---|---|
TikTok User Country by UsernameEsta API TikTok | $0.001 por chamada | JSON |
TikTok | $0.001 por chamada | JSON |
TikTok | $0.01 por chamada | JSON |
TikTok | $0.001 por chamada | JSON |
TikTok | $0.001 por chamada | JSON |
TikTok | $0.001 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/app-v3/user-country-by-username 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.001 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: username (string). 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 User Country by Username 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.