> ## 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.

# API Introduction

> Programmatic access to Visita's civic intelligence data

# API Introduction

Build applications on top of Visita's ward intelligence, directory, and tender data.

## Base URL

```
https://visita.co.za/api/v1
```

## Authentication

All API requests require an API key passed in the header:

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

<Info>
  Get your API key from your account settings at `visita.co.za/account`
</Info>

## Rate Limits

| Tier           | Requests/Month | Cost       |
| -------------- | -------------- | ---------- |
| **Free**       | 1,000          | Free       |
| **Starter**    | 10,000         | R99/month  |
| **Pro**        | 100,000        | R499/month |
| **Enterprise** | Unlimited      | Contact us |

## Available Endpoints

<CardGroup cols={2}>
  <Card title="Wards" icon="map" href="/api/wards">
    Get ward information, boundaries, and demographics
  </Card>

  <Card title="Directory" icon="building" href="/api/directory">
    Search businesses and government entities
  </Card>

  <Card title="Tenders" icon="file-contract" href="/api/tenders">
    Access active tenders and procurement data
  </Card>
</CardGroup>

## Response Format

All endpoints return JSON:

```json theme={null}
{
  "success": true,
  "data": [...],
  "meta": {
    "total": 100,
    "page": 1,
    "limit": 20
  }
}
```

## Error Handling

| Code  | Meaning                    |
| ----- | -------------------------- |
| `401` | Invalid or missing API key |
| `403` | Tier limit exceeded        |
| `429` | Rate limited               |
| `500` | Server error               |
