# Nearby card

> Canonical HTML: https://screenrig.ai/docs/cards/nearby/

What is around the screen: a featured place with its walk time and photo, the closest places by walk and today's events nearby.

Category: Public information. Tags: Wayfinding and directories, Lobbies and reception.

## Previews

![Nearby](/cards/nearby/v1/screenshots/canvas-bloom.webp?sha=8048b215e727159e34e1154d6bc64e7ea3f0cfd96af29bbe6a3110b12116e55d)

Canvas

![Nearby](/cards/nearby/v1/screenshots/corner-bloom.webp?sha=5c4e51f5b01d09c1b25bd48f01f0f2a48d840ce54aeca5ffc8d7c9ed912a71fe)

Corner

![Nearby](/cards/nearby/v1/screenshots/chip-bloom.webp?sha=b79f70cf89e56351877999c0ea367a1d6d2aca591a3bd7ec93bf6fc8d3421e1c)

Chip

## Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

[Card views, themes and publishing](/docs/cards/). [Browse the gallery](/apps/#cards).

## Data and privacy

Feed: `screenrig.nearby/v1`.

Feed documents carry source attribution. The Player supplies the feed to the card.

## Properties

For theme, background, accent and position, see [Common properties](/docs/cards/#common-properties).

Set static properties in `params`. Bind `data` to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in `params`. Nested rows describe the contents of their parent property.

### Static properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `title` | string | `"Nearby"` | maxLength: `40` |  |
| `area` | string | `""` | maxLength: `40` | The neighbourhood's name, when the feed carries none. |
| `show` | string | `"both"` | `"both"`, `"places"`, `"events"` | What to list: places and events, or one of them. |
| `count` | integer | `5` | minimum: `2`; maximum: `8` | Most rows in each of the places and events lists. |
| `windowHours` | integer | `12` | minimum: `1`; maximum: `48` | Events starting later than this are left out. |
| `walkMetersPerMin` | integer | `80` | minimum: `40`; maximum: `120` | Walking pace for a distance without a walk time. |
| `units` | string | `"metric"` | `"metric"`, `"imperial"` | metric: m and km. imperial: ft and mi. |
| `staleMinutes` | integer | `30` | minimum: `1`; maximum: `1440` |  |
| `hour12` | boolean | `false` |  |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `places` | array | `[]` | minItems: `0`; maxItems: `60` | Places near the screen. A feed (screenrig.nearby/v1) wins when present; the data store supplies the same rows otherwise. |
| `places[].id` | string |  | maxLength: `40` |  |
| `places[].name` | string |  | minLength: `1`; maxLength: `50`; Required |  |
| `places[].category` | string |  | maxLength: `30` | For example Coffee, Restaurant, Pharmacy, Park. |
| `places[].walkMin` | number |  | minimum: `0`; maximum: `240` |  |
| `places[].distanceM` | number |  | minimum: `0`; maximum: `20000` |  |
| `places[].rating` | number |  | minimum: `0`; maximum: `5` |  |
| `places[].priceLevel` | integer |  | minimum: `1`; maximum: `4` |  |
| `places[].open` | boolean |  |  |  |
| `places[].opensAt` | string |  | maxLength: `32` | ISO 8601; the next opening, when closed. |
| `places[].closesAt` | string |  | maxLength: `32` | ISO 8601; today's closing time. |
| `places[].photo` | string |  | maxLength: `120` | A media reference (media:<id>). |
| `places[].featured` | boolean | `false` |  |  |
| `events` | array | `[]` | minItems: `0`; maxItems: `60` | Events near the screen. A feed wins when present; the data store supplies the same rows otherwise. |
| `events[].id` | string |  | maxLength: `40` |  |
| `events[].title` | string |  | minLength: `1`; maxLength: `80`; Required |  |
| `events[].venue` | string |  | maxLength: `50` |  |
| `events[].category` | string |  | maxLength: `30` |  |
| `events[].start` | string |  | maxLength: `32`; Required | ISO 8601. |
| `events[].end` | string |  | maxLength: `32` | ISO 8601. |
| `events[].walkMin` | number |  | minimum: `0`; maximum: `240` |  |
| `events[].distanceM` | number |  | minimum: `0`; maximum: `20000` |  |
| `events[].free` | boolean |  |  |  |
| `events[].photo` | string |  | maxLength: `120` | A media reference (media:<id>). |
| `updated` | string | `""` | maxLength: `32` | When the data was fetched, ISO 8601 (data store only; a feed carries fetchedAt). |

## Canvas example

Add this item to a playlist page’s `primitives`. [Publish the playlist and assign a screen](/docs/cards/#publish-a-card-canvas).

```json
{
  "id": "nearby",
  "primitive": "card",
  "card": "nearby",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "nearby-main"
}
```

## Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see [API authentication](/docs/authentication/).

```console
curl --request PUT "https://api.screenrig.ai/api/card-data/nearby-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"places":[],"events":[],"updated":""}}'
```
