# TPS XML API response

Source: [https://docs.qualcomm.com/doc/80-42216-1/topic/19_TPS_XML_API_response.html](https://docs.qualcomm.com/doc/80-42216-1/topic/19_TPS_XML_API_response.html)

The Terrestrial Positioning Service (TPS) XML API response includes latitude, longitude, and HPE
                (accuracy) that are determined from the TPS XML API request inputs.

Note: Qualcomm
                Technologies, Inc. (QTI) uses multiple methods and sources for positioning IPs.
                Hence, HPE may not be returned in all responses.

### Syntax

Response messages are defined by the following syntax:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <LocationRS version="2.31" xmlns="http://skyhookwireless.com/wps/2005"><location age="0" ncell="3" lap="-P0Y2M8D" nap="3">	<latitude>##.##</latitude>	<longitude>##.##</longitude>	<hpe>##</hpe>	<street-address>    <!-- Optional --> <!-- See below for details -->	</street-address>	<timezone>          <!-- Optional --> <!-- See below for details -->	</timezone></location>
    </LocationRS>
    Copy to clipboard

### Parameters

| Parameter | Parameter | Parameter | Description |
| --- | --- | --- | --- |
| `version` | `version` | `version` | The version of the API being used. |
| `rqtime` | `rqtime` | `rqtime` | The time at which the XML API request was sent. This value is a<br>                                reflection of the value provided in the request. |
| `age` | `age` | `age` | Relative age of the location, in milliseconds or<br>                                timestamp. |
| `ncell` | `ncell` | `ncell` | Number of cell towers sent in the request known to the server. |
| `nlac` | `nlac` | `nlac` | Number of Location Area Codes (LACs) sent in the request known to<br>                                the server. |
| `lap` | `lap` | `lap` | Age of the youngest access point used to determine the<br>                                location. |
| `nap` | `nap` | `nap` | Number of access points sent in the request known to the<br>                                server. |
| `nsat` | `nsat` | `nsat` | Number of satellites used to compute the GPS location supplied by<br>                                the client, if such information was used to determine<br>                                location. |
| `nble` | `nble` | `nble` | Number of BLE beacons sent in the request known to the server.<br><br><br>                                <br>This parameter is available in TPS v2.31 and later versions. |
| `location-source` | `location-source` | `location-source` | Source of the location.<br><br><br>                                <br>Possible values are:<ul class="ul" id="TPS_JSON_API_response_19__ul_gdy_pr1_5yb"><br>                                        <li class="li"><code class="ph codeph">unknown</code></li><br><br>                                        <li class="li"><code class="ph codeph">cell</code></li><br><br>                                        <li class="li"><code class="ph codeph">wifi</code></li><br><br>                                        <li class="li"><code class="ph codeph">gnss</code></li><br><br>                                        <li class="li"><code class="ph codeph">ble</code></li><br><br>                                        <li class="li"><code class="ph codeph">rfpm</code></li><br><br>                                        <li class="li"><code class="ph codeph">hybrid</code> (scans of multiple beacon types<br>                                            used)</li><br><br>                                    </ul><br><br><br>                                <br>This parameter is available in TPS v2.29 and later versions. |
| `latitude` | `latitude` | `latitude` | Calculated physical geographic location, expressed in decimal<br>                                degrees using floating point values, using the WGS84 datum. |
| `longitue` | `longitue` | `longitue` | Calculated physical geographic location, expressed in decimal<br>                                degrees using floating point values, using the WGS84 datum. |
| `hpe` | `hpe` | `hpe` | Estimates HPE of the location, in meters, when<br>                                    `hpeConfidence` is set to 68% (default) or 95% in<br>                                the API request.<br>Note: The default 68%<br>                                    confidence is supported in TPS v2.28 and later. For 95%<br>                                    confidence, set `hpe-confidence` to 95 in the<br>                                    location request. |
| `altitude` | `altitude` | `altitude` | Calculated z-axis position of the location, in meters.<br><br><br>                                <br>This value is returned only if barometric readings are provided<br>                                    in the request. |
|  |  | `ref-type` | The reference at which the altitude value is with respect to<br>                                WGS84, Above Ground Level (AGL), Mean Sea Level (MSL). |
|  |  | `vpe` | Vertical Positioning Error (VPE) of the altitude value.<br><br><br>                                <br>Estimated vertical error of the altitude, in meters, with 68%<br>                                    confidence. |
| `street-address` | `street-address` | `street-address` | Calculated street position of the location.<br><br><br>                                <br>A value is returned only if<br>                                        `street-address-lookup-type` is set to either<br>                                        `full` or `limited` in the API<br>                                    request. |
|  | `distanceToPoint` | `distanceToPoint` | Distance from the returned location to the address. |
|  | `street-number` | `street-number` | Street number of the address. |
|  | `address-line` | `address-line` | Contains the street name, and other address lines such as<br>                                apartment number, if applicable. |
|  | `neighborhood` | `neighborhood` | Neighborhood of the address. |
|  | `metro1` | `metro1` | City of the location. |
|  | `metro2` | `metro2` | City/township of the location. |
|  | `postal-code` | `postal-code` | Postal code associated with the address. |
|  | `county` | `county` | County in which the address is located. |
|  | `province` | `province` | Province in which the address is located. |
|  | `region` | `region` | Region in which the address is located. |
|  | `state` | `state` | State in which the address is located. Code is the relevant code<br>                                of the state. |
|  | `country` | `country` | Country code in which the address is located. Code is the<br>                                relevant code of the country. |
| `timezone` | `timezone` | `timezone` | Calculated timezone of the location.<br><br><br>                                <br>A value is returned only if `timezone-lookup` is<br>                                    set to `true` in the API request. |
|  | `name` | `name` | Name of the time zone. |
|  | `tz-offset` | `tz-offset` | UTC offset of the time zone. |
|  | `dst-offset` | `dst-offset` | Daylight savings offset of the time zone. |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

### Sample response

    <location rqtime="2496732469823" age="350" ncell="3" lap="-P0Y2M8D" 
    nlac="2" nap="3" nsat="3" nble="2" location-source="hybrid"><latitude>35.8723467378</latitude><longitude>38.3628442</longitude><hpe>12</hpe><street-address>               <!-- Optional -->	<address-line>George Street</address-line>	<metro1>Sydney</metro1>	<metro2>Haymarket</metro2>	<postal-code>2000</postal-code>	<state code="NSW">New South Wales</state>	<country code="AU">Australia</country></street-address><timezone>	<name>America/Mexico_City</name>	<tz-offset>-PT6H</tz-offset>	<dst-offset>PT1H</dst-offset></timezone>
    </location>
    Copy to clipboard

### Warnings and errors

A partially successful request to the server returns one or more warning messages
                with the following syntax:

    <LocationRS>WARNING</LocationRS>Copy to clipboard

An unsuccessful request to the server returns an error message with the following
                syntax:

    <LocationRS version="2.28" xmlns="http://skyhookwireless.com/wps/2005"><error>Unable to determine location</error>
    </LocationRS>
    Copy to clipboard

Where:

- `string-with-code` is the textual description of the warning or
                    error.
- `code` is the numeric code of the warning or error.

Last Published: Apr 01, 2026

[Previous Topic
TPS XML API request](https://docs.qualcomm.com/bundle/publicresource/80-42216-1/topics/4_TPS_XML_API_request.md) [Next Topic
Sample TPS XML API request](https://docs.qualcomm.com/bundle/publicresource/80-42216-1/topics/21_Sample_TPS_XML_API_for_testing.md)