---
title: "GetPredictionData"
method: GET
path: "/location/pgnss"
tags: ["GNSS"]
---

# GetPredictionData

`GET /location/pgnss`

<div class="nrf-note">
<p><b>Cloud-to-cloud — authorize with an Organization Auth Token.</b><br><code>https://api.location.nrfcloud.com/v1/organizations/{organizationSlug}/projects/{projectSlug}/location/pgnss</code></p>
<p><b>Device-to-cloud — authorize with a JSON Web Token.</b><br><code>https://api.location.nrfcloud.com/v1/location/pgnss</code></p>
</div>

Generates up to one week of GNSS predictions. The predictions are used by the nRF91 GNSS modem
to enable a faster time-to-first-fix (TTFF) and provide offline navigation when out of range of an LTE cell.

Returns a link for easy download of the predictions file.

__Basic Request__:
```sh
curl -G $API_HOST/v1/location/pgnss -H "Authorization: Bearer $JWT" -H "Content-Type: application/json"
```
__Custom Request__:
```sh
curl -G $API_HOST/v1/location/pgnss  -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" -d "predictionCount=42" -d "predictionIntervalMinutes=240" -d "startGpsDay=15131" -d "startGpsTimeOfDaySeconds=0"
```

## Query parameters

- `predictionCount` number, double — The number of predictions requested. Default is 42 (7 days, 6 predictions per day). Valid range 1..42 The number of possible predictions depends on StartGpsDay and PredictionInterval
- `predictionIntervalMinutes` number, double — The time between predictions (in minutes). Defaults to 240 (4 hours). Valid value is: 240
- `startGpsDay` number, double — The start day of the prediction set as GPS Day (days since the GPS epoch). Defaults to current GPS day. Valid range currentGpsDay..currentGpsDay + 6.
- `startGpsTimeOfDaySeconds` number, double — The start time of the prediction set as seconds in day. Defaults to 0. Valid range 0..86399

## Headers

- `x-custom-device-id` string — User-defined device ID, used to identify requests when using a cloud-to-cloud integration. Ignored if using a device token.

## Response `200`

Link to the P-GPS binary payload file for download.

- object
  - `path` string, required — The path to the file that contains PGNSS prediction data.
  - `host` string, required — The protocol-agnostic URL for accessing PGNSS prediction files.

---

[API](https://skmtc.dev/nrfcloud/apis/nrf-cloud-rest-api.md) · [All operations](https://skmtc.dev/nrfcloud/apis/nrf-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nrfcloud/nrf-cloud-rest-api/revisions/c4e56e458ebf/schema)
