Call it
curl https://api.peume.com/v1/call/tiktok-user-s-videos-by-secuid-or-username \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"max_cursor": 0,
"count": 20,
"sort_type": 0,
"region": "US"
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-user-s-videos-by-secuid-or-username", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"max_cursor": 0,
"count": 20,
"sort_type": 0,
"region": "US"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-user-s-videos-by-secuid-or-username",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"max_cursor": 0,
"count": 20,
"sort_type": 0,
"region": "US"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: tiktok-user-s-videos-by-secuid-or-username.
Parameters
sec_user_idstringUser sec_user_id
Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM
unique_idstringUser unique_id
max_cursorintegerMaximum cursor
Example: 0
countintegerNumber per page
Example: 20
sort_typeintegerSort type
Example: 0
regionstring国家地区/Region, 可选参数,如果不传则默认使用美国地区数据,传递后会优先获取对应国家地区的数据,例如:US、GB、FR等
Example: US
Other ways to do it
Same job, other sources, cheapest first.
List a user's recent videosBest sourceList a user's recent videos. Checks the cheapest source first and moves to the next one until it finds an answer.A TikTok account's latest videosList the latest videos of a public TikTok account, newest first, with text, plays, likes, comments, shares and length.TikTok user's recent videos by secUidRecent videos posted by a TikTok user (keyed by secUid, not username)TikTok user's videos by secUid or usernameGet user homepage video data V2TikTok user's videos by secUid or username, simplifiedGet user homepage video data V3 (simplified data - faster)TikTok Profile VideosList a TikTok creator's recent videos (views, likes, comments) by handle with cursor pagination.
