The matching places.
The search service provides POI (Points of Interest) search, address search, geographic area search, category-based filtering and position-based relevance ranking. Results are ranked by relevance with scores and optional distances.
// Free-text search near a location
const results = await discoverPlaces({
query: 'pizza restaurant',
geoBias: { position: [4.9041, 52.3676] }, // Amsterdam
limit: 10
});
// Search within a specific area
const areaResults = await discoverPlaces({
query: 'coffee shop',
geometries: [polygon], // Search within this polygon
limit: 20
});
// Category search
const restaurants = await discoverPlaces({
filters: { poiCategories: ['ITALIAN_RESTAURANT'] },
geoBias: { position: [4.9041, 52.3676], radiusMeters: 5000 } // Within 5km
});
// The same, from a category in words
const italian = await discoverPlaces({
filters: { poiCategoryQuery: 'italian food' },
geoBias: { position: [4.9041, 52.3676], radiusMeters: 5000 }
});
Finds places by text query, within geometries or along a route, from one universal function.
It runs one of three searches, picked from its params:
routeis given, for places within a detour budget of the route.geometriesis given, for places inside those areas.geoBias.