# Getting Track Points

In many scenarios, it becomes essential to retrieve all location points of a track to gain comprehensive insights into the movements of an object equipped with a GPS tracker. This guide will demonstrate how to accomplish this using the Navixy API.

## Prerequisites

### Obtain API Key Hash

First, you need to [obtain the hash of an API key](https://navixy.com/docs/navixy-api/user-api/backend-api/guides/data-retrieval/pages/da43XHZN3FdBf5ch3RQk#id-2.-api-keys-recommended-authentication).

### Get Tracker ID

Next, [retrieve your tracker\_id](/docs/navixy-api/user-api/backend-api/guides/data-retrieval/get-tracker-list.md). This ID is essential as the platform needs to know which device's points to return.

## Retrieve Track Points

With the API key hash and tracker ID in hand, you can now get all points for a specified period using the [`/track/read`](/docs/navixy-api/user-api/backend-api/resources/tracking/track/index.md#read) API method.

### Required Parameters

* `tracker_id` - Obtained from the [`tracker/list`](/docs/navixy-api/user-api/backend-api/resources/tracking/tracker.md#list) call. Only one tracker\_id per call. It should be an integer.
* `from` - A string containing the start [`date/time`](/docs/navixy-api/user-api/backend-api.md#datetime-formats).
* `to` - A string containing the end [`date/time`](/docs/navixy-api/user-api/backend-api.md#datetime-formats).

For a full description of the parameters, see the [`/track/read`](/docs/navixy-api/user-api/backend-api/resources/tracking/track/index.md#read)API method.

### Example Response

The platform will respond with the following data:

```json
{
  "success": true,
  "limit_exceeded": true,
  "list": [
    {
      "lat": 53.445181,
      "lng": -2.276432,
      "alt": 10,
      "satellites": 8,
      "get_time": "2011-06-18 03:39:44",
      "address": "4B Albany Road, Manchester, Great Britain",
      "heading": 298,
      "speed": 70,
      "precision": 100,
      "gsm_lbs": true,
      "parking": true
    }
  ]
}
```

### Response Fields

* `limit_exceeded` - boolean. `true` if the requested time period exceeds the limit specified in the tracker's tariff.
* `lat` - float. Latitude.
* `lng` - float. Longitude.
* `alt` - int. Altitude in meters.
* `satellites` - int. Number of satellites used for this point.
* `get_time` - date/time. GPS timestamp of the point, in the user's timezone.
* `address` - string. Point address. Will be "" if no address is recorded.
* `heading` - int. Bearing in degrees (0..360).
* `speed` - int. Speed in km/h.
* `precision` - optional int. Precision in meters.
* `gsm_lbs` - optional boolean. `true` if the location is detected by GSM LBS.
* `parking` - optional boolean. `true` if the point does not belong to the track.

## Download Track Points as KML File

You can also [download](/docs/navixy-api/user-api/backend-api/resources/tracking/track/index.md#download) a KML file. This file can be used with map services to visualize all points on a map.

### Example Request

{% code title="cURL" overflow="wrap" %}

```shell
curl -X POST 'https://api.eu.navixy.com/v2/track/download' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "tracker_id": 123456, "from": "2020-09-23 03:24:00", "to": "2020-09-23 06:24:00", "format": "kml", "split": false}'
```

{% endcode %}

### Additional Parameters

All parameters are the same as in `track/read` plus two new optional parameters:

* `format` – string. File format, either "kml" or "kmz". Default is "kml".
* `split` – boolean. If `true`, splits tracks by folders with start/end placemarks and track line. Default is `false`.

By following these steps, you can effectively retrieve and utilize track points for detailed analysis of device movements.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/backend-api/guides/data-retrieval/get-track-points.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
