Prediction data request

To request predicted GNSS navigation models, send an HTTP GET request to
the /v2/prediction endpoint on the HERE GNSS Data API.

Base URL

https://gnss.hereapi.com/v2/prediction

Authentication

The prediction endpoint supports the same authentication methods as the assistance endpoint.
See Assistance data request for details.

Query parameters

Unlike the assistance endpoint, the prediction endpoint uses separate query parameters for
each GNSS system. Each parameter specifies the start time for the prediction data.

ParameterTypeRequiredDescription
gpsinteger or nowNoRequests GPS predictions starting from the specified time. The value is a Unix time or GPS time in seconds, or the special value now for the current time. If omitted, the response does not include GPS predictions.
glointeger or nowNoRequests GLONASS predictions starting from the specified time. The value is a Unix time or GLONASS time in seconds, or the special value now for the current time. If omitted, the response does not include GLONASS predictions.
galinteger or nowNoRequests Galileo predictions starting from the specified time. The value is a Unix time or Galileo time in seconds, or the special value now for the current time. If omitted, the response does not include Galileo predictions.
bdsinteger or nowNoRequests BeiDou predictions starting from the specified time. The value is a Unix time or BeiDou time in seconds, or the special value now for the current time. If omitted, the response does not include BeiDou predictions.
encodingstringNoSpecifies the encoding format for the LPP messages. Supported values: uper (default), jer. See JER encoding for details.
lppstringNoSpecifies the LPP ASN.1 root element. Use data (default) for A-GNSS-ProvideAssistanceData or full for LPP-Message.
billingTagstringNoA list of up to six billing tags, separated by +. Length: 4–101 characters.

Note

At least one GNSS system parameter (gps, glo, gal, or bds) must be specified.

Request headers

HeaderRequiredDescription
X-Request-IDNoUser-provided token to trace a request or a group of requests. Can be any string; UUID is recommended. The value is echoed in the response.
AcceptNoPreferred media type for the response. For JER encoding, supported values are application/json-seq (default for JER), application/json, and application/x-ndjson. For UPER encoding, the only accepted value is multipart/mixed. If encoding=uper and a JSON content type is requested, the server responds with 406 Not Acceptable.
Accept-EncodingNoPreferred content encodings for response compression. Supported values: gzip, deflate, br (and identity for no compression). The server uses content negotiation to select the best option and indicates the choice in the Content-Encoding response header.

48-hour batching and follow-up requests

The service returns up to 48 hours of prediction data per request.
To download predictions for the full prediction period (up to 14 days for GPS/GLONASS
or 7 days for Galileo/BeiDou), the client sends follow-up requests.

The response includes an X-Prediction-Next header containing the query parameters
for the next request. The client can use this value directly to build the next request URL.

Step-by-step process

  1. Send the initial request with now as the start time for each desired GNSS system.
  2. Read the X-Prediction-Next header from the response.
  3. Send a follow-up request using the value of X-Prediction-Next in the query parameters.
  4. Repeat the follow-up requests until the desired length of predictions have been downloaded
    or until the X-Prediction-Next header is no longer present in the response,
    which indicates that all available prediction data has been downloaded.

Example flow

Initial request:

GET /v2/prediction?gps=now&glo=now&apiKey={YOUR_API_KEY} HTTP/1.1
Host: gnss.hereapi.com

The response contains prediction data for GPS and GLONASS and includes the header:

X-Prediction-Next: gps=1772395200&glo=1772395200

Follow-up request:

GET /v2/prediction?gps=1772395200&glo=1772395200&apiKey={YOUR_API_KEY} HTTP/1.1
Host: gnss.hereapi.com

Repeat this process until X-Prediction-Next is no longer present.

Note

Instead of using the X-Prediction-Next header, the client can also manually calculate
the start time for the next request. For each GNSS system, add the X-Validity-Start
and X-Validity-Duration values of the last received LPP message for that system.
Using the X-Prediction-Next header is recommended for simplicity.

JER encoding

When encoding=jer is specified, the response contains LPP messages in ASN.1
JSON Encoding Rules (JER) format. The Accept request header controls the specific
JSON content type.

Prediction data can be large, so compression is recommended.
Use the Accept-Encoding request header to indicate preferred compression methods.
The server selects the best option using content negotiation (RFC 9110) and reports
its choice in the Content-Encoding response header.

Note

Use UPER encoding to optimize the response size. UPER is a compact binary format that
reduces bandwidth usage and avoids the overhead of JSON parsing on the client.
If JER encoding is preferred, consider using streaming JSON formats
(application/json-seq or application/x-ndjson) instead of application/json.
These formats can be parsed incrementally, avoiding the overhead of loading one
large JSON document before processing starts.

For details on JER response formats and content types, see
Response encoding and formats.

Examples

Request GPS predictions starting from now

GET /v2/prediction?gps=now&apiKey={YOUR_API_KEY} HTTP/1.1
Host: gnss.hereapi.com

Request GPS and Galileo predictions with a specific start time

GET /v2/prediction?gps=1772380800&gal=1772380800&apiKey={YOUR_API_KEY} HTTP/1.1
Host: gnss.hereapi.com

Request predictions in JER encoding

GET /v2/prediction?gps=now&encoding=jer&apiKey={YOUR_API_KEY} HTTP/1.1
Host: gnss.hereapi.com

Request predictions with bearer token

GET /v2/prediction?gps=now&glo=now HTTP/1.1
Host: gnss.hereapi.com
Authorization: Bearer {YOUR_BEARER_TOKEN}

Related information


Did this page help you?