Analytics

Reviews: stars over a window, per review page

The reviews a keyword collects (App Store, Google Play, Trustpilot, Google Maps): count, average stars, distribution, replies and open 1-2 star reviews, for the workspace and per review page with a series of average stars per `bucket`, plus the tags the unhappy reviews carry. A review matched by two keywords counts once. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.

GET
/v1/analytics/reviews
AuthorizationBearer <token>

API key minted via POST /v1/api-keys (format mk_live_...)

In: header

Query Parameters

range?string

Preset window ending today. Ignored when from or to is given. Default 30d.

Value in"7d" | "30d" | "90d" | "365d"
from?string

First day, YYYY-MM-DD, inclusive, in timezone.

Match^\d{4}-\d{2}-\d{2}$
to?string

Last day, YYYY-MM-DD, inclusive, in timezone. Default today.

Match^\d{4}-\d{2}-\d{2}$
keywordIds?|null

Only these keyword ids. Repeatable, or comma-separated; omit for every keyword.

Itemsitems <= 50
platforms?array<string>

Only these platforms. Repeatable, or comma-separated; omit for every platform.

Itemsitems <= 20
compare?boolean

true adds the period of the same length right before the window as previous.

timezone?string

IANA zone the days are cut in (Europe/Madrid). Default UTC. One offset, the zone's at the end of the window, applies to the whole window.

Lengthlength <= 64
bucket?string

Series bucket: day (default up to 90 days) or week.

Value in"day" | "week"

Response Body

application/json

application/json

application/json

curl -X GET "https://api.mentio.dev/v1/analytics/reviews"
{
  "window": {
    "from": "string",
    "to": "string",
    "days": 0,
    "timezone": "string",
    "bucket": "day"
  },
  "totals": {
    "reviews": 0,
    "averageRating": 1,
    "distribution": {
      "1": 0,
      "2": 0,
      "3": 0,
      "4": 0,
      "5": 0
    },
    "responded": 0,
    "openNegative": 0
  },
  "tags": [
    {
      "tag": "string",
      "count": 0
    }
  ],
  "pages": [
    {
      "reviews": 0,
      "averageRating": 1,
      "distribution": {
        "1": 0,
        "2": 0,
        "3": 0,
        "4": 0,
        "5": 0
      },
      "responded": 0,
      "openNegative": 0,
      "platform": "appstore",
      "id": "string",
      "url": "string",
      "series": [
        {
          "date": "string",
          "reviews": 0,
          "averageRating": 1
        }
      ],
      "previous": {
        "reviews": 0,
        "averageRating": 1
      }
    }
  ],
  "previous": {
    "reviews": 0,
    "averageRating": 1,
    "distribution": {
      "1": 0,
      "2": 0,
      "3": 0,
      "4": 0,
      "5": 0
    },
    "responded": 0,
    "openNegative": 0
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}