# Visits

`GET https://api.tentary.com/v1/reports/visits`

Source: https://tentary.com/en/help/api/get-visits/
Area: Reports
MCP tool: `get_visits`. Reads only. Changes nothing in the account.

---

Visits per day or month, with one number per product.

- A browser session on the product page and its checkout counts as one visit, at most once per 30 minutes.
- `from` and `to` are both included. Days are UTC.
- Visits of the account owner and products that are not live are not counted.
- Landing pages and the shop page have no visit counter.
- There are no traffic sources and no unique visitors yet.

For orders and money, call [`GET /v1/orders`](https://tentary.com/en/help/api/list-orders/) or [`GET /v1/reports/revenue`](https://tentary.com/en/help/api/get-revenue-report/).

## Authorization

`Authorization: Bearer <API key>`

A personal API key (tnt_...). Create it in the Tentary app on the page AI & API.

## Query parameters

- `from` (string, query): First day (UTC), like 2026-01-01. Default: 29 days before to. Limits: pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `to` (string, query): Last day (UTC). Default today. 731 days at most. Limits: pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `group_by` (string, query): day (default, 92 days at most) or month. Allowed values: `day`, `month`.
- `product_id` (integer, query): Only this product (id from list_products). Limits: min 1.

## Response

- `from` (string<date>): Like 2026-01-31.
- `to` (string<date>): Like 2026-01-31.
- `group_by` (string): How the periods are grouped. Allowed values: `day`, `month`.
- `product_id` (integer, can be null): The product ID.
- `visits` (integer): All visits in the period.
- `periods` (array of object): Every period, also without visits.
  - `period` (string): Like 2026-01-31 or 2026-01.
  - `visits` (integer): Number of visits.
- `products` (array of object): Most visits first.
  - `product_id` (integer): The product ID.
  - `title` (string, can be null): The title.
  - `visits` (integer): Number of visits.
- `more_products` (boolean): true = more products than this list.
- `admin_url` (string<uri>): The page in the Tentary app.

## Example request

```bash
curl "https://api.tentary.com/v1/reports/visits?from=2026-10-24&to=2026-10-26" \
  -H "Authorization: Bearer $TENTARY_API_KEY"
```

## Example response

```json
{
  "from": "2026-10-24",
  "to": "2026-10-26",
  "group_by": "day",
  "product_id": null,
  "visits": 133,
  "periods": [
    {
      "period": "2026-10-24",
      "visits": 52
    },
    {
      "period": "2026-10-25",
      "visits": 36
    },
    {
      "period": "2026-10-26",
      "visits": 45
    }
  ],
  "products": [
    {
      "product_id": 102,
      "title": "Morning Yoga in 30 Days",
      "visits": 98
    },
    {
      "product_id": 101,
      "title": "Yoga Basics E-Book",
      "visits": 35
    }
  ],
  "more_products": false,
  "admin_url": "https://app.tentary.com/reports"
}
```
