<!-- Stats API: Review Rating, Reply Rate and Reply Time · Prisma · https://prismareviews.com/docs/api-reference/stats -->
> GET /v1/stats and GET /v1/locations/{id}/stats: reviews, average rating, stars, reply rate, median reply time and a monthly series, per location or platform.

# Stats

The numbers agencies and multi-location teams put in their reports, computed from the reviews Prisma already has: how many reviews arrived, the average rating, reviews per star, how many got a reply and how fast, and which negative reviews are still unanswered. One call per workspace, location or platform, for any period. Stats are plain counts and averages: no AI, no extra calls to the platforms, and included in every plan.

## The stats object

```json
{
  "since": "2025-10-28T00:00:00.000Z",
  "until": "2026-10-28T00:00:00.000Z",
  "location_id": "loc_01KJ8P9W2C4D6F8G0H2J4K6M8N",
  "platform": null,
  "reviews": 214,
  "average_rating": 4.37,
  "ratings": { "1": 9, "2": 7, "3": 15, "4": 48, "5": 135 },
  "replied": 181,
  "reply_rate": 0.846,
  "median_reply_hours": 6.5,
  "unreplied_negative": 3,
  "by_month": [
    { "month": "2026-09", "reviews": 21, "average_rating": 4.43, "replied": 19 },
    { "month": "2026-10", "reviews": 18, "average_rating": 4.5, "replied": 15 }
  ]
}
```

| Field | Type | Description |
| --- | --- | --- |
| `since`, `until` | timestamp | The period, by when reviews were written on the platform (`created_at`). `since` is included, `until` is not. |
| `location_id`, `platform` | string \| null | The filters you sent, or `null`. |
| `reviews` | integer | Reviews written in the period. |
| `average_rating` | number \| null | Average of the 1–5 ratings, 2 decimals. Reviews without a rating are counted in `reviews` but not here. `null` without rated reviews. |
| `ratings` | object | Reviews per star, `"1"` to `"5"`. |
| `replied` | integer | Reviews with a published reply, whether you sent it through Prisma or answered on the platform. Queued and failed replies don't count. |
| `reply_rate` | number \| null | `replied / reviews`, from 0 to 1. `null` without reviews. |
| `median_reply_hours` | number \| null | Median time between a review and its reply, in hours, 1 decimal. `null` when there are no replies with a date. |
| `unreplied_negative` | integer | Reviews of 1 or 2 stars without a published reply: the ones to answer first. |
| `by_month` | array | One entry per calendar month (UTC) with reviews, oldest first: `month` (`YYYY-MM`), `reviews`, `average_rating`, `replied`. |

Stats only cover the reviews Prisma stores, so they start when you connected the location, plus the history each platform returns on the first check (see [Platforms](/docs/api-reference/platforms)), and follow your plan's retention.

## Get workspace stats

`GET /v1/stats`

Stats for every location of your workspace in the mode of your key. Test keys return stats of the sample reviews.

| Parameter | Description |
| --- | --- |
| `location_id` | Only this location. |
| `platform` | Only this platform, e.g. `google` or `app_store`. |
| `since` | Start of the period: a date (`2026-01-01`, midnight UTC) or an ISO 8601 timestamp with offset. Default: 12 months before `until`. |
| `until` | End of the period, not included. Default: now. |

```bash
curl "https://api.prismareviews.com/v1/stats?platform=google&since=2026-01-01" \
  -H "Authorization: Bearer $PRISMA_API_KEY"
```
```javascript
const res = await fetch("https://api.prismareviews.com/v1/stats?since=2026-01-01", {
  headers: { Authorization: "Bearer " + process.env.PRISMA_API_KEY },
});
const s = await res.json();
console.log(s.reviews, s.average_rating, s.reply_rate, s.unreplied_negative);
```
```python
import os
import requests

s = requests.get(
    "https://api.prismareviews.com/v1/stats",
    params={"since": "2026-01-01"},
    headers={"Authorization": f"Bearer {os.environ['PRISMA_API_KEY']}"},
    timeout=30,
).json()
print(s["reviews"], s["average_rating"], s["reply_rate"], s["unreplied_negative"])
```

Returns `200` with the stats object. `422 invalid_request` for an unknown `platform`, a `since` or `until` that can't be read, or a `since` that isn't earlier than `until`.

## Get a location's stats

`GET /v1/locations/{id}/stats`

The same object for one location, with `since` and `until` as above. `404 resource_not_found` if there is no location with that ID in your workspace and mode.

```bash
curl "https://api.prismareviews.com/v1/locations/loc_01KJ8P9W2C4D6F8G0H2J4K6M8N/stats?since=2026-01-01" \
  -H "Authorization: Bearer $PRISMA_API_KEY"
```

To build a report for every client or store, list your [locations](/docs/api-reference/locations) and call this endpoint for each one, or call `GET /v1/stats` once per platform.
