> Documentation index: https://developers.google.com/maps/documentation/llms.txt

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](https://developers.google.com/maps/documentation/mobility/location-selection-api.md.txt)

## 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 `FindNearbyPlaces` result).
- 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](https://developers.google.com/maps/documentation/mobility/location-selection-api/cloud-setup.md.txt)
- **Reference:** [Location Selection API reference](https://developers.google.com/maps/documentation/mobility/location-selection-api/reference.md.txt)
- **Policies:** [Location Selection API policies](https://developers.google.com/maps/documentation/mobility/location-selection-api/support.md.txt#terms_of_use)

## Location Selection API: common mistakes

- **Problem:** `FindPickupPointsForLocation` orders 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](https://developers.google.com/maps/documentation/mobility/location-selection-api/samples.md.txt).
- **Problem:** `travel_modes` (`travelModes` in REST) is required in pickup point requests, and only `DRIVING` and `TWO_WHEELER` are supported (`WALKING` is in the enum but isn't supported). Only pickup points that allow at least one listed mode are returned. **Fix:** Always set `travel_modes` (`travelModes` in REST) to `DRIVING`, `TWO_WHEELER`, or both to match the trip type. See [/maps/documentation/mobility/location-selection-api/reference/rpc/google.maps.locationselection.v1beta](https://developers.google.com/maps/documentation/mobility/location-selection-api/reference/rpc/google.maps.locationselection.v1beta.md.txt).
- **Problem:** Using a different search location in `FindPickupPointsForPlace` than the one used in `FindNearbyPlaces` can lower result quality. **Fix:** Pass the same search location to `FindPickupPointsForPlace` that you used in `FindNearbyPlaces`. See [/maps/documentation/mobility/location-selection-api/samples](https://developers.google.com/maps/documentation/mobility/location-selection-api/samples.md.txt).
- **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](https://developers.google.com/maps/documentation/mobility/location-selection-api.md.txt).