# social.coves.community.list

> Published by [coves.social](https://lexicon.garden/identity/did:web:coves.social)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.list)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.list/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.list/examples)

## Definitions

### `social.coves.community.list`

**Type**: `query`

List communities with various sorting options. Authentication optional; viewer state will be included if authenticated.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `sort` | `string` | No | Sorting method |
| `limit` | `integer` | No |  |
| `cursor` | `string` | No | Pagination cursor |
| `category` | `string` | No | Filter by category |
| `language` | `string` (language) | No | Filter by language |
| `subscribed` | `boolean` | No | If true, only return communities the viewer is subscribed to. Requires authentication. |
| `visibility` | `string` | No | Filter communities by visibility level |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `communities` | `array` | Yes |  |

## Raw Schema

```json
{
  "id": "social.coves.community.list",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "communities"
          ],
          "properties": {
            "cursor": {
              "type": "string",
              "maxLength": 500
            },
            "communities": {
              "type": "array",
              "items": {
                "ref": "social.coves.community.defs#communityView",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "sort": {
            "type": "string",
            "default": "popular",
            "maxLength": 64,
            "description": "Sorting method",
            "knownValues": [
              "popular",
              "active",
              "new",
              "alphabetical"
            ]
          },
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1
          },
          "cursor": {
            "type": "string",
            "maxLength": 500,
            "description": "Pagination cursor"
          },
          "category": {
            "type": "string",
            "maxLength": 50,
            "description": "Filter by category"
          },
          "language": {
            "type": "string",
            "format": "language",
            "description": "Filter by language"
          },
          "subscribed": {
            "type": "boolean",
            "description": "If true, only return communities the viewer is subscribed to. Requires authentication."
          },
          "visibility": {
            "type": "string",
            "maxLength": 64,
            "description": "Filter communities by visibility level",
            "knownValues": [
              "public",
              "unlisted",
              "private"
            ]
          }
        }
      },
      "description": "List communities with various sorting options. Authentication optional; viewer state will be included if authenticated."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
