# Search clubs by name

`GET /api/club/search`

Case-insensitive partial match on club name against the most recently imported monthly club snapshot of the current fiscal year. Results are ordered by club name.

**Query parameters**

- `q` (string, required): Part of the club name (2-100 characters)
- `district` (string, optional): Only return clubs in this district
- `limit` (integer, optional, default 20)
- `offset` (integer, optional, default 0): Number of records to skip

**Returns**

- `success` (boolean)
- `data` (array of objects)
  - `club_number` (string): Club number without leading zeros
  - `club_name` (nullable string)
  - `district` (nullable string)
  - `division` (nullable string)
  - `area` (nullable string)
  - `club_status` (nullable string)
- `pagination` (object): Pagination returned by member-payments endpoints. total is the total matching records.
  - `total` (integer): Total matching records
  - `limit` (integer): Number of records per page
  - `offset` (integer): Number of records to skip
  - `has_more` (boolean): Whether there are more records available
- `filters` (object)
- `timestamp` (timestamp)

**Errors**

- `422`: Invalid search query
- `500`: Internal server error

**Example request**

```bash
curl "https://tm-api.devinpearson.me/api/club/search?q=toast"
```

**Example response**

```json
{
  "success": true,
  "data": [
    {
      "club_number": "113",
      "club_name": "Example Toastmasters Club",
      "district": "74",
      "division": "A",
      "area": "01",
      "club_status": "string"
    }
  ],
  "pagination": {
    "total": 0,
    "limit": 0,
    "offset": 0,
    "has_more": true
  },
  "filters": {},
  "timestamp": "2026-11-19T04:30:00.000Z"
}
```
