Analytics
Analytics summary
Metrics overview and trends: views, engagement, likes, comments, shares, posts, plus engagement rate, platform share, top posts, follower curve and a best-time heatmap. Filter by range / platform / account. Same definitions as the in-app analytics page (Beijing calendar days).
GET
/api/v1/analytics/summaryanalytics:readread tierread-only
Authorization & guardrails
- Send
Authorization: Bearer <credential>; credentials are issued under Settings → Integrations → Long-lived credentials, see Authentication. - The credential needs scope
analytics:read; the issuer's workspace role must also allow the action. - Rate limit: read tier, 60/min per credential; over the cap returns 429 with
Retry-After. - Idempotency: read endpoint, no Idempotency-Key needed.
- Read-only: writes nothing and sends nothing out.
Query parameters
rangeenum: week · 30 · 90 · alloptionalRange, default 30.
platformenum: x · youtube · instagram · tiktok · facebook · threads · douyin · xiaohongshu · wechat_mpoptionalOne platform only.
accountIdstringoptionalOne account only.
Responses
Success is HTTP 200 with a { data, meta } envelope; examples per status are on the right (at the end of the page on narrow screens). Every error is { error: { code, message, params }, meta } — branch on the code, not the message; see Errors.
| Status | Possible codes |
|---|---|
| 400 | invalid_input |
| 401 | unauthenticated |
| 403 | forbidden / workspace_not_found |
| 404 | not_found |
| 429 | rate_limited |
| 500 | internal |
Examples
Request
curl -X GET "https://popkit.loxily.com/api/v1/analytics/summary?range=30&platform=x" \
-H "Authorization: Bearer popkit_it_••••••••"Response
OK (excerpt)
{
"data": {
"range": 30,
"metrics": [
{
"key": "views",
"value": 128430,
"deltaPct": 12.4
},
{
"key": "eng",
"value": 5210,
"deltaPct": 8.1
},
{
"key": "likes",
"value": 4120,
"deltaPct": 6.3
},
{
"key": "comments",
"value": 640,
"deltaPct": 21.5
},
{
"key": "shares",
"value": 450,
"deltaPct": -3.2
},
{
"key": "posts",
"value": 18,
"deltaPct": 0
}
],
"trend": {
"dates": [
"2026-08-22",
"2026-08-23",
"…"
],
"eng": [
120,
98,
0
]
},
"filled": 30,
"bucket": "day",
"snapshotFrom": null,
"series": {
"views": [
4100,
3980,
0
],
"eng": [
120,
98,
0
],
"likes": [
90,
80,
0
],
"comments": [
20,
11,
0
],
"shares": [
10,
7,
0
],
"posts": [
1,
0,
0
]
},
"engRate": {
"value": 4.06,
"prev": 3.9,
"deltaPts": 0.16,
"series": [
2.9,
2.5,
0
]
},
"share": [
{
"platform": "x",
"eng": 3100,
"pct": 59.5
},
{
"platform": "instagram",
"eng": 2110,
"pct": 40.5
}
],
"top": [
{
"id": "pst_01J8ZK3R7QW6M2",
"platform": "x",
"title": "新功能上线",
"eng": 890,
"ratePct": 6.2
}
],
"followers": {
"dates": [
"2026-08-22",
"…"
],
"cum": [
12100,
12480
],
"totalNow": 12480,
"addedInRange": 380,
"fromSnapshots": true
},
"heat": {
"grid": [
[
0,
3,
12,
40,
55,
30,
8,
2,
0,
0,
0,
0
],
[
"…"
]
],
"max": 55
},
"peak": {
"day": 2,
"block": 4,
"mult": 2.4
},
"hasData": true,
"deepLink": "https://popkit.loxily.com/analytics?range=30&platform=x"
},
"meta": {
"requestId": "6a1d0c9e-2b7f-4e3a-8c5d-1f0e9b8a7c80"
}
}