TikTok API
User Following
Get a list of accounts that a TikTok user follows.
POST
$0.01/call/v1/tiktok/user-followingUsage
const res = await fetch('https://api.yepapi.com/v1/tiktok/user-following', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ user_id: '6842123456789012345' }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/tiktok/user-following \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "6842123456789012345"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
user_id | string | Yes | TikTok user ID (numeric) | — |
cursor | string | No | Pagination cursor from previous response | — |
count | number | No | Number of results to return | 20 |
Response
{
"ok": true,
"data": {
"has_more": true,
"cursor": "50",
"following": [
{
"user_id": "6891234567890123456",
"unique_id": "gordonramsay",
"nickname": "Gordon Ramsay",
"avatar": "https://p16-sign.tiktokcdn.com/...",
"signature": "Official TikTok of Gordon Ramsay",
"follower_count": 45000000,
"is_verified": true
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.has_more | boolean | Whether more results are available |
data.cursor | string | Cursor for fetching the next page |
data.following | object[] | Array of followed user objects |
data.following[].user_id | string | User's unique numeric identifier |
data.following[].unique_id | string | User's unique handle |
data.following[].nickname | string | User's display name |
data.following[].avatar | string | Profile picture URL |
data.following[].signature | string | Bio text |
data.following[].follower_count | number | Number of followers |
data.following[].is_verified | boolean | Whether the user is verified |
Use the cursor value from the response to paginate through results.