nearby_places
Find places near a point, nearest first with distance in metres — by category (cafes, fuel, EV charging, parking), by name or brand ("the nearest Lloyds bank", "nearest Sainsbury's"), or both. Use this instead of geocode whenever the question is about what is NEAR a location: geocode ranks a brand's branches everywhere and only biases by proximity, so it will happily return a Lloyds in another city over the one 100 m away. Provide lat, lon and at least one of category or name. category is matched against the map's lowercased OSM tag values (amenity/shop/tourism/…), e.g. "cafe", "fuel", "charging_station", "parking", "pharmacy", "supermarket", "hotel", "restaurant", "fast_food", "atm", "bakery", "hospital", "station"; common colloquial names are normalised ("coffee" -> cafe, "ev_charging" -> charging_station, "petrol" -> fuel, "chemist" -> pharmacy). name matches the place's name or alternative names word by word, case- and accent-insensitively, with the last word also matching as a prefix. Combine the two to disambiguate a brand — "Lloyds" plus "bank" excludes Lloyds Pharmacy. A category or name the map does not carry returns an empty list, never an error. Optional radius_m (default 2500, max 100000) bounds the straight-line search distance and limit (default 5, max 10) the result count. Each result has name, one-line label, lat/lon, address parts, distance_m, categories and a details object of display tags (opening_hours, website, phone, ...) when the map carries them. Every result also carries bearing_deg and a spoken direction. Pass heading_deg (degrees clockwise from true north, 0 = north, 90 = east) and results are described from where the user stands — "ahead and slightly to your right, about 80 metres" — with a signed relative_bearing_deg (negative left, positive right); without a heading the phrasing falls back to cardinals ("to the north-east"), so this works with or without a compass. Add fov_deg to keep only what lies within that cone of the heading — it is the FULL width of the cone, so 90 keeps what lies within 45 degrees either side of dead ahead; anything dropped is counted in out_of_view, so a non-zero count means there ARE matching places nearby, just not in front of the user — say that rather than "nothing nearby". Prefer reading direction aloud over coordinates. Requires the MapMap gateway (GATEWAY_URL + GATEWAY_API_KEY).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | Latitude of the search point in decimal degrees (−90 to 90). | |
| lon | Yes | Longitude of the search point in decimal degrees (−180 to 180). | |
| name | No | The name or brand of the place to find — "Lloyds", "Lloyds Bank", "Sainsbury's" — for "where is the nearest X" questions. Every word must appear in the place's name or one of its alternative names, case- and accent-insensitively, with the last word also matching as a prefix ("Sains" finds Sainsbury's). Combine with `category` to disambiguate a brand used by more than one kind of place ("Lloyds" plus "bank" excludes Lloyds Pharmacy). Optional when `category` is given; at least one of the two is required. | |
| limit | No | Maximum number of results (1–10, default 5). | |
| fov_deg | No | Field of view: the full width in degrees of a cone centred on `heading_deg`, outside which results are dropped — it is the FULL width, so 90 keeps only what lies within 45 degrees either side of dead ahead. Needs `heading_deg` — a cone has to point somewhere. The count of results removed is reported as `out_of_view`. | |
| category | No | The kind of place to find. The gateway matches it against the index's lowercased OSM tag values (the value of the POI's `amenity`/`shop`/`tourism`/`railway`/… tag) — e.g. "cafe", "fuel", "charging_station", "parking", "pharmacy", "supermarket", "hotel", "restaurant", "fast_food", "atm", "bakery", "hospital", "station" — and normalises common colloquial names first ("coffee" → cafe; "ev_charging", "ev charging" → charging_station; "petrol" → fuel; "chemist" → pharmacy). A category the index does not carry matches nothing: the result is an empty list, not an error. Optional when `name` is given; at least one of the two is required. | |
| radius_m | No | Maximum straight-line distance of any result from the point, in metres (1–100000, default 2500). | |
| heading_deg | No | Which way the user is facing, in degrees **clockwise from true north** (0 = north, 90 = east, 180 = south, 270 = west). Supply it and every result is also described from the user's point of view ("just ahead on your right"); omit it and results fall back to cardinal directions ("to the north-east"), so the tool works with or without a compass. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | Matching places, nearest first. Empty when the index has no such place within the radius. | |
| out_of_view | No | How many otherwise-matching places were dropped for falling outside `fov_deg`. Non-zero means there are matching places near the user that are simply not in front of them — say so rather than reporting nothing nearby. Always 0 when no field of view was set. |