Call it
curl https://api.peume.com/v1/call/tiktok-user-posts-by-user-id \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"secUid": "your secUid",
"cursor": "0",
"sort": "LATEST"
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-user-posts-by-user-id", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"secUid": "your secUid",
"cursor": "0",
"sort": "LATEST"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-user-posts-by-user-id",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"secUid": "your secUid",
"cursor": "0",
"sort": "LATEST"
}
},
)
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-posts-by-user-id.
Parameters
secUidRequiredstringopaque user id; get it from tiktok.user.profile
cursorstring'0' for the first page, then max_cursor from the previous response
Example: 0
sortstringLATEST (default) | MOST_POPULAR
Example: LATEST
Other ways to do it
Same job, other sources.
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 user's videos by secUid or username, simplifiedGet user homepage video data V3 (simplified data - faster)
