> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/ios/search/llms.txt)

# Search by Coordinate

## Search by Coordinate

The Search SDK simplifies the process of performing a coordinate search that will return addresses, places, or Points of Interest (POIs) around a specific geographical coordinate.

## Getting Started with Coordinate Search

> **Related content (guide): [Installation guide](https://docs.mapbox.com/ios/search/guides/install/)**
> 
> Before utilizing any of Mapbox's Search products, there are some common installation steps that you need to follow. Refer to this guide, and then go ahead with the steps outlined below.

1.  The `PlaceAutocomplete` class serves as the primary access point for implementing coordinate search functionality. To begin, you must first create an instance of this class. You can do this by using the following Swift code:

```swift
let placeAutocomplete = PlaceAutocomplete(accessToken: mapboxAccessToken)
```

2.  To retrieve autocomplete suggestions based on a specific geographical location, you should provide the geographic coordinates represented by the `CLLocationCoordinate2D` type. Here's how you can do it:

```swift
let searchCoordinates: CLLocationCoordinate2D = prepareSearchCoordinates()
placeAutocomplete.suggestions(for: searchCoordinates) { result in ... }
```

3.  After initiating a request for autocomplete suggestions, you'll need to handle the response from the `suggestions()` method. This function will either return an error or a list of suggestions. Here's how you can process the response:

```swift
placeAutocomplete.suggestions(for: query) { result in
    switch result {
    case .success(let suggestions):
        self.processSuggestions(suggestions)

    case .failure(let error):
        debugPrint(error)
    }
}
```

> **Related content (glossary): [API Reference](https://docs.mapbox.com/ios/search/api-reference/)**
> 
> For more information, see the full API reference for the iOS Search SDK.