# pub.chive.collection.get

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.get)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.get/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.get/examples)

## Definitions

### `pub.chive.collection.get`

**Type**: `query`

Get a single collection by its AT-URI

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` | Yes | AT-URI of the collection |
| `excludeSubcollectionItems` | `boolean` | No | When true, exclude items that also appear in subcollections |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `items` | `array` | Yes | Items contained in the collection |
| `collection` | `ref` → `pub.chive.collection.defs#collectionView` | Yes | The requested collection |
| `interItemEdges` | `array` | Yes | Edges between items within this collection |
| `subcollections` | `array` | Yes | Child subcollections |

## Raw Schema

```json
{
  "id": "pub.chive.collection.get",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "collection",
            "items",
            "subcollections",
            "interItemEdges"
          ],
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "ref": "pub.chive.collection.defs#collectionItemView",
                "type": "ref"
              },
              "description": "Items contained in the collection"
            },
            "collection": {
              "ref": "pub.chive.collection.defs#collectionView",
              "type": "ref",
              "description": "The requested collection"
            },
            "interItemEdges": {
              "type": "array",
              "items": {
                "ref": "pub.chive.collection.defs#interItemEdgeView",
                "type": "ref"
              },
              "description": "Edges between items within this collection"
            },
            "subcollections": {
              "type": "array",
              "items": {
                "ref": "pub.chive.collection.defs#collectionView",
                "type": "ref"
              },
              "description": "Child subcollections"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "description": "AT-URI of the collection"
          },
          "excludeSubcollectionItems": {
            "type": "boolean",
            "description": "When true, exclude items that also appear in subcollections"
          }
        }
      },
      "description": "Get a single collection by its AT-URI"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
