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
Resource Information
| Response Formats | JSON |
| Authentication | Yes (Requires Key) |
| Rate Limited | Yes |
Request Parameters
| Request Parameter | Description | Required |
|---|---|---|
| key | The API Key, which is needed to make requests to MapQuest services. | Yes |
| altitude | When 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.
| Field | Type | Description | Required |
|---|---|---|---|
| device | object | Device hardware and platform hints (manufacturer, model, os) used to improve positioning accuracy. | optional |
| gsm | array | GSM cell tower measurements. Max 16 entries. | At least one radio array is required |
| wcdma | array | WCDMA cell tower measurements. Max 16 entries. | |
| tdscdma | array | TD-SCDMA cell tower measurements. Max 16 entries. | |
| lte | array | LTE cell tower measurements. Max 16 entries. | |
| lteCatM | array | LTE Cat-M cell tower measurements. Max 16 entries. | |
| nbIot | array | NB-IoT cell tower measurements. Max 16 entries. | |
| cdma | array | CDMA cell tower measurements. Max 16 entries. | |
| wlan | array | Wi-Fi access point measurements. Max 256 entries. |
Response Object
| location | A GeoJSON Point geometry. The coordinates array is [longitude, latitude], or [longitude, latitude, altitude] when altitude is requested and available. |
| accuracy.horizontalInMeters | The horizontal accuracy radius in meters. Always present. |
| accuracy.verticalInMeters | The 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.
| Status | Description |
|---|---|
| 400 | The request body contains invalid measurement data. |
| 422 | No position could be estimated from the provided measurements. The request was valid but the measurements were insufficient. |
| 503 | The 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
}
}