Locations

Search for locations

Changed on

Search for locations by query. Returns predictions with venue badges for locations that are managed venues on the platform. The query parameter is required.

get/locations

Request

  • Base URL
    https://api.session.services
  • Auth
    API key in header x-tenant-id

Query parameters

query, string required

Search query for location search

Example:sydney opera
latitude, number

User's latitude for proximity-based results (optional for better relevance)

Example:-33.8944593
longitude, number

User's longitude for proximity-based results (optional for better relevance)

Example:151.2252255
types, string[]

Filter results by Google Place types (e.g., 'establishment', 'night_club', 'bar')

[
  "establishment"
]

Response

OK

object required

Response containing location search results

predictions, object[] required

Array of location predictions

Example response

{
  "predictions": [
    {
      "googlePlaceId": "ChIJP3Sa8ziYEmsRUKgyFmh9AQM",
      "name": "Watson's EQ",
      "description": "The, Entertainment Quarter, 1 Bent St, Moore Park NSW 2021, Australia",
      "venue": {
        "id": "ven_01jqpjksnsen9vprw95et60t2m",
        "name": "Sydney Opera House",
        "image": {
          "src": "https://assets.session.services/my-image.jpg",
          "alt": "My Image",
          "width": 1080,
          "height": 1080
        }
      }
    }
  ]
}

Changes

    • breaking

      for the query request parameter query, the minLength was increased from 0 to 1

    • warning

      for the query request parameter latitude, the max was set to 90.00

    • warning

      for the query request parameter longitude, the max was set to 180.00

    3 more changes in this revision