数据统计
站点数据总览、增长趋势、排行榜等统计接口,所有端点均需 stats:read 或 system:read scope。
站点数据总览
POST
/api/trpc/openApi.overviewAPI 密钥stats:read获取全站关键指标一览,包含用户数、内容数、浏览量、互动统计等。
curl -X POST 'https://your-domain.com/api/trpc/openApi.overview' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer sk-your-api-key' \
-d '{}'区间增长统计
POST
/api/trpc/openApi.growthAPI 密钥stats:read查询指定日期范围内的新增数据。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
from | string | 是 | 开始日期(ISO 8601 格式) |
to | string | 是 | 结束日期(ISO 8601 格式,范围不超过 90 天) |
增长趋势
POST
/api/trpc/openApi.growthTrendAPI 密钥stats:read按日聚合的趋势序列,返回每日的用户注册、内容发布、浏览、互动等数据。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
from | string | 是 | 开始日期 |
to | string | 是 | 结束日期 |
内容排行榜
POST
/api/trpc/openApi.leaderboardAPI 密钥stats:read| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 是 | 内容类型:video / game / image |
metric | string | 是 | 排行指标:views / likes / favorites / comments |
limit | number | 否 | 数量(1-100,默认 20) |
用户排行榜
POST
/api/trpc/openApi.userLeaderboardAPI 密钥stats:read| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 是 | 排行类型:uploader / points / commentator / collector / liker |
limit | number | 否 | 数量(1-100,默认 20) |
内容分布
POST
/api/trpc/openApi.contentDistributionAPI 密钥stats:read各内容类型的总量与审核状态分布。
最近内容
POST
/api/trpc/openApi.recentContentAPI 密钥stats:read| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 否 | 内容类型:video / game / image / all(默认) |
limit | number | 否 | 数量(1-50,默认 10) |
用户注册统计
POST
/api/trpc/openApi.userStatsAPI 密钥stats:read返回总用户数、封禁数、上传权限数、今日/7日/30日新注册数。
热门标签
POST
/api/trpc/openApi.popularTagsAPI 密钥system:read| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit | number | 否 | 数量(1-100,默认 30) |
sortBy | string | 否 | 排序:videoCount / gameCount / imagePostCount / total(默认) |
合集列表
POST
/api/trpc/openApi.seriesListAPI 密钥system:read| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit | number | 否 | 数量(1-100,默认 20) |
cursor | string | 否 | 分页游标 |
存储用量摘要
POST
/api/trpc/openApi.storageUsageAPI 密钥system:read返回总文件数、总大小、各存储策略的用量细分。
搜索热词
POST
/api/trpc/openApi.searchHotWordsAPI 密钥system:read| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit | number | 否 | 数量(1-50,默认 20) |
标签分类列表
POST
/api/trpc/openApi.tagCategoriesAPI 密钥system:read返回所有标签分类及其标签数,含未分类标签计数。