Places

The Paces API provides a feature-rich access to the Sygic Travel Places data including advanced search and filtering capabilities.

Search places

Let's get started by searching some places:

GET https://api.sygictravelapi.com/1.0/en/places/list?query=eiffel

This request returns a list of places filtered by the eiffel query. The resulting list is ordered according to an importance rating that is assigned to each place. In this case, the Eiffel Tower, being the most important, is returned in the first place, its smaller copy in Las Vegas comes second, followed by other lower importance places including hotels and restaurants.

The list endpoint provides rich search and filtering options - tags, categories, parent places, geographical bounds, etc. You can find the full parameter list in the API specification.

Get place details

Once we've found the desired place using the list API we can fetch its details using its ID:

GET https://api.sygictravelapi.com/1.0/en/places/poi:530



If you need a geometry of the place, you can fetch it using the following request:

GET https://api.sygictravelapi.com/1.0/en/places/poi:530/geometry



Similarly, you can get opening hours for particular dates (if available):

GET https://api.sygictravelapi.com/1.0/en/places/poi:530/opening-hours?from=2017-01-01&to=2017-01-07


Detect parents

The places API also offers detection of parent places of a certain point or geographic area. These parent places can be for example the geographical units the point / area is part of. This can be useful when working with a map, searching for cities by location, etc.

Lets fetch all the parent places of the Eiffel Tower:

GET https://api.sygictravelapi.com/1.0/en/places/detect-parents?location=48.858702,2.293805

The API will return the city of Paris, the surrounding Île-de-France region, France itself and then Europe as the continent, ordered from the smallest geographical unit to the largest one.

Another use case might be detecting what region dominates the area within certain geographic bounds. This is useful for example when we want to say which city, country or other type of region is displayed in the current map view. The detection algorithm picks the most dominant region according to the number of child places it contains. The parent places of the main region are then included as well.

Let's detect parent places when looking on an area in Paris on the map:

GET https://alpha-api.sygictraveldata.com/1.0/en/places/detect-parents/main-in-bounds?bounds=48.82494916931076,2.218379974365235,48.9002736789157,2.4842834472656254

The API will return Paris and its parent places ordered from the smallest place to the largest one.