# Advanced Place Search component

> [!NOTE]
> This is a Pro component and is billed differently from the Essentials components. See the [Overview](https://developers.google.com/maps/documentation/places/android-sdk/places-ui-kit-overview.md.txt) for more information.

The Advanced version of the Place Search component offers the same features as [Place Search Essentials](https://developers.google.com/maps/documentation/places/android-sdk/place-search-ui-kit.md.txt). It also lets you configure the action buttons of the component and apply search and filtering options to the reviews and media that appear.

## Advanced Place Search configuration

Use the [`AdvancedPlaceSearchFragment`](https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/widget/AdvancedPlaceSearchFragment.md.txt) to access advanced features.

### Configure action buttons

Use the `PlaceActionProvider` interface of the `AdvancedPlaceSearchFragment` to define and customize action buttons.

#### Visual attribution requirements

![AdvancedPlace Search view with customized buttons](https://developers.google.com/static/maps/documentation/places/images/places-details-compact-custom-button.svg) Place Search result with customized button


**Important:** You must make it clear to users when a custom action button will share user information with a third party other than Google. See [visual attribution requirements](https://developers.google.com/maps/documentation/javascript/policies.md.txt#visual-requirements).

The example shows a custom image that makes it clear that user information will be sent to "Altostrat".

### Apply search and filtering options

Use the `SearchMediaOptions` and the `SearchReviewsOptions` interfaces of the `AdvancedPlaceSearchFragment` to enable search and filtering for media or reviews.

## Advanced Place Search examples

### Create an AdvancedPlaceSearch fragment

### Kotlin

```kotlin
// Initialize Places first
Places.initializeWithNewPlacesApiEnabled(context, API_KEY)

// How the fragment is created
AdvancedPlaceSearchFragment.newInstance(
          selectedContent,
          orientation,
          R.style.BrandedPlaceDetailsTheme,
        )

// Fragment supports the same configs that PlaceSearchFragment supported
fragment.preferTruncation = false
fragment.attributionPosition = AttributionPosition.BOTTOM
fragment.selectable = true

        
```

### Perform a search

### Kotlin

```kotlin
// Performing a search works the same as with a regular placeSearchFragment.

advancedPlaceSearchFragment.configureFromSearchByTextRequest(searchByTextRequest)

advancedPlaceSearchFragment.configureFromSearchNearbyRequest(searchNearbyRequest)


        
```

### Listen to results

### Kotlin

```kotlin
// attach the existing PlaceSearchFragmentListener to get notified about when places load or are selected from the results list.  
override fun onAttachFragment(fragment: Fragment) {
    super.onAttachFragment(fragment)
    when (fragment) {
      // Reuse the placeSearchFragmetnListener from the Essentials version
      is AdvancedPlaceSearchFragment -> fragment.registerListener(placeSearchFragmentListener)
      // use placeListFragmentListener, its functionally identical but with a new name.  
      is AdvancedPlaceListFragment -> fragment.registerListener(advancedPlaceListFragmentListener)
    }
}


        
```