---
title: "Get map statistics"
description: "Aggregates across approved, non-disputed spots. Used by the public map's insights panel."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.deathspot.org/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Deathspot UG API › Insights

`GET /api/stats`

Aggregates across approved, non-disputed spots. Used by the public map's insights panel.

## Code samples

### cURL

```curl
curl --request GET \
  --url https://deathspot.org/api/stats
```

### TypeScript

```typescript
const url = 'https://deathspot.org/api/stats';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://deathspot.org/api/stats"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Statistics.

#### Example

```json
{
  "totals": {
    "total": 21,
    "confirmed": 21,
    "unverified": 0,
    "this_week": 0
  },
  "byCategory": [
    {
      "category": "robbery",
      "count": 16
    },
    {
      "category": "boda_gang",
      "count": 4
    },
    {
      "category": "murder",
      "count": 1
    }
  ],
  "byArea": [
    {
      "area": "Kira, Wakiso",
      "count": 4,
      "max_severity": 4
    },
    {
      "area": "Rubaga",
      "count": 3,
      "max_severity": 3
    }
  ]
}
```

- `getStats.response.200.totals` (object, required)
  - `getStats.response.200.totals.total` (integer, required) — Approved spots on the map.
  - `getStats.response.200.totals.confirmed` (integer, required) — Community-confirmed or moderator-verified spots.
  - `getStats.response.200.totals.unverified` (integer, required)
  - `getStats.response.200.totals.this_week` (integer, required) — Spots reported through the app in the last 7 days (excluding seed data).
- `getStats.response.200.byCategory` (array<object>, required)
  - `getStats.response.200.byCategory.category` (string, required) — What happens at the spot: `murder` (killing), `mob_action`, `boda_gang`, `robbery` (robbery or snatching), `stabbing` (stabbing or hacking), `kidnapping`, `other`.
    - one of `"murder"`, `"mob_action"`, `"boda_gang"`, `"robbery"`, `"stabbing"`, `"kidnapping"`, `"other"`
  - `getStats.response.200.byCategory.count` (integer, required)
- `getStats.response.200.byArea` (array<object>, required) — The 8 areas with the most spots.
  - `getStats.response.200.byArea.area` (string, required)
  - `getStats.response.200.byArea.count` (integer, required)
  - `getStats.response.200.byArea.max_severity` (integer, required)
    - min 1; max 5

### 429

The caller exceeded a rate limit. Wait `Retry-After` seconds before retrying.

#### Example

```json
{
  "error": "You have reported a lot of spots recently. Please try again in an hour."
}
```

- `getStats.response.429.error` (string, required) — A human-readable message you can show to users.

### 500

Unexpected server error, usually because the database is unreachable.

#### Example

```text
string
```


Source: https://docs.deathspot.org/api/Insights/getStats/index.md
