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
# 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" Parameters
| Name | In | Description |
|---|---|---|
pointsrequired | query | lat,lon pairs separated by |, at most 512. |
evidence | query | Add the route-snow-evidence/1 block. |
revision | query | Your geometry version, echoed back (1–64 letters, digits or ._:-). |
segments | query | Start indices of disconnected segments. |
Response
| Field | Type | Description |
|---|---|---|
evidence | object | |
forecast_24h | object | |
forecast_48h | object |
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)
| Field | Meaning |
|---|---|
schema | route-snow-evidence/1. A breaking change gets a new schema string; additions keep this one. |
revision | The revision you sent, or null. Drop an answer whose revision is not the one you show (a late answer after an edit). |
valid_for | now. 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. |
sampling | points, 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. |
summary | percent_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: observedis the current optical observation.mosaic_14dis 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_tilemeans no observation product covers the point (outside the snow regions, or not produced).
-
-
observed_onis 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 togeneration(additive). - Unknown is never counted as clear.
-
coverage: nonemeans there is no percentage to show.
Failure states (unchanged endpoint behaviour)
| Situation | Answer |
|---|---|
| Snow inputs unreadable (corrupt generation metadata) | 503 snow evidence unavailable |
| Inputs changed during sampling | 503 Retry-After: 1 (retry once) |
| More than 512 points, bad coordinate, bad revision/segments | 400 |
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.