Call it
curl https://api.peume.com/v1/call/tiktok-get-top-contents-list \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"country_code": "US",
"period_dimension": 3,
"period_end_timestamp": 10,
"organic_only": false,
"limit": 20,
"page": 1
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-get-top-contents-list", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"country_code": "US",
"period_dimension": 3,
"period_end_timestamp": 10,
"organic_only": false,
"limit": 20,
"page": 1
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-get-top-contents-list",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"country_code": "US",
"period_dimension": 3,
"period_end_timestamp": 10,
"organic_only": False,
"limit": 20,
"page": 1
}
},
)
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-get-top-contents-list.
Parameters
country_codestring国家/地区代码/Country code
Example: US
period_dimensioninteger榜单周期:1 周榜、3 日榜(默认)、5 长周期榜;决定 period_end_timestamp 对应的榜单类型,并非最近1/3/5天。/Ranking period: 1 weekly, 3 daily (default), 5 long-period; selects the ranking type for period_end_timestamp, not the last 1/3/5 days.
Example: 3
cookiestring自定义Cookie字符串(可选)/Custom Cookie string (optional)
period_end_timestampRequiredinteger榜单周期结束时间,10位秒级 Unix 时间戳,需与 period_dimension 配合使用;周榜(1)选择UTC周日的榜单日期,日榜(3)/长周期榜(5)选择近期有榜单数据的日期,建议统一按UTC零点换算。时间戳错误或日期过早、无榜单数据时,HTTP 200 也会返回空列表;不要传0或13位毫秒时间戳。示例日期也会过期,实际调用请重新选择近期可用日期。/Ranking period end as a 10-digit Unix timestamp in seconds, paired with period_dimension. Weekly (1): a Sunday ranking date in UTC; daily (3)/long-period (5): a recent date with ranking data. UTC midnight is recommended for date conversion. An incorrect timestamp, an old date, or unavailable ranking data can return an empty list with HTTP 200; do not use 0 or 13-digit milliseconds. Example dates can expire; choose a
organic_onlyboolean是否仅看自然流量内容/Organic content only
Example: false
limitinteger每页数量,最大100/Items per page, max 100
Example: 20
pageinteger页码/Page number
Example: 1
content_label_idsstring内容分类ID,多个用逗号分隔,空为全部/Content label IDs, comma separated
Example:
order_by_metricinteger排序指标:1 播放量 2 互动率 3 6秒完播率/Order by metric
Example: 1
