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

# Wards API

> Access ward data and demographics

# Wards API

Get information about South African wards including boundaries, demographics, and statistics.

## List Wards

```http theme={null}
GET /api/v1/wards
```

### Query Parameters

| Parameter      | Type   | Description                                |
| -------------- | ------ | ------------------------------------------ |
| `province`     | string | Filter by province code (e.g., `GP`, `WC`) |
| `municipality` | string | Filter by municipality code                |
| `limit`        | number | Results per page (default: 20, max: 100)   |
| `offset`       | number | Skip N results                             |

### Example Request

```bash theme={null}
curl -H "x-api-key: your_key" \
  "https://visita.co.za/api/v1/wards?province=GP&limit=10"
```

### Example Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "ward_code": "79700026",
      "ward_number": 26,
      "municipality_code": "ETH",
      "municipality_name": "eThekwini Metropolitan",
      "province": "KZN",
      "population": 12500,
      "councillor_name": "M. Nzimande",
      "councillor_party": "ANC"
    }
  ],
  "meta": {
    "total": 4468,
    "limit": 10,
    "offset": 0
  }
}
```

## Get Single Ward

```http theme={null}
GET /api/v1/wards/:ward_code
```

### Example

```bash theme={null}
curl -H "x-api-key: your_key" \
  "https://visita.co.za/api/v1/wards/79700026"
```

### Response

Returns detailed ward information including:

* Demographics (population, households)
* Current councillor
* Municipality details
* Weather summary
* Recent activity counts
