Place details
Place Details API allows getting information about the place, place geometry, and surroundings. The API lets you get information by place ID returned by Geoapify Places API or Geoapify Geocoding API as well as request information by coordinates.
The typical Place Details API request URL looks like:
https://api.geoapify.com/v2/place-details?id=51329e979ec0f82540591331f71d761f4840f00102f901d994b00d00000000
&features=details,building,radius_500.supermarket,radius_500.restaurant,walk_10.restaurant,walk_10.playground
&apiKey=YOUR_API_KEY
or
https://api.geoapify.com/v2/place-details?lat=48.2455299&lon=10.9870866
&features=radius_500,radius_500.supermarket,radius_500.restaurant,walk_10,walk_10.supermarket,walk_10.restaurant,walk_10.playground
&lang=de&apiKey=YOUR_API_KEY
Required parameters:
- id or lat & lon - place or location
- apiKey - your Geoapify key
Note! "Details"
feature is returned only for the place specified i.e. when "id"
parameter is provided.
Optional parameters:
- features - features, separated by comma
- lang - language of address components
The response returned contains a GeoJSON FeatureCollection object, where each feature have "feature_type"
property that corresponds to requested feature. So all features related to a type can be filtered as:
const details = result.features.find(feature => feature.properties.feature_type === 'details');
const radius500Supermarkets = result.features.filter(feature => feature.properties.feature_type === 'radius_500.supermarket');
Note! Depending on feature type, the result may contain one or more features related to the type.