---
title: "Get a space's analytics"
method: GET
path: "/v1/spaces/{spaceId}/analytics"
tags: ["Activity"]
---

# Get a space's analytics

`GET /v1/spaces/{spaceId}/analytics`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/spaces/{spaceId}/analytics`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns traffic analytics for one space over a bounded time window.

## Path parameters

- `spaceId` string, required

## Query parameters

- `window` '48h' | '7d' | '30d': Analytics summary window. Defaults to "7d".

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `spaceId` string, required: The space id the traffic was aggregated for.
    - `window` '48h' | '7d' | '30d', required: Resolved summary window.
    - `since` string, required: Window start (ISO 8601).
    - `until` string, required: Window end (ISO 8601).
    - `granularity` 'hourly' | 'daily', required: Series bucket size: hourly for the 48h window, daily otherwise.
    - `views` number, required: Successful non-crawler requests (status < 400, assets included) over the window.
    - `bandwidthBytes` number, required: Total response bytes in the window.
    - `visitorsByDay` object[], required: Daily unique-visitor estimates. Daily is the provider's finest uniques resolution, and uniques are never summed across days.
      - `date` string, required: UTC day (ISO 8601).
      - `visitors` number, required
    - `topPaths` object[], required: Most-viewed paths, capped at 10.
      - `path` string, required
      - `views` number, required
    - `topHosts` object[], required: Most-viewed hostnames, capped at 10.
      - `host` string, required
      - `views` number, required
    - `series` object[], required: Time series across the window.
      - `bucket` string, required: Bucket start (ISO 8601).
      - `requests` number, required
      - `views` number, required
      - `bandwidthBytes` number, required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
