Call it
curl https://api.peume.com/v1/call/get-tiktok-profile \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"usernames": [
"nike",
"selenagomez"
],
"startUrls": [
"https://www.tiktok.com/@gordonramsayofficial"
],
"maxPostsPerProfile": 100,
"profileSorting": "latest",
"excludePinnedPosts": false,
"maxItems": 1000
}
}'const res = await fetch("https://api.peume.com/v1/call/get-tiktok-profile", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"usernames": [
"nike",
"selenagomez"
],
"startUrls": [
"https://www.tiktok.com/@gordonramsayofficial"
],
"maxPostsPerProfile": 100,
"profileSorting": "latest",
"excludePinnedPosts": false,
"maxItems": 1000
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-tiktok-profile",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"usernames": [
"nike",
"selenagomez"
],
"startUrls": [
"https://www.tiktok.com/@gordonramsayofficial"
],
"maxPostsPerProfile": 100,
"profileSorting": "latest",
"excludePinnedPosts": False,
"maxItems": 1000
}
},
)
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: get-tiktok-profile.
Parameters
usernamesarrayTikTok usernames, with or without @.
Example: ["nike","selenagomez"]
startUrlsarrayTikTok profile URLs, for example https://www.tiktok.com/@gordonramsayofficial. Video and photo URLs are not supported.
Example: ["https://www.tiktok.com/@gordonramsayofficial"]
maxPostsPerProfileintegerMaximum number of posts for each profile. Posts removed by the filters do not count. Leave empty for no per-profile limit.
Example: 100
profileSortingstringLatest returns the newest posts first. Popular returns the most liked posts first.
latest · popular
Example: latest
untilstringReturns only posts published on or after this date.
sincestringReturns only posts published before this date.
excludePinnedPostsbooleanSkips posts pinned to the top of a profile. Pinned posts are shown first and are often old.
Example: false
maxItemsintegerMaximum number of posts in the output, across all profiles.
Example: 1000
customMapFunctionstringJavaScript function to transform each output video. Use to add computed fields, modify values, or remove unnecessary data. NOT intended for filtering - filtering may result in automatic bans. Must be a single synchronous function, e.g. (object) => { return {...object} }. It runs in a sandbox with plain JavaScript only (no network or require) and about 1 second per item. Leave empty if you do not need to transform the output - an unusable function is ignored and the original items are saved instead.
outputConnectorstringPick an MCP connector you authorized in Console → Settings → API & Integrations → MCP connectors (e.g. Notion, Todoist — any service whose MCP server offers non-destructive write tools works best-effort). The scraped results are written through your own connector — the Actor never sees your third-party credentials. Only non-destructive write tools are used; it can never delete or overwrite your existing data.
deliverTargetstringWhere to write into the connector — paste the URL or ID. Notion example: Leave empty for services that need no target (e.g. Todoist Inbox, Slack). For Notion, share the page or database with your connector first (Notion's ••• → Connections menu), and point at a PAGE for structured columns (the Actor builds the database for you) — an empty database receives only the title (the rest of each record goes to the row's body).
deliverModestringperPost writes one record per scraped item; summary writes a single roll-up for the run.
perPost · summary
Example: perPost
deliverMaxItemsintegerCap on how many records perPost mode writes to the connector; ignored in summary mode. Leave empty to deliver everything scraped.
