# page.cavu.getShelf

> The open shelf: every renderable book the appview has indexed, newest first (record keys are TIDs, so newest means most recently created). The index is fed network-wide from the firehose; any repo's book appears once its spine resolves to content the reader can render.

- Kind: query
- Authority: cavu.page
- Lexicon: 1
- Published by [cavu.page](https://lexicon.garden/identity/did:plc:citulkqjdzbnf7wd5xb6lled), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:citulkqjdzbnf7wd5xb6lled/page.cavu.getShelf)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:citulkqjdzbnf7wd5xb6lled/page.cavu.getShelf/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:citulkqjdzbnf7wd5xb6lled/page.cavu.getShelf/analytics)

## Query (`page.cavu.getShelf`)

Type: query · GET

### Parameters (query string)

- `author` (string · did): Restrict the shelf to books published from this repo.
- `cursor` (string): Opaque pagination cursor from a previous response.
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 50

### Output (application/json)

- `books` (array, required)
  - `items` (ref)
    - Reference: `page.cavu.defs#bookView`
- `cursor` (string): Pass back to fetch the next page; absent on the last page.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The open shelf: every renderable book the appview has indexed, newest first (record keys are TIDs, so newest means most recently created). The index is fed network-wide from the firehose; any repo's book appears once its spine resolves to content the reader can render.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "books": {
              "items": {
                "ref": "page.cavu.defs#bookView",
                "type": "ref"
              },
              "type": "array"
            },
            "cursor": {
              "description": "Pass back to fetch the next page; absent on the last page.",
              "type": "string"
            }
          },
          "required": [
            "books"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "author": {
            "description": "Restrict the shelf to books published from this repo.",
            "format": "did",
            "type": "string"
          },
          "cursor": {
            "description": "Opaque pagination cursor from a previous response.",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "page.cavu.getShelf",
  "lexicon": 1
}
```
