Snow along a route

GET https://api.trailsplits.com/tiles/v1/snow/route-forecast

Checked by a live probe Key optional · 500 credits a day without one

Observed and recent snow cover at up to 512 sampled points, with 24 h and 48 h forecasts kept apart. With evidence=1 the answer carries route-snow-evidence/1: per-point class (snow, clear, unknown) and source, coverage, and a short validity. Unknown is never clear; narrow crossings between samples are not assessed. Points are lat,lon.

Example

Snow along a route (curl)
# Without a key, leave out the Authorization line (500 credits a day per address).
curl --fail-with-body 'https://api.trailsplits.com/tiles/v1/snow/route-forecast?points=46.0207,7.7491%7C46,7.7&evidence=1&revision=example1' \
  -H "Authorization: Bearer $TRAILSPLITS_API_KEY"

Sends a real request, with your key or the keyless allowance.

Parameters

NameInDescription
pointsrequiredquerylat,lon pairs separated by |, at most 512.
evidencequeryAdd the route-snow-evidence/1 block.
revisionqueryYour geometry version, echoed back (1–64 letters, digits or ._:-).
segmentsqueryStart indices of disconnected segments.

Response

FieldTypeDescription
evidenceobject
forecast_24hobject
forecast_48hobject
Full response schema (JSON Schema)
{
  "type": "object",
  "properties": {
    "evidence": {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string",
          "enum": [
            "route-snow-evidence/1"
          ]
        },
        "revision": {
          "type": "string"
        },
        "valid_for": {
          "type": "string"
        },
        "sampling": {
          "type": "object",
          "properties": {
            "points": {
              "type": "integer"
            }
          },
          "required": [
            "points"
          ]
        },
        "summary": {
          "type": "object",
          "properties": {
            "percent_snow": {
              "type": "number"
            },
            "percent_clear": {
              "type": "number"
            },
            "percent_unknown": {
              "type": "number"
            },
            "coverage": {
              "type": "string",
              "enum": [
                "full",
                "partial",
                "none"
              ]
            }
          },
          "required": [
            "percent_snow",
            "percent_clear",
            "percent_unknown",
            "coverage"
          ]
        },
        "points": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "required": [
        "schema",
        "revision",
        "sampling",
        "summary",
        "points"
      ]
    },
    "forecast_24h": {
      "type": "object"
    },
    "forecast_48h": {
      "type": "object"
    }
  },
  "required": [
    "evidence"
  ]
}

Errors

400, 503, plus the gateway's 401, 429 and 503 (error conventions). A refused request costs no credits.

Contract

Request

The existing endpoint, unchanged for everyone who does not ask:

GET https://api.trailsplits.com/tiles/v1/snow/route-forecast
    &release=current&z=13
    &evidence=1                     (opt in to the block below)
    &revision=<1–64 of A–Z a–z 0–9 . _ : ->   (echoed back; your route/plan revision)
    &segments=0,<start>,…           (start index of each disconnected segment; default 0)

Response: evidence (only with evidence=1)

FieldMeaning
schemaroute-snow-evidence/1. A breaking change gets a new schema string; additions keep this one.
revisionThe revision you sent, or null. Drop an answer whose revision is not the one you show (a late answer after an edit).
valid_fornow. The evidence describes the snow at generation.checked_at_utc, never a later date. For a plan's future days, use the forecast fields or say it is not a reading for that day.
samplingpoints, max_points (512), segments[] {id, from, to, length_m}, median_spacing_m, max_spacing_m, between_points. Stated, not assumed: a narrow crossing can lie between two samples; say so from max_spacing_m.
summarypercent_snow/clear/unknown of the sampled points, counts, sources {observed, mosaic_14d}, unknown_reasons {no_tile, obscured}, coverage (full, partial, none).
sections[]Runs of consecutive snow or unknown points inside one segment: segment, class, from_i, to_i, from_m, to_m, points, min_ele_m, max_ele_m. Never across a gap. Distances are along that segment.
points[]One per sample: i, segment, along_m, ele_m, class (snow·clear·unknown), source (observed · mosaic_14d · null), unknown_reason (no_tile · obscured · null), observed_on.

What the product can and cannot say

  • source: observed is the current optical observation. mosaic_14d is the cloud-free mosaic of recent passes, used where the current pass saw nothing: show it as an older observation, not today's.
  • unknown_reason:
    • no_tile means no observation product covers the point (outside the snow regions, or not produced).
  • observed_on is always null in v1. The tiles carry no per-pixel date, and a regional or request date would be a fabrication. Product-level dates, when the serving manifest carries them, will be added to generation (additive).
  • Unknown is never counted as clear.
  • coverage: none means there is no percentage to show.

Failure states (unchanged endpoint behaviour)

SituationAnswer
Snow inputs unreadable (corrupt generation metadata)503 snow evidence unavailable
Inputs changed during sampling503 Retry-After: 1 (retry once)
More than 512 points, bad coordinate, bad revision/segments400

Compatibility

All existing fields (fused, route.samples, forecast.issued_at_utc, cache_evidence.valid_until_utc, …) are unchanged, and evidence appears only when asked. The deployed guide, race, Planner and /route consumers are untouched. Cache-Control: no-store as before.