Skip to content

Geolocation API

POST Locate

Estimate a device's geographic position from radio network signal measurements. Submit one or more arrays of cellular or Wi-Fi measurements and receive a GeoJSON Point with accuracy estimates.

Resource URL

https://www.mapquestapi.com/geolocation/v1/locate

Resource Information

Response FormatsJSON
AuthenticationYes (Requires Key)
Rate LimitedYes

Request Parameters

Request ParameterDescriptionRequired
keyThe API Key, which is needed to make requests to MapQuest services.Yes
altitudeWhen true, requests altitude and altitude accuracy in the response if the data is available.optional, defaults to false

Request Body

The request body must contain at least one radio measurement array. The maximum request body size is 30 KB.

FieldTypeDescriptionRequired
deviceobjectDevice hardware and platform hints (manufacturer, model, os) used to improve positioning accuracy.optional
gsmarrayGSM cell tower measurements. Max 16 entries.At least one radio array is required
wcdmaarrayWCDMA cell tower measurements. Max 16 entries.
tdscdmaarrayTD-SCDMA cell tower measurements. Max 16 entries.
ltearrayLTE cell tower measurements. Max 16 entries.
lteCatMarrayLTE Cat-M cell tower measurements. Max 16 entries.
nbIotarrayNB-IoT cell tower measurements. Max 16 entries.
cdmaarrayCDMA cell tower measurements. Max 16 entries.
wlanarrayWi-Fi access point measurements. Max 256 entries.

Response Object

locationA GeoJSON Point geometry. The coordinates array is [longitude, latitude], or [longitude, latitude, altitude] when altitude is requested and available.
accuracy.horizontalInMetersThe horizontal accuracy radius in meters. Always present.
accuracy.verticalInMetersThe vertical accuracy in meters. Only present when altitude=true is requested and altitude data is available.

Error Responses

Errors are returned as application/problem+json.

StatusDescription
400The request body contains invalid measurement data.
422No position could be estimated from the provided measurements. The request was valid but the measurements were insufficient.
503The geolocation service is temporarily unavailable. Please retry.

Example Requests

POST https://www.mapquestapi.com/geolocation/v1/locate?key=KEY

json
{
  "lte": [
    {
      "mcc": 262,
      "mnc": 2,
      "cid": 2898945,
      "localId": { "earfcn": 6300, "pci": 123 },
      "nmr": [
        { "earfcn": 6300, "pci": 237 },
        { "earfcn": 6300, "pci": 442 }
      ]
    }
  ]
}
json
{
  "gsm": [
    {
      "mcc": 262,
      "mnc": 1,
      "lac": 5126,
      "cid": 16504,
      "localId": { "bsic": 5, "bcch": 80 },
      "nmr": [
        { "bsic": 6, "bcch": 82 },
        { "bsic": 7, "bcch": 85 }
      ]
    }
  ]
}
json
{
  "wcdma": [
    {
      "mcc": 262,
      "mnc": 7,
      "cid": 14674663,
      "localId": { "uarfcndl": 10780, "psc": 140 },
      "nmr": [
        { "uarfcndl": 10786, "psc": 149 },
        { "uarfcndl": 10762, "psc": 211 }
      ]
    }
  ]
}
json
{
  "tdscdma": [
    {
      "mcc": 460,
      "mnc": 0,
      "cid": 18563770,
      "localId": { "uarfcn": 10101, "cellParams": 56 },
      "nmr": [
        { "uarfcn": 10100, "cellParams": 86 },
        { "uarfcn": 10121, "cellParams": 14 }
      ]
    }
  ]
}
json
{
  "lteCatM": [
    {
      "mcc": 244,
      "mnc": 5,
      "cid": 1980678,
      "localId": { "earfcn": 6400, "pci": 42 },
      "nmr": [
        { "earfcn": 1825, "pci": 363 },
        { "earfcn": 100, "pci": 106 }
      ]
    }
  ]
}
json
{
  "nbIot": [
    {
      "mcc": 244,
      "mnc": 5,
      "cid": 1980678,
      "localId": { "earfcn": 6400, "pci": 42 },
      "nmr": [
        { "earfcn": 1825, "pci": 363 },
        { "earfcn": 100, "pci": 106 }
      ]
    }
  ]
}
json
{
  "cdma": [
    {
      "sid": 4162,
      "nid": 10,
      "bsid": 8583,
      "localId": { "channel": 0, "pnOffset": 247 },
      "nmr": [
        { "channel": 0, "pnOffset": 357 },
        { "channel": 0, "pnOffset": 366 }
      ]
    }
  ]
}
json
{
  "wlan": [
    { "mac": "74:26:AC:1F:47:9F", "rss": -47 },
    { "mac": "74:26:AC:4C:5F:3E", "rss": -59 },
    { "mac": "7C:21:0E:A9:58:03", "rss": -55 }
  ]
}
json
{
  "device": {
    "manufacturer": "Samsung",
    "model": "Galaxy S24",
    "os": { "name": "android", "version": "14.0" }
  },
  "lte": [
    {
      "mcc": 244,
      "mnc": 5,
      "cid": 145925,
      "rsrp": -52,
      "rsrq": -7
    }
  ]
}

The "With Device + Altitude" example above uses query parameter altitude=true:

POST https://www.mapquestapi.com/geolocation/v1/locate?key=KEY&altitude=true

Example Responses

json
{
  "location": {
    "type": "Point",
    "coordinates": [23.864577, 61.4469302]
  },
  "accuracy": {
    "horizontalInMeters": 24
  }
}
json
{
  "location": {
    "type": "Point",
    "coordinates": [23.864577, 61.4469302, 177]
  },
  "accuracy": {
    "horizontalInMeters": 24,
    "verticalInMeters": 36
  }
}