---
title: "Weekly trends"
method: GET
path: "/v1/projects/{projectId}/trends"
tags: ["Analysis"]
---

# Weekly trends

`GET /v1/projects/{projectId}/trends`

## Request

- Base URL: `https://hootlens-api-368877148687.us-east1.run.app`
- URL: `https://hootlens-api-368877148687.us-east1.run.app/v1/projects/{projectId}/trends`
- Auth: HTTP bearer

Page views, clicks and the snag rate over the last 7 complete UTC days against the 7 before, compared only when both weeks were fully counted.

Required token scopes are listed in x-hootlens-scopes. A signed-in person needs the matching permission on the site instead (the viewer and editor roles are presets of the permissions).

## Path parameters

- `projectId` string, required: An identifier: 1 to 80 letters, digits, underscores or hyphens.

## Response `200`

The trends.

- OverviewTrends
  - `status` 'compared' | 'current-only' | 'not-covered', required
  - `windows` object, required
    - `current` object, required
      - `from` string, required
      - `to` string, required
    - `previous` object, required
      - `from` string, required
      - `to` string, required
  - `countedFrom` string
  - `current` object
    - `pageViews` integer, required
    - `clicks` integer, required
    - `snags` integer, required
    - `snagRate` number, nullable, required
  - `previous` object
    - `pageViews` integer, required
    - `clicks` integer, required
    - `snags` integer, required
    - `snagRate` number, nullable, required
  - `changes` object
    - `pageViews` object, required
      - `direction` 'up' | 'down' | 'flat', required
      - `absolute` integer, required
      - `percent` integer
    - `clicks` object, required
      - `direction` 'up' | 'down' | 'flat', required
      - `absolute` integer, required
      - `percent` integer
    - `snagRate` object
      - `direction` 'up' | 'down' | 'flat', required
      - `points` number, required

## Other responses

- `401`: The credential is missing, expired or revoked.
- `403`: The credential or the person's permissions on the site do not permit this action.
- `404`: The site, or the record inside it, does not exist or the caller is not a member (a non-member cannot tell the two apart).
- `429`: A rate limit or a per-site limit was reached.

---

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