TikTok
TikTok User Region
Get the country a TikTok account is registered in by username - an ISO country code - plus its user id and sec_user_id, as JSON. Costs 1 credit per request.
POST/api/v1/tiktok/user/region
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonusernamestringrequiredTikTok username, with or without the @.
Example: mrbeast
Notes
country is the region the account is registered in, not the creator's nationality. The response also carries sec_user_id, so this is a cheap username-to-sec_user_id lookup. user_id is a large number that loses precision as a JSON number; key on sec_user_id. An unknown username answers 404 and is not billed.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.tiktok.user_region(username="mrbeast")
print(results)Response
"username": "mrbeast",
"username_modify_time": 1791756213,
"user_id": 6614519312189948000,
"sec_user_id": "MS4wLjABAAAABKjQkOz_IIzXXzEAl_9LGsWhvK-gBnlczwRPXK8EmxAp6K3X0qiaP5_OEqmm0XwG",
"country": "CA",
"api_version": "v1"
},
"response_time": 1463
}