Call it
curl https://api.peume.com/v1/call/tiktok-user-videos-by-username-or-id \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"handle": "stoolpresidente",
"user_id": "6659752019493208069",
"sort_by": "latest",
"max_cursor": "1734562353000",
"region": "GB",
"trim": "false"
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-user-videos-by-username-or-id", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"handle": "stoolpresidente",
"user_id": "6659752019493208069",
"sort_by": "latest",
"max_cursor": "1734562353000",
"region": "GB",
"trim": "false"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-user-videos-by-username-or-id",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"handle": "stoolpresidente",
"user_id": "6659752019493208069",
"sort_by": "latest",
"max_cursor": "1734562353000",
"region": "GB",
"trim": "False"
}
},
)
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-videos-by-username-or-id.
Parameters
handleRequiredstringTikTok handle
Example: stoolpresidente
user_idstringTikTok user id. Use this for faster responses.
Example: 6659752019493208069
sort_bystringWhat to sort by
Example: latest
max_cursorstringCursor to get more videos. Get 'max_cursor' from previous response.
Example: 1734562353000
regionstringRegion (country) for the proxy. Defaults to GB. If a profile should have videos but returns none, try US or another relevant two-letter country code.
Example: GB
trimbooleanSet to true for a trimmed down version of the response
Example: false
Other ways to do it
Same job, other sources.
