usernamestringerforderlich
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
}
}
]Wählen Sie ein Beispiel aus, um seine Eingaben und das Ergebnis in den Playground zu laden.
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.
Jetzt loslegen
Plattform-API-Endpunkt mit einheitlicher Authentifizierung und Nutzungsnachverfolgung.
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"
}'Legen Sie Ihren SandBase API-Schlüssel in Ihrer Serverumgebung fest. Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie Ihren Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis.
usernamestringerforderlichUsername, which can be obtained from the user's homepage link, for example: https://www.tiktok.com/@tiktok, the username is tiktok.
Gespeicherte Beispielantwort für diese API; beim Anzeigen wird keine Live-Anfrage gesendet.
[
{
"data": {
"api_version": "v1",
"country": "US",
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"user_id": 107955,
"username": "tiktok",
"username_modify_time": 1791290369
}
}
]Mehr entdecken
| API | Preis | Antwort |
|---|---|---|
TikTok User Country by UsernameDiese API TikTok | $0.001 pro Aufruf | JSON |
TikTok | $0.001 pro Aufruf | JSON |
TikTok | $0.01 pro Aufruf | JSON |
TikTok | $0.001 pro Aufruf | JSON |
TikTok | $0.001 pro Aufruf | JSON |
TikTok | $0.001 pro Aufruf | JSON |
Anleitungen:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
Fragen
Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/tiktok/app-v3/user-country-by-username mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.
$0.001 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.
Erforderlich: username (string). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.
Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.
Nein. TikTok User Country by Username läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für TikTok API beantragen.