About
Boundaries API works via HTTP Get request and allows to get boundaries that the specified location is part of or that the specified location consists of. The API contains 2 API end-points:
part-of endpoint
Returns the list of boundaries the specified location belongs to.
https://api.geoapify.com/v1/boundaries/part-of?lon=12.789931425885811&lat=51.16772168907602&geometry=geometry_1000&apiKey=YOUR_API_KEY
- lon, lat - location ccordinates
- geometry - geometry type with specified accuracy
- apiKey - your Geoapify key
consists-of endpoint
Returns the list of boundaries that are a part of the specified location.
https://api.geoapify.com/v1/boundaries/consists-of?id=519696318009c02840596da7e3bdc1ab4940f00101f901b9f4000000000000&geometry=geometry_1000&apiKey=YOUR_API_KEY
- id - place id returned by Geocoding or Places API
- geometry - geometry type with specified accuracy
- apiKey - your Geoapify key
The response returned contains a GeoJSON FeatureCollection object with features of specified geometry type. Each Feature represents a separate boundary and has a Place Feature Specification.