usernamestring必須
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
}
}
]例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
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.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
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"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
usernamestring必須Username, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok.
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
[
{
"data": {
"api_version": "v1",
"country": "US",
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"user_id": 107955,
"username": "tiktok",
"username_modify_time": 1791290369
}
}
]さらに探索
| 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
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-username に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.001、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: username (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。TikTok User Country by Username は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。TikTok の API アクセスを別途申請する必要はありません。