Call it
curl https://api.peume.com/v1/call/tiktok-user-s-videos-by-secuid-or-username-simplified \
-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
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-user-s-videos-by-secuid-or-username-simplified", {
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
}
}),
});
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-simplified",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"sec_user_id": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"max_cursor": 0,
"count": 20,
"sort_type": 0
}
},
)
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-simplified.
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
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 V1TikTok user's videos by secUid or usernameGet user homepage video data V2TikTok Profile VideosList a TikTok creator's recent videos (views, likes, comments) by handle with cursor pagination.
