FlatpageDocs
Sites

Get site views

Views per day for the last 30 days (UTC, oldest first), this month and all time. Counts lag real time by up to a minute.

GET
/sites/{site}/stats
AuthorizationBearer <token>

An API key from Settings in the dashboard (fpk_...), or an OAuth access token from the MCP sign-in.

In: header

Path Parameters

sitestring

The site's id, or its link name (the part before .flatpage.page).

Response Body

curl -X GET "https://flatpage.app/v1/sites/spring-menu/stats"
{
  "site": {
    "id": "3f5e2a90-6b1d-4c1e-9a43-0d6c2f8e7b21",
    "slug": "spring-menu",
    "title": "Spring menu",
    "kind": "html",
    "status": "active",
    "url": "https://spring-menu.flatpage.page",
    "version": 1,
    "bytes": 48213,
    "updatedAt": "2026-11-02T15:40:00Z",
    "views": 128,
    "passwordProtected": false,
    "noindex": false,
    "share": {
      "title": "string",
      "description": "string",
      "image": "string",
      "imagePending": true,
      "faviconPending": true,
      "preview": {
        "title": "string",
        "description": "string",
        "imageUrl": "string",
        "faviconUrl": "string"
      }
    },
    "notifyUnlock": true,
    "spaMode": "auto",
    "pdfDownload": true,
    "emailGate": {
      "enabled": true,
      "headline": "string",
      "consent": "string"
    },
    "feedbackMode": true,
    "formsEnabled": true,
    "routing": {
      "spaDetected": true,
      "has404": true,
      "redirects": 0,
      "warnings": [
        "string"
      ]
    }
  },
  "totalViews": 0,
  "last30Days": {
    "days": [
      {
        "day": "2019-08-24",
        "views": 0
      }
    ],
    "total": 0,
    "thisMonth": 0,
    "sites": [
      {
        "id": "string",
        "thisMonth": 0
      }
    ]
  }
}
{
  "error": "site not found"
}
{
  "error": "site not found"
}
{
  "error": "site not found"
}
{
  "error": "site not found"
}