Views by day
GET/api/v1/content/{id}/views
- Access
- API key
- Permission
content:read
Views of an owned file by day (Pro, plan feature view_stats)
The same opens as Content.views: a viewer’s first explicit open of the share page within 24 hours; never the owner, never link-preview bots. Kept as hourly aggregates without viewer data for 400 days. Days follow the clock given by offset.
Example request
curl "https://lac.pics/api/v1/content/Xq3u9RkT0bLmA7cV2pWz1eFy/views?days=30&offset=180" \
-H "Authorization: Bearer lac_api_YOUR_KEY"Parameters
Path
idstringrequiredThe file or note id.
Query
daysintegerHow many recent days to return.
1–90 · default 30
offsetintegerMinutes east of UTC of the viewer’s clock (Moscow: 180), e.g. -new Date().getTimezoneOffset().
-840–840 · default 0
Responses
200Success
ContentViewStatsidstringrequiredThe file or note id.
viewsintegerrequiredAll counted views of the file.
at least 0
viewLimitintegerrequiredor nullat least 1
viewLimitReachedAtstring · date-timerequiredor nulloffsetintegerrequiredThe clock the days follow, in minutes east of UTC.
-840–840
periodintegerrequiredViews within the returned days.
at least 0
daysarray of objectrequiredOldest first; today is the last one; days without views are 0.
1–90 items
2 fields
datestring · daterequiredLocal day, YYYY-MM-DD.
viewsintegerrequiredat least 0
- 400Invalid input
- 401Authentication required
- 403SCOPE_REQUIRED, or PLAN_FEATURE_REQUIRED with params.feature view_stats when the plan in force lacks it.PLAN_FEATURE_REQUIRED
- 404Content unavailable
- 409Media processing, upload idempotency or paste revision conflict
- 410Previously uploaded content was deleted or expired
- 413Size or quota limit
- 429Rate limit, or the account already uses all its upload slots
- 503Upload or password verification capacity reached
Example response
{
"id": "Xq3u9RkT0bLmA7cV2pWz1eFy",
"views": 42,
"viewLimit": null,
"viewLimitReachedAt": null,
"offset": 180,
"period": 12,
"days": [
{
"date": "2026-09-27",
"views": 3
}
]
}Error codes
| Code | Status | Message |
|---|---|---|
PLAN_FEATURE_REQUIRED | 403 | This is available in Pro. |
Answers of any method with a key (an invalid or expired key, a missing permission, too many requests) are in Errors.