# social.grain.unspecced.getCameras

> Get top cameras by photo count.

- 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.getCameras)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getCameras/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getCameras/analytics)

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

Type: query · GET

### Output (application/json)

- `cameras` (array)
  - `items` (ref)
    - Reference: `social.grain.unspecced.getCameras#cameraItem`

## #cameraItem (`social.grain.unspecced.getCameras#cameraItem`)

Type: object

### Properties

- `camera` (string, required)
- `photoCount` (integer, required)
- `thumbs` (array): Up to four representative photo thumbnails, most recent first. Lets the index render without a feed request per camera.
  - Constraints: maxLength: 4
  - `items` (string · uri)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "cameraItem": {
      "properties": {
        "camera": {
          "type": "string"
        },
        "photoCount": {
          "type": "integer"
        },
        "thumbs": {
          "description": "Up to four representative photo thumbnails, most recent first. Lets the index render without a feed request per camera.",
          "items": {
            "format": "uri",
            "type": "string"
          },
          "maxLength": 4,
          "type": "array"
        }
      },
      "required": [
        "camera",
        "photoCount"
      ],
      "type": "object"
    },
    "main": {
      "description": "Get top cameras by photo count.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cameras": {
              "items": {
                "ref": "social.grain.unspecced.getCameras#cameraItem",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "type": "query"
    }
  },
  "id": "social.grain.unspecced.getCameras",
  "lexicon": 1
}
```
