# Read help center analytics

```http
GET https://trydimmi.com/api/v1/help-centers/{help_center}/analytics
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `articles:read`.

## Path parameters

- `help_center` (string, required): Id of the help center, starting with hc_, such as hc_01jx2m8k4t. Find it with GET /help-centers.

## Query parameters

- `days` (integer): How many days back, 1 to 90; 30 when left out.

## Response 200 (OK)

- `data` (object, required)
  - `content_gaps` (object[] | null, required): Search terms that found nothing, each with how often it was searched and the last day; these point at articles worth writing.
    - `last_date` (string, required): The last day someone searched these words and found nothing, as a date such as 2026-11-01.
    - `query` (string, required): The words readers searched for that found no article.
    - `searches` (integer, required): How many times this search came up empty over the period.
  - `daily` (object[] | null, required): Article views for each day of the period, with the part that came from the messenger.
    - `date` (string, required): The day counted, as a date such as 2026-11-01.
    - `messenger` (integer, required): How many of that day's article views happened inside the messenger.
    - `views` (integer, required): How many times articles were viewed that day.
  - `days` (integer, required): How many days the report covers.
  - `empty_searches` (integer, required): How many searches in the period found no article.
  - `helpful` (integer, required): How many times readers marked an article helpful in the period.
  - `helpful_percent` (integer | null, required): Share of helpful answers out of all helpful and unhelpful answers, a whole number from 0 to 100. Null when nobody answered.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `searches` (integer, required): How many searches readers ran in the period.
  - `since` (string, required): The first day the report covers, written YYYY-MM-DD, such as 2026-01-31.
  - `top_articles` (object[] | null, required): The most read articles in the period, each with its views and helpful and unhelpful counts.
    - `helpful` (integer, required): How many readers marked the article helpful in the reported days.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `slug` (string, required): The article's slug, the part of its web address that names it.
    - `title` (string, required): The article's title.
    - `unhelpful` (integer, required): How many readers marked the article not helpful in the reported days.
    - `views` (integer, required): How many times the article was viewed in the reported days.
  - `unhelpful` (integer, required): How many times readers marked an article unhelpful in the period.
  - `views` (integer, required): Total article views in the period.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request GET \
  --url 'https://trydimmi.com/api/v1/help-centers/{help_center}/analytics' \
  --header 'Authorization: Bearer <token>'
```

## Example response

```json
{
  "data": {
    "content_gaps": [
      {
        "last_date": "<string>",
        "query": "<string>",
        "searches": 123
      }
    ],
    "daily": [
      {
        "date": "<string>",
        "messenger": 123,
        "views": 123
      }
    ],
    "days": 123,
    "empty_searches": 123,
    "helpful": 123,
    "helpful_percent": 123,
    "object": "<string>",
    "searches": 123,
    "since": "<string>",
    "top_articles": [
      {
        "helpful": 123,
        "id": "<string>",
        "slug": "<string>",
        "title": "<string>",
        "unhelpful": 123,
        "views": 123
      }
    ],
    "unhelpful": 123,
    "views": 123
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
