Part Of

The API returns boundaries that the specified place is a part of. For example, city, county, state, and country for a location. The API can take as input place id or place coordinates. The API is implemented via HTTP Get request.

API URL

https://api.geoapify.com/v1/boundaries/part-of

Request parameters

Name Description
apiKey Geoapify API key
id place id returned by Geometry API or Places API. Skip lat, lon parameters when id specified
lat, lon Location coordinates. Skip id parameter when lat, lon specified
boundary Boundary type. Can take values: 'administrative', 'postal_code', 'political', 'low_emission_zone'. Default value is 'administrative'
geometry Boundary geometry type. Lets to get geometry with different accuracy. Can take values: 'point', 'geometry_1000', 'geometry_5000', 'geometry_10000'. Default value is 'point'
lang Result language. 2-character ISO 639-1 language codes are supported

Consists Of

The API returns boundaries that the specified place consists of. For example, states for a country or districts for a city. The API is implemented via HTTP Get request.

API URL

https://api.geoapify.com/v1/boundaries/consists-of

Request parameters

Name Description
apiKey Geoapify API key
id place id returned by Geometry API or Places API
boundary Boundary type. Can take values: 'administrative', 'postal_code', 'political', 'low_emission_zone'. Default value is 'administrative'
sublevel Relative subdivisions level. Lets to get smaller subdivisions - for example, neighborhoods instead of districts
geometry Boundary geometry type. Lets to get geometry with different accuracy. Can take values: 'point', 'geometry_1000', 'geometry_5000', 'geometry_10000'. Default value is 'point'
lang Result language. 2-character ISO 639-1 language codes are supported

Geometry types

Value Description
point Center point of a boundary
geometry_1000 'Polygon/Multipolygon' geometry with 1000m accuracy
geometry_5000 'Polygon/Multipolygon' geometry with 5000m accuracy
geometry_10000 'Polygon/Multipolygon' geometry with 10000m accuracy

Note! When you request boundaries for a big area with high accuracy the processing time and response size can take significant values.
Note! Each 'Polygon/Multipolygon' geometry returned by the API costs an additional credit.

Response Object

The response contains a GeoJSON FeatureCollection object containing features of "Point" or "Polygon/Multipolygon" types. Check the Feature specification for detailed information about Feature object properties.