![](https://developers.google.com/static/maps/images/landing/places-api_480.png "Geolocation API Overview")

The Geolocation API is a service that accepts an HTTPS request with the
cell tower and Wi-Fi access points that a mobile client can detect. It returns
latitude/longitude coordinates and a radius indicating the accuracy of the
result for each valid input.

> [!NOTE]
> **Note** : To get device location information using latitude and longitude coordinates, addresses, or Place IDs, go to the [Geocoding API](https://developers.google.com/maps/documentation/geocoding/overview).

## Why use the Geolocation API

Use the Geolocation API to locate mobile devices that do not provide built-in geolocation
features.

> [!IMPORTANT]
> For web browsers and mobile devices that ***already provide geolocation capabilities*** , use the following instead:
>
> - **Browsers with HTML5 geolocation** : Use the Maps Javascript API. For more information, go to [Geolocation:
>   Displaying User or Device Position on Maps](https://developers.google.com/maps/documentation/javascript/geolocation).
> - **Mobile devices geolocation** : Use the built-in location services offered by the platform, such as the [LocationManager](https://developer.android.com/reference/android/location/LocationManager) or [Fused Location Provider API](https://developers.google.com/location-context/fused-location-provider) for Android, and the [Core Location](https://developer.apple.com/documentation/corelocation) framework for iOS.
>
> For more information on the W3C Geolocation standard, see
> [W3C Geolocation standard](https://w3c.github.io/geolocation-api/).

## What you can do with the Geolocation API

With the Geolocation API, you can use geospatial data from cell towers
and WiFi nodes to get the location of a device that does not have built-in geolocation or GPS.

## How the Geolocation API works

The Geolocation API uses cellular device data fields, cell tower
data, and WiFi access point array data to return latitude/longitude coordinates and an accuracy
radius. It accepts an HTTPS POST request to its endpoint along with a JSON structured request
body. The following example shows the request URL and an example request body:

```json
curl -X POST "https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d \
'{ "homeMobileCountryCode":310,
   "homeMobileNetworkCode":410,
   "radioType":"gsm",
   "carrier":"Vodafone",
   "considerIp":true
}'
```
The API can return data for a number of common cellular data fields as indicated below.

### Resources

The following table summarizes the fields in the request body of the geolocation endpoint
call, along with the type of data provided from such queries.

| Data resources | Data returned | Return format |
|---|---|---|
| [Cell device data fields](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt#body) such as carrier, device, and network information. | Latitude/longitude coordinates and an accuracy radius | JSON |
| [Cell tower data](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt#cell_tower_object), such as location area code and mobile country codes. | Latitude/longitude coordinates and an accuracy radius | JSON |
| [WiFi access points data](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt#wifi_access_point_object), such as MAC address and signal strength. | Latitude/longitude coordinates and an accuracy radius | JSON |

## How to use the Geolocation API

|---|---|---|
| 1 | **Get set up** | Start with [Set up your Google Cloud project](https://developers.google.com/maps/documentation/elevation/cloud-setup) and complete the setup instructions that follow. |
| 2 | **Try a geolocation request** | Once you have an API key, you can start testing out the Geolocation API using cURL or Postman. See [Sample requests](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt#sample-requests) in the Geolocation requests and response guide for details. |
| 3 | **Get the cellID from different radio towers** | See [Calculating cellID](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt#calculating_cell_id) and [Calculating newRadioCellID](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt#sample-requests) to get access to older and newer towers, respectively. |
| 4 | **Understand response basics** | Explore the geolocation data responses to prepare to use elevation data for your app. See [Geolocation responses](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt#responses) for details. |

### Available client libraries

Call this API in the language of
your choice through one of the following client libraries:

- [Java
  Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-java)
- [Python
  Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-python)
- [Go Client
  for Google Maps Services](https://github.com/googlemaps/google-maps-services-go)
- [Node.js
  Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-js)

The Java Client, Python Client, Go Client and Node.js Client for Google Maps
Services are community-supported client libraries, open sourced under the
[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).
Download them from GitHub, where you can also find installation instructions and sample code.

## What's next

- **Get started with sample requests and responses** : Go to [Geolocation request and response](https://developers.google.com/maps/documentation/geolocation/requests-geolocation.md.txt)
- **Follow best practices** : Go to [Web Service Best Practices](https://developers.google.com/maps/documentation/geolocation/web-service-best-practices.md.txt).
- **Understand billing** : Go to [Usage and Billing](https://developers.google.com/maps/documentation/geolocation/usage-and-billing.md.txt).