TikTok account country API
The country a TikTok account is registered in, by username
Use the TikTok account country API to read public TikTok accounts. The country a TikTok account is registered in, by username.
Request
Send your API key as a Bearer token. Replace YOUR_API_KEY with a key from your console.
curl "https://xtikapi.com/v1/tiktok/accounts/country?id=1234567890" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
response = requests.get(
"https://xtikapi.com/v1/tiktok/accounts/country",
params={"id":"1234567890"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(response.json())const response = await fetch("https://xtikapi.com/v1/tiktok/accounts/country?id=1234567890", {
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
console.log(await response.json());Parameters
| Name | Type | Required |
|---|---|---|
| id | string | required |
Response fields
data holds the fields exactly as the platform sends them, and meta.normalized is false. meta still carries the request ID and what was billed.
Example response
Recorded from a live call on 2026-11-18. Names, text, links and images are replaced with examples; counts, dates and field names are real.
{
"data": {
"username": "example_user",
"username_modify_time": 0,
"user_id": 0,
"sec_user_id": "xx7xxxxxxxxxx4xxxxxxxxxxxxxx_xx0xxxxxx9xxxxxxxxxxxxxxxx",
"country": "Example text",
"api_version": "Example text"
},
"meta": {
"request_id": "example",
"endpoint": "tiktok.accounts.country",
"normalized": false,
"unavailable": [],
"billing": {
"charged": true,
"amount": 0.002,
"balance": 4.98
}
}
}Error codes
Errors are not billed. Retry the ones marked yes. More in the API quickstart.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
| unauthorized | 401 | no | API key is missing, invalid, or revoked. |
| rate_limited | 429 | yes | Too many requests. |
| invalid_params | 422 | no | Request parameters are invalid. |
| price_exceeds_max | 402 | no | This call costs more than X-Max-Price. |
| insufficient_balance | 402 | no | Balance is too low for this call. |
| key_limit_reached | 402 | no | This API key has reached its spend limit. |
| idempotency_conflict | 409 | no | This Idempotency-Key was already used with different parameters. |
| idempotency_in_progress | 409 | yes | A request with this Idempotency-Key is still running. |
| response_too_large | 409 | no | The response is too large to store for a safe retry. |
| upstream_error | 502 | yes | The data provider returned an error. You were not charged. |
| upstream_timeout | 504 | yes | The data provider timed out. You were not charged. |
| internal_error | 500 | yes | Something went wrong on our side. You were not charged. |
| not_found | 404 | no | No such endpoint. |
More TikTok APIs
- TikTok video search API→
- TikTok video details API→
- TikTok comments API→
- TikTok account details API→
- TikTok video list API→
- TikTok trending searches API→
- TikTok comment replies API→
- TikTok hashtag videos API→
- TikTok music videos API→
- TikTok account search API→
- TikTok account followers API→
- TikTok account following API→
- TikTok similar accounts API→
- TikTok search suggestions API→
- TikTok Ad Library search API→
- TikTok Ad Library ad details API→
- TikTok top ads API→
- TikTok trending hashtags API→
- TikTok Shop product search API→
- TikTok Shop product details API→
- TikTok Shop product reviews API→
- TikTok Shop seller products API→
- TikTok Shop best sellers API→
Questions
What does the TikTok account country API return?
A record object with the fields listed on this page. Missing provider fields are named in meta.unavailable.
When is the TikTok account country API billed?
This call costs $0.002 when the provider returns HTTP 200. An empty result is billed. Errors and timeouts are not billed.
What do I do if the provider returns an error?
The response has charged set to false. Read the error code and retry if the error says retry is true. Your balance is unchanged.
Where is this resource on another platform?
Use the links on this page for the same resource and action on other platforms. Change the platform word in the path.