Call it
curl https://api.peume.com/v1/call/a-tiktok-account-s-latest-videos \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"account": "nasa",
"limit": 20
}
}'const res = await fetch("https://api.peume.com/v1/call/a-tiktok-account-s-latest-videos", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"account": "nasa",
"limit": 20
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/a-tiktok-account-s-latest-videos",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"account": "nasa",
"limit": 20
}
},
)
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: a-tiktok-account-s-latest-videos.
Parameters
accountRequiredstringthe @handle, the profile URL, or TikTok's secUid (MS4wLjABAAAA…, one call less)
Example: nasa
limitintegerat most 100; default 20
Example: 20
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.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)TikTok Profile VideosList a TikTok creator's recent videos (views, likes, comments) by handle with cursor pagination.
