Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

TikTok User Country by Username

Docs API
https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-username

Returns the registered country code, user IDs, and username modification timestamp for a specified TikTok profile using their username.

Prix
$0.001USD / appel
Méthode
POST
Réponse
JSON
Paramètres
1 obligatoires · 0 facultatifs

Bac à sable

Entrée
Username, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok.
SortieExemple
Réponseoutputs · 255 B · 12 lignes
[
  {
    "data": {
      "api_version": "v1",
      "country": "US",
      "sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
      "user_id": 107955,
      "username": "tiktok",
      "username_modify_time": 1791290369
    }
  }
]

Exemples

Sélectionnez un exemple pour charger ses entrées et son résultat dans le playground.

README de l'API

TikTok User Country by Username API

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.

Use cases

  • Check which country a creator account is registered in before you plan a regional campaign.
  • Filter a list of TikTok handles by registered country.
  • Convert a username into user_id and sec_user_id for later API calls.
  • Check when an account last changed its username.

Request

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.

Parameters

NameTypeRequiredDescription
usernamestringYesUsername, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok.

Example response

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
}

Response fields

FieldMeaning
countryTwo-letter country code for the account, such as US.
user_idNumeric ID of the TikTok user.
sec_user_idSecure user ID string for the same account. Other TikTok endpoints accept it in place of the username.
usernameThe username that was looked up, returned as the account currently holds it.
username_modify_timeUnix timestamp in seconds for the account's username modification.
api_versionVersion label of the response format, v1 in this response.

Notes

Pricing

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

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
TikTok$0.001 par appelJSON
TikTok$0.001 par appelJSON
TikTok$0.01 par appelJSON
TikTok$0.001 par appelJSON
TikTok$0.001 par appelJSON
TikTok$0.001 par appelJSON

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

Questions

FAQ

Comment utiliser l’API TikTok User Country by Username ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-username avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.

Combien coûte l’API TikTok User Country by Username ?

$0.001 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API TikTok User Country by Username accepte-t-elle ?

Obligatoire : username (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API TikTok User Country by Username ?

Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.

Ai-je besoin d’un compte développeur ou d’une clé API TikTok ?

Non. TikTok User Country by Username fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API TikTok séparément.