Sand AISand AI MAGI-2MAGI-2 теперь на SandBase: видео 1080p с нативным звукомПопробовать сейчас

TikTok User Country by Username

Документация 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.

Цена
$0.001USD / вызов
Метод
POST
Ответ
JSON
Параметры
1 обязательных · 0 необязательных

Песочница

Ввод
Username, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok.
ВыходПример
Ответoutputs · 255 B · 12 строк
[
  {
    "data": {
      "api_version": "v1",
      "country": "US",
      "sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
      "user_id": 107955,
      "username": "tiktok",
      "username_modify_time": 1791290369
    }
  }
]

Примеры

Выберите пример, чтобы загрузить его входные данные и результат в playground.

README по 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.

Посмотреть больше

Связанные APIs

Все APIs
APIЦенаОтвет
TikTok$0.001 за запросJSON
TikTok$0.001 за запросJSON
TikTok$0.01 за запросJSON
TikTok$0.001 за запросJSON
TikTok$0.001 за запросJSON
TikTok$0.001 за запросJSON

Руководства:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

Вопросы

FAQ

Как использовать API TikTok User Country by Username?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-username, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API TikTok User Country by Username?

$0.001 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.

Какие параметры принимает API TikTok User Country by Username?

Обязательные: username (string). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API TikTok User Country by Username?

JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.

Нужен ли мне аккаунт разработчика TikTok или API key?

Нет. TikTok User Country by Username работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API TikTok.