TikTok Get User Ids By Username
2.07 credits/call
ae_tiktok_get_user_ids_by_username
### Purpose Retrieve the user_id and sec_user_id associated with a TikTok username. ### Required parameter - `username` (string): The account username to look up. ### Result The successful response provides the account’s `user_id` and `sec_user_id`. ### Example `username = "tiktok"`
2.07 credits/call
Pricing
2.07 credits/call
| Condition | Charge |
|---|---|
| Each call | 2.07 credits/call |
2.07 credits/call Charges are per query. A successful query is billed even if it returns no results.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
username | string | Yes | 用户名/Username | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_tiktok_get_user_ids_by_username' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"username": "sally.closet"
}
}'Response exampleresponse.json
{
"code": 200,
"data": {
"sec_user_id": "MS4wLjABAAAALtfQyyoHJgINlnQ-z-ah9qb6k555l2aqBHHt6Ku0VVB_oddL54-jurIVAVVUevXH",
"user_id": "6699861101489914885"
},
"docs": "https://api.tikhub.io/#/TikTok-App-V3-API/get_user_id_and_sec_user_id_by_username_api_v1_tiktok_app_v3_get_user_id_and_sec_user_id_by_username_get",
"message": "Request successful. This request will incur a charge.",
"message_zh": "请求成功,本次请求将被计费。",
"params": {
"username": "sally.closet"
}
}This example shows part of the response. Copied content is valid JSON.

