Searches for a single place by text query.
It calls discoverPlaces and returns the first result. It throws an error if no results are found.
The search query, or the full FuzzySearchParams without limit.
limit
The first matching place.
If no results are found for the query
const place = await discoverOnePlace('Vondelpark Amsterdam');console.log(place.properties.poi?.name);const nearby = await discoverOnePlace({ query: 'coffee', geoBias: { position: [4.9041, 52.3676] }, signal }); Copy
const place = await discoverOnePlace('Vondelpark Amsterdam');console.log(place.properties.poi?.name);const nearby = await discoverOnePlace({ query: 'coffee', geoBias: { position: [4.9041, 52.3676] }, signal });
Use it to quickly find a single place, particularly a POI. To find a single address, consider 'geocodeOne'.
Searches for a single place by text query.
It calls discoverPlaces and returns the first result. It throws an error if no results are found.