# social.grain.unspecced.listGroups

> Groups worth browsing, most recently active first. With `gallery`, each group carries the viewer's standing for that gallery.

- Kind: query
- Authority: unspecced.grain.social
- Lexicon: 1
- Published by [grain.social](https://lexicon.garden/identity/did:plc:e7rftrdyz5e2rw4y6ocszew2), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.listGroups)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.listGroups/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.listGroups/analytics)

## Query (`social.grain.unspecced.listGroups`)

Type: query · GET

### Parameters (query string)

- `cursor` (string)
- `gallery` (string · at-uri)
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 50

### Output (application/json)

- `cursor` (string)
- `groups` (array, required)
  - `items` (ref)
    - Reference: `social.grain.group.defs#groupView`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Groups worth browsing, most recently active first. With `gallery`, each group carries the viewer's standing for that gallery.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "groups": {
              "items": {
                "ref": "social.grain.group.defs#groupView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "groups"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "type": "string"
          },
          "gallery": {
            "format": "at-uri",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.grain.unspecced.listGroups",
  "lexicon": 1
}
```
