Skip to content

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

  • idstringrequired

    The file or note id.

Query

  • daysinteger

    How many recent days to return.

    1–90 · default 30

  • offsetinteger

    Minutes east of UTC of the viewer’s clock (Moscow: 180), e.g. -new Date().getTimezoneOffset().

    -840–840 · default 0

Responses

  • 200SuccessContentViewStats
    • idstringrequired

      The file or note id.

    • viewsintegerrequired

      All counted views of the file.

      at least 0

    • viewLimitintegerrequiredor null

      at least 1

    • viewLimitReachedAtstring · date-timerequiredor null
    • offsetintegerrequired

      The clock the days follow, in minutes east of UTC.

      -840–840

    • periodintegerrequired

      Views within the returned days.

      at least 0

    • daysarray of objectrequired

      Oldest first; today is the last one; days without views are 0.

      1–90 items

      2 fields
      • datestring · daterequired

        Local day, YYYY-MM-DD.

      • viewsintegerrequired

        at 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

200 · application/json
{
  "id": "Xq3u9RkT0bLmA7cV2pWz1eFy",
  "views": 42,
  "viewLimit": null,
  "viewLimitReachedAt": null,
  "offset": 180,
  "period": 12,
  "days": [
    {
      "date": "2026-09-27",
      "views": 3
    }
  ]
}

Error codes

CodeStatusMessage
PLAN_FEATURE_REQUIRED403This 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.

Views by day: GET /api/v1/content/{id}/views · lacuna API