---
title: "enrich with nearby places · RUAL Documentation"
description: "Adds the nearest place per category to every item in a list, in one call : no iterator needed. The usual pipeline is: query your objects, run this block…"
canonical: https://docs.rual.nl/block-types/places/places_enrich
language: en
---

# enrich with nearby places

This block is part of the [`places`](https://docs.rual.nl/block-types/places) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Adds the nearest place per category to every item in a list, in one call : no iterator needed. The usual pipeline is: query your objects, run this block, then write the result back with a mutation. After that an ordinary range query filters on the stored distance, so no further lookups are needed. Each item gets `{distance_m, name, id, count}` per category under `output path`. Items are copied, never modified in place, and every item is returned whether or not it had a usable coordinate.

- items required `v15.0.0` `array` The list to process. Either an array of geo points, or an array of objects with `point path` naming where the coordinate sits.

- point path `v15.0.0` `value` Dotted path to the geo point inside each item, e.g. `general.location`. Leave empty when the items are geo points themselves.

- categories required `v15.0.0` `array` Category groups to measure, as an array or a comma-separated list. Required : this is what gets measured.

- max distance (m) `v15.0.0` `number` Ignore places beyond this distance. Empty searches without a limit, so every item gets a distance however far away the nearest place is.

- count radius (m) `v15.0.0` `number` Radius used for the per-category `count` field. Empty counts everything the lookup returned.

- include `v15.0.0` `array` Which fields to write per category: `distance`, `name`, `id`, `count`. Empty writes them all.

- output path `v15.0.0` `value` Where to write the result on each item. Empty uses `places`.

- items `v15.0.0` `array` The items, each with the enrichment added. Same order and same length as the input.

- count `v15.0.0` `number` Number of items returned.

- unresolved `v15.0.0` `number` Items that had no usable coordinate. They are still returned, just not enriched : check this before trusting a write-back.

- success `v15.0.0` `condition` True when the query ran. An empty result is still a success.

- error `v15.0.0` `value` Error code when the query could not run: `PLACES_NOT_AVAILABLE`, `CATEGORIES_REQUIRED`.

### Core Releases
