Trails

List trails

GET /api/v1/trails — List trails.

GET /api/v1/trails

Retrieve a paginated active trails roster. Filter by mountain for a resort conditions view, or combine geographic and operational filters for discovery.

Authentication

An API key is required for external integrations. Send X-API-Key: YOUR_API_KEY or Authorization: Bearer YOUR_API_KEY. Authentication explains public origin and secret IP restrictions.

Parameters

Query parameters

ParameterTypeRequiredDefaultDescription
countrystringNo—Max length 100
mountainstringNo—Filter by mountain ID
openbooleanNo—Filter by open status
ratingstringNo—Filter by rating
groomedbooleanNo—Filter by groomed status
gladebooleanNo—Filter by glade status
night_skiingbooleanNo—Filter by night skiing status
zonestringNo—Filter by zone
areastringNo—Filter by area
qstringNo—Search term for name
sortBystringNonameSort column. Unsupported columns fall back to the default. Accepted: name, rating, open, groomed, zone, area, created_at
sortDirectionstringNoascSort direction. Accepted: asc, desc
limitintegerNo50Pagination limit
offsetintegerNo0Pagination offset
fieldsstringNo—Comma-separated specific fields to fetch

mountain accepts UUID or slug. Only active, non-retired inventory is listed. open=false excludes unknown/null. rating accepts comma-separated case-insensitive substring matches. zone/area are exact; q is a name substring. fields selects recorded columns; id and mountain remain. Unknown column names can fail.

Example request

curl -H "X-API-Key: $ICECOAST_API_KEY" 'https://api.icecoast.us/api/v1/trails?mountain=killington&limit=2'

JavaScript above is a server-side Node.js example. Browser clients must use an origin-restricted public key; never bundle a secret key.

Response

Success is HTTP 200 with success: true, data and meta.version: "v1". cached reports a shared payload-cache hit, not the age of resort conditions. See pagination for meta fields and next/previous links.

The following is a synthetic response excerpt illustrating the verified structure. Names, IDs, counts and dates are examples, not live resort data. Optional fields are omitted.

{
  "success": true,
  "data": [
    {
      "id": 123,
      "mountain": "00000000-0000-4000-8000-000000000001",
      "name": "Example Trail",
      "open": null,
      "rating": "blue",
      "groomed": null,
      "zone": "Main",
      "links": {
        "self": "/api/v1/trails/id/123"
      }
    }
  ],
  "meta": {
    "version": "v1",
    "total": 1,
    "limit": 50,
    "offset": 0,
    "count": 1,
    "hasMore": false,
    "links": {
      "next": null,
      "prev": null
    }
  },
  "cached": false
}

Resource fields

FieldTypeMeaning
idinteger / stringOpaque canonical trail ID, not a mountain UUID.
mountainstringMountain UUID.
namestringTrail name.
openboolean / nulltrue=open; false=not open; null=unknown.
ratingstring / nullStored difficulty, not a universal international scale.
groomedboolean / nullReported grooming; null is unknown.
gladeboolean / nullGlade classification.
night_skiingboolean / nullNight-skiing classification.
zonestring / nullSource grouping.
areastring / nullSource grouping.
last_observed_atstring / nullObservation time when present.
updated_atstring / nullRecord update time when present.
created_atstring / nullRecord creation time.
mountain_namestringParent mountain name.
mountain_slugstringParent slug on standalone trail reads.
linksobjectRelated resources.

Record fields may be missing or null. Treat identifiers as opaque and distinguish unavailable values from confirmed false/zero. See data semantics.

Errors

HTTP statusMeaning
400Invalid request parameters where validated.
401Missing, invalid, expired or revoked API key.
403Origin/IP restriction or endpoint key-type restriction denied the request.
429Monthly API allowance exhausted when a key is used.
500The resource could not be read.
503API-key/quota verification unavailable.

JSON errors may use error or message; the global handler maps validation/runtime errors to success: false, error (name) and message (details). See error handling.