Select platform: [Android](https://developers.google.com/maps/documentation/android-sdk/dds-boundaries/dds-use-maps-places-apis.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/maps/documentation/ios-sdk/dds-boundaries/dds-use-maps-places-apis.md.txt "View this page for the iOS platform docs.") [JavaScript](https://developers.google.com/maps/documentation/javascript/dds-boundaries/dds-use-maps-places-apis.md.txt "View this page for the JavaScript platform docs.")

<br />

**European Economic Area (EEA) developers**

> [!NOTE]
> If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](https://developers.google.com/maps/comms/eea/faq.md.txt).

You can use the Places SDK for iOS and the
Geocoding API with the Maps SDK for iOS to
search for regions, and get more information about places. The
Places SDK for iOS and Geocoding API
are powerful and stable alternatives for obtaining [place
IDs](https://developers.google.com/maps/documentation/places/ios-sdk/place-id). If you're already using place
IDs, you can reuse those IDs with data-driven styling for boundaries.

Add Places and Geocoding to your Maps SDK for iOS apps in the following ways:

- [Places SDK for iOS](https://developers.google.com/maps/documentation/places/ios-sdk) returns information about places using HTTP requests.
- [CLGeocoder](https://developer.apple.com/documentation/corelocation/clgeocoder) class can geocode and reverse geocode dynamically from user input.
- [Geocoding API](https://developers.google.com/maps/documentation/geocoding) lets you geocode static, known addresses.

**Note:** The [Places SDK for iOS](https://developers.google.com/maps/documentation/places/ios-sdk) and Geocoding API must be enabled, and are billed separately from the Maps SDK for iOS.

## Use the Places API

- The [Places API Text
  Search](https://developers.google.com/maps/documentation/places/web-service/text-search) returns
  information about a set of places based on a string --- for example "pizza in
  New York" or "shoe stores near Ottawa" or "123 Main Street". The service
  responds with a list of places matching the text string and any location
  bias that has been set.

- The [Places Autocomplete](https://developers.google.com/maps/documentation/places/ios-sdk/autocomplete#restrict_results_to_a_specific_region) service provides a convenient
  way to let your users search for regions. To display results within the
  defined region, set `locationRestriction` on
  [`GMSAutocompleteFilter`](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteFilter.md.txt).

## Get place details for a region

- The [Place Details](https://developers.google.com/maps/documentation/places/ios-sdk/place-details) data
  for a region is also effective. For example, you can:

  - Search for boundary place IDs based on place names.
  - Get the viewport for zooming to a boundary.
  - Get the feature type for the boundary (for example locality).
  - Get the formatted address, which resolves to "Place Name, State, Country" in the United States region (for example, "Kirkland, WA, USA").
  - Get other useful data such as photos.

## Use the Geocoding API

- The [Geocoding API](https://developers.google.com/maps/documentation/geocoding) lets you
  convert an address, latitude and longitude coordinates, or place ID into
  geographic coordinates, and vice-versa. The following uses combine well with
  data-driven styling for boundaries:

  - Use Geocoding to get the viewport for a region.
  - Apply component filtering to your Geocoding call to get the place IDs for administrative areas 1-4, locality, or postal code.
  - Use reverse geocoding to find place IDs by latitude and longitude coordinates, or even return place IDs for all components in a particular location.

  The following example uses an address (url-escaped) to make a request to the
  Geocoding API:

  ```html
  https://maps.googleapis.com/maps/api/geocode/json?latlng=41.864182,-87.676930&key=YOUR_API_KEY
  ```

  You can use [reverse
  geocoding](https://developers.google.com/maps/documentation/geocoding/requests-reverse-geocoding) to
  find place IDs. The following example Geocoding service function returns the
  place IDs for all address components at the specified latitude and longitude
  coordinates:

  ```html
  https://maps.googleapis.com/maps/api/geocode/json?latlng=41.864182,-87.676930&result_type=locality&key=YOUR_API_KEY
  ```

  Use reverse geocoding with component filtering to get the address component
  for one or more of the following types at the specified location:
  - `administrativeArea`
  - `country`
  - `locality`
  - `postalCode`
  - `schoolDistrict`

  The following example shows using the Geocoding service, adding component
  restrictions with reverse geocoding to retrieve all address components
  at the specified location for the `locality` type:

  ```html
  https://maps.googleapis.com/maps/api/geocode/json?latlng=41.864182,-87.676930&result_type=locality&key=YOUR_API_KEY
  ```