# Route Spec

## Route ID
`search-hubs`

## Endpoint
`GET /api/v1/search/hubs`

## Human Description
Searches hubs by name and returns recommended hubs when `q` is empty, including active user count.

## Authentication
- Required: `yes`

## Request
### Query Parameters
- `q` (`string`, optional)
- `cursor` (`string`, optional)
- `limit` (`number`, optional, default `20`, max `50`)

## Responses
### Success: `200 OK`
```json
{
  "success": true,
  "message": "Hub search results loaded",
  "data": {
    "items": [
      {"id": "hub_1", "name": "Cairo Startups", "activeUsers24h": 1390, "isRecommended": true}
    ],
    "nextCursor": null
  }
}
```

### Error: `401 Unauthorized`
When returned:
- Missing or invalid access token.

Body:
```json
{"success": false, "error": {"code": "UNAUTHORIZED", "message": "Authentication required.", "details": {}}}
```

## Data & Caching Dependencies
- **Spanner Tables:** `hubs (Read/Search Index)`
- **Redis Cache:** `None`
- **GCS Storage:** `None`
- **Edge Cache (CDN):** `No`

## Side Effects
- None (read-only endpoint).
