# app.citylore.discover.searchTours

> Public tours that start in an area, nearest first. Apps round the point to two decimals (about a kilometre) and sort by exact distance on the device, so a walker's position never reaches the service.

- Kind: query
- Authority: discover.citylore.app
- Lexicon: 1
- Published by [citylore.app](https://lexicon.garden/identity/did:plc:yyhpdzesw2vzyuptd54i26dj), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yyhpdzesw2vzyuptd54i26dj/app.citylore.discover.searchTours)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yyhpdzesw2vzyuptd54i26dj/app.citylore.discover.searchTours/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yyhpdzesw2vzyuptd54i26dj/app.citylore.discover.searchTours/analytics)

## Query (`app.citylore.discover.searchTours`)

Type: query · GET

### Parameters (query string)

- `cursor` (string)
  - Constraints: maxLength: 256
- `lat` (string, required): Latitude, rounded to two decimals.
  - Constraints: maxLength: 16
- `layer` (string): Only tours that offer this way to play.
  - Constraints: maxLength: 32, knownValues: narrated | hunt
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 30
- `lng` (string, required): Longitude, rounded to two decimals.
  - Constraints: maxLength: 16
- `loop` (boolean): Only tours that end where they start.
- `maxMinutes` (integer): Only tours that take at most this long.
  - Constraints: minimum: 10
- `radiusKm` (integer)
  - Constraints: minimum: 1, maximum: 50, default: 10

### Output (application/json)

- `cursor` (string)
  - Constraints: maxLength: 256
- `tours` (array, required)
  - `items` (ref)
    - Reference: `app.citylore.discover.defs#tourView`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Public tours that start in an area, nearest first. Apps round the point to two decimals (about a kilometre) and sort by exact distance on the device, so a walker's position never reaches the service.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "maxLength": 256,
              "type": "string"
            },
            "tours": {
              "items": {
                "ref": "app.citylore.discover.defs#tourView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "tours"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "maxLength": 256,
            "type": "string"
          },
          "lat": {
            "description": "Latitude, rounded to two decimals.",
            "maxLength": 16,
            "type": "string"
          },
          "layer": {
            "description": "Only tours that offer this way to play.",
            "knownValues": [
              "narrated",
              "hunt"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "limit": {
            "default": 30,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "lng": {
            "description": "Longitude, rounded to two decimals.",
            "maxLength": 16,
            "type": "string"
          },
          "loop": {
            "description": "Only tours that end where they start.",
            "type": "boolean"
          },
          "maxMinutes": {
            "description": "Only tours that take at most this long.",
            "minimum": 10,
            "type": "integer"
          },
          "radiusKm": {
            "default": 10,
            "maximum": 50,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "lat",
          "lng"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "app.citylore.discover.searchTours",
  "lexicon": 1
}
```
