# at.protocube.listRecords

> List protocube records by tag (feed/tag pages, newest-indexed first) or by repository (author pages, descending record key).

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

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:it2qbdcai2lchnnnt3caynqx/at.protocube.listRecords)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:it2qbdcai2lchnnnt3caynqx/at.protocube.listRecords/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:it2qbdcai2lchnnnt3caynqx/at.protocube.listRecords/analytics)

## Query (`at.protocube.listRecords`)

Type: query · GET

### Parameters (query string)

- `collection` (string · nsid, required): at.protocube.walkthrough, at.protocube.series or at.protocube.path.
- `cursor` (string)
- `did` (string · did): Repository filter. Requires order=rkey and excludes tag.
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 20
- `order` (string): newest = indexed_at DESC, uri DESC. rkey = record key DESC for one repository.
  - Constraints: default: "newest", enum: newest | rkey
- `tag` (string): Full tag string, e.g. tag:protocube. Requires order=newest and excludes did.
  - Constraints: maxLength: 64

### Output (application/json)

- `cursor` (string)
- `records` (array, required)
  - `items` (ref)
    - Reference: `#recordView`

### Errors

- `InvalidRequest`: No description in schema.

## #recordView (`at.protocube.listRecords#recordView`)

Type: object

### Properties

- `cid` (string · cid, required)
- `uri` (string · at-uri, required)
- `value` (unknown, required): The raw record value. The AppView never flattens or rewrites it; the client validates it.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "List protocube records by tag (feed/tag pages, newest-indexed first) or by repository (author pages, descending record key).",
      "errors": [
        {
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "records": {
              "items": {
                "ref": "#recordView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "records"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "collection": {
            "description": "at.protocube.walkthrough, at.protocube.series or at.protocube.path.",
            "format": "nsid",
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "did": {
            "description": "Repository filter. Requires order=rkey and excludes tag.",
            "format": "did",
            "type": "string"
          },
          "limit": {
            "default": 20,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "order": {
            "default": "newest",
            "description": "newest = indexed_at DESC, uri DESC. rkey = record key DESC for one repository.",
            "enum": [
              "newest",
              "rkey"
            ],
            "type": "string"
          },
          "tag": {
            "description": "Full tag string, e.g. tag:protocube. Requires order=newest and excludes did.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "collection"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "recordView": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "value": {
          "description": "The raw record value. The AppView never flattens or rewrites it; the client validates it.",
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "cid",
        "value"
      ],
      "type": "object"
    }
  },
  "id": "at.protocube.listRecords",
  "lexicon": 1
}
```
