The Location Selection API returns a ranked list of nearby places and their associated pickup points for ridesharing and deliveries. It has three methods: FindNearbyPlaces, FindPickupPointsForPlace, and FindPickupPointsForLocation, which you call over gRPC or REST. It's in Preview, and Google is no longer onboarding new customers.
Location Selection API: key facts
- Product: Location Selection API
- Category: Routes
- Platform: Web service (REST)
- Runs on: Server (backend code)
- Launch stage: Preview
- Lifecycle: Active
- Overview: Location Selection API overview
Location Selection API: when to use it
Use Location Selection API when:
- You need a ranked list of places near a rider's or device location so the user can pick a pickup or drop-off place.
- You need pickup points for a place the user already selected (for example, from a
FindNearbyPlacesresult). - You need nearby places and their pickup points returned together in one request for ridesharing or delivery.
Location Selection API: setup
- Service to enable:
locationselection.googleapis.com - Authentication: API key
- Get started: Set up Location Selection API
- Reference: Location Selection API reference
- Policies: Location Selection API policies
Location Selection API: common mistakes
- Problem:
FindPickupPointsForLocationorders pickup points for multiple places together, so results aren't grouped by place. For example, the order can be [T1:P2, T2:P1, ...]. Fix: Read the place associated with each pickup point instead of assuming results are grouped by place. See /maps/documentation/mobility/location-selection-api/samples. - Problem:
travel_modes(travelModesin REST) is required in pickup point requests, and onlyDRIVINGandTWO_WHEELERare supported (WALKINGis in the enum but isn't supported). Only pickup points that allow at least one listed mode are returned. Fix: Always settravel_modes(travelModesin REST) toDRIVING,TWO_WHEELER, or both to match the trip type. See /maps/documentation/mobility/location-selection-api/reference/rpc/google.maps.locationselection.v1beta. - Problem: Using a different search location in
FindPickupPointsForPlacethan the one used inFindNearbyPlacescan lower result quality. Fix: Pass the same search location toFindPickupPointsForPlacethat you used inFindNearbyPlaces. See /maps/documentation/mobility/location-selection-api/samples. - Problem: The API is allowlisted (Preview, no new customers). Requests from a project that isn't allowlisted get an HTTP 404 page, not a JSON permission error. Fix: Use it only if your project is already onboarded; contact your Google account team. See /maps/documentation/mobility/location-selection-api.