> ## Documentation Index
> Fetch the complete documentation index at: https://birdeye-0229a3ce-responsetools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Review and Rating By Location

> Compare review volume and average rating across business locations.

```
get_review_and_rating_by_location
```

## Description

Returns review count and average rating for each location. Use it to find the highest-rated, lowest-rated, most-reviewed, or least-reviewed branches.

## Parameters

| Parameter         | Type           | Required | Default                               | Description                                           |
| ----------------- | -------------- | -------- | ------------------------------------- | ----------------------------------------------------- |
| `startDate`       | string         | No       | —                                     | Start date in `MM/DD/YYYY` format                     |
| `endDate`         | string         | No       | —                                     | End date in `MM/DD/YYYY` format                       |
| `days`            | integer        | No       | —                                     | Relative window in days                               |
| `months`          | integer        | No       | 12 months when no period is requested | Relative window in months                             |
| `sourceAliases`   | list\[string]  | No       | All sources                           | Review sources to include                             |
| `businessNumbers` | list\[integer] | No       | All locations                         | Location IDs to include                               |
| `sortBy`          | string         | No       | `"avg-rating"`                        | Sort by `"review-count"`, `"avg-rating"`, or `"name"` |
| `sortOrder`       | integer        | No       | `1`                                   | `0` for ascending or `1` for descending               |

## Example Usage

```
Which location had the lowest average rating this year?
```

## Example Response

```json theme={null}
{
  "page": 0,
  "size": 2147483647,
  "totalPages": 1,
  "totalCount": 307,
  "averageRating": 4.7,
  "selectedRangeLabel": "01/01/2026 to 08/18/2026",
  "dateDiff": 230,
  "dataPoints": [
    {
      "label": "Total",
      "totalCount": 307,
      "count": 307,
      "averageRating": 4.7,
      "nonZeroCount": 298,
      "reviewGrowthPercent": 100,
      "avgRatingGrowthPercent": 100,
      "prevCount": 0,
      "prevAverageRating": 0
    },
    {
      "nodeId": 78902,
      "label": "Acme Dental - Westlake",
      "count": 121,
      "averageRating": 4.4,
      "nonZeroCount": 118,
      "businessNumber": 78902
    }
  ],
  "lowestRated": {
    "label": "Acme Dental - Westlake",
    "count": 121,
    "averageRating": 4.4,
    "businessNumber": 78902
  },
  "highestRated": {
    "label": "Acme Dental - Downtown",
    "count": 186,
    "averageRating": 4.8,
    "businessNumber": 78901
  }
}
```

## Response Fields

| Field                             | Description                                                                                                                                                                              |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dataPoints`                      | One entry per location (plus a `"Total"` rollup entry), each with `label` (location name), `businessNumber`, `count`, `averageRating`, and growth fields vs. any prior comparison window |
| `lowestRated` / `highestRated`    | Convenience fields with the extreme location for the requested sort — cheaper than re-deriving from `dataPoints` when only the extremes are needed                                       |
| `averageRating` / `totalCount`    | Account-wide average rating and review count across the returned locations                                                                                                               |
| `page` / `size` / `totalPages`    | Pagination info. `size` was observed as the maximum 32-bit integer (effectively unpaginated) rather than a real page size                                                                |
| `selectedRangeLabel` / `dateDiff` | The resolved date range actually applied and its length in days                                                                                                                          |

## Notes

* For the highest or lowest result, choose `sortBy` and `sortOrder` in the tool call and use the first returned location, or read `lowestRated`/`highestRated` directly.
* The location name field is `label` (inside `dataPoints`) and the location ID field is `businessNumber` — not `milestone`/`businessId` as used by the sibling by-source and by-time report tools. No `state` field is present.
* **Calling with a relative window (e.g. `days: 30`) and no `businessNumbers` returned a `500` error** in testing on an account with many locations. The same request scoped with `businessNumbers` succeeded. Prefer passing `businessNumbers` when scoping this report on large accounts.
* On accounts with many locations, an unscoped call can return a very large `dataPoints` array. Pass `businessNumbers` to keep the response manageable.
* Use [`get_review_and_rating_over_time`](/mcp/tools/reports/get-review-and-rating-over-time) for trends.
