# social.grain.gallery.getLocations

> Get top locations by gallery count.

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

## Query (`social.grain.gallery.getLocations`)

Type: query · GET

### Parameters (query string)

- `pins` (boolean): Return every place carrying only what a map needs — name, h3Index, galleryCount — instead of the top 30 with thumbnails and cell lists. The full shape is ~1.1KB per place, so all of them would be ~780KB; lean it is ~70 bytes each.

### Output (application/json)

- `locations` (array)
  - `items` (ref)
    - Reference: `social.grain.gallery.defs#locationItem`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get top locations by gallery count.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "locations": {
              "items": {
                "ref": "social.grain.gallery.defs#locationItem",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "pins": {
            "description": "Return every place carrying only what a map needs — name, h3Index, galleryCount — instead of the top 30 with thumbnails and cell lists. The full shape is ~1.1KB per place, so all of them would be ~780KB; lean it is ~70 bytes each.",
            "type": "boolean"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.grain.gallery.getLocations",
  "lexicon": 1
}
```
