# buzz.bookhive.listGenres

> Published by [bookhive.buzz](https://lexicon.garden/identity/did:plc:enu2j5xjlqsjaylv3du4myh4)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.listGenres)
- [Documentation](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.listGenres/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.listGenres/examples)

## Definitions

### `buzz.bookhive.listGenres`

**Type**: `query`

List genres with book counts. Does not require authentication.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum number of genres to return |
| `offset` | `integer` | No | Offset for pagination |
| `minBooks` | `integer` | No | Only return genres with at least this many books |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `genres` | `array` | Yes |  |
| `offset` | `integer` | No | Next offset for pagination |

### `buzz.bookhive.listGenres#genreWithCount`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | Yes | Number of books in this genre |
| `genre` | `string` | Yes | Genre name |

## Raw Schema

```json
{
  "id": "buzz.bookhive.listGenres",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "genres"
          ],
          "properties": {
            "genres": {
              "type": "array",
              "items": {
                "ref": "#genreWithCount",
                "type": "ref"
              }
            },
            "offset": {
              "type": "integer",
              "description": "Next offset for pagination"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum number of genres to return"
          },
          "offset": {
            "type": "integer",
            "description": "Offset for pagination"
          },
          "minBooks": {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "description": "Only return genres with at least this many books"
          }
        }
      },
      "description": "List genres with book counts. Does not require authentication."
    },
    "genreWithCount": {
      "type": "object",
      "required": [
        "genre",
        "count"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "description": "Number of books in this genre"
        },
        "genre": {
          "type": "string",
          "description": "Genre name"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
