Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

TikTok User Country by Username

Dokumentasi 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.

Harga
$0.001USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 0 opsional

Playground

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

Contoh

Pilih contoh untuk memuat input dan hasilnya ke 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.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
TikTok$0.001 per panggilanJSON
TikTok$0.001 per panggilanJSON
TikTok$0.01 per panggilanJSON
TikTok$0.001 per panggilanJSON
TikTok$0.001 per panggilanJSON
TikTok$0.001 per panggilanJSON

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

Pertanyaan

FAQ

Bagaimana cara menggunakan API TikTok User Country by Username?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-username dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API TikTok User Country by Username?

$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API TikTok User Country by Username?

Wajib: username (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API TikTok User Country by Username?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API TikTok?

Tidak. TikTok User Country by Username berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API TikTok secara terpisah.