---
title: 'List trails'
description: '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](/docs/getting-started/authentication) explains public origin and secret IP restrictions.

## Parameters

### Query parameters

| Parameter       | Type    | Required | Default | Description                                                                                                                            |
| --------------- | ------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `country`       | string  | No       | —       | Max length 100                                                                                                                         |
| `mountain`      | string  | No       | —       | Filter by mountain ID                                                                                                                  |
| `open`          | boolean | No       | —       | Filter by open status                                                                                                                  |
| `rating`        | string  | No       | —       | Filter by rating                                                                                                                       |
| `groomed`       | boolean | No       | —       | Filter by groomed status                                                                                                               |
| `glade`         | boolean | No       | —       | Filter by glade status                                                                                                                 |
| `night_skiing`  | boolean | No       | —       | Filter by night skiing status                                                                                                          |
| `zone`          | string  | No       | —       | Filter by zone                                                                                                                         |
| `area`          | string  | No       | —       | Filter by area                                                                                                                         |
| `q`             | string  | No       | —       | Search term for name                                                                                                                   |
| `sortBy`        | string  | No       | `name`  | Sort column. Unsupported columns fall back to the default. Accepted: `name`, `rating`, `open`, `groomed`, `zone`, `area`, `created_at` |
| `sortDirection` | string  | No       | `asc`   | Sort direction. Accepted: `asc`, `desc`                                                                                                |
| `limit`         | integer | No       | `50`    | Pagination limit                                                                                                                       |
| `offset`        | integer | No       | `0`     | Pagination offset                                                                                                                      |
| `fields`        | string  | No       | —       | 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

::code-group

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

```js [JavaScript]
const response = await fetch('https://api.icecoast.us/api/v1/trails?mountain=killington&limit=2', {
  headers: { 'X-API-Key': process.env.ICECOAST_API_KEY },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
console.log(result);
```

```python [Python]
import os
import requests

response = requests.get(
    'https://api.icecoast.us/api/v1/trails?mountain=killington&limit=2',
    headers={'X-API-Key': os.environ['ICECOAST_API_KEY']},
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

::

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](/docs/concepts/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.

```json
{
  "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

| Field              | Type             | Meaning                                                 |
| ------------------ | ---------------- | ------------------------------------------------------- |
| `id`               | integer / string | Opaque canonical trail ID, not a mountain UUID.         |
| `mountain`         | string           | Mountain UUID.                                          |
| `name`             | string           | Trail name.                                             |
| `open`             | boolean / null   | true=open; false=not open; null=unknown.                |
| `rating`           | string / null    | Stored difficulty, not a universal international scale. |
| `groomed`          | boolean / null   | Reported grooming; null is unknown.                     |
| `glade`            | boolean / null   | Glade classification.                                   |
| `night_skiing`     | boolean / null   | Night-skiing classification.                            |
| `zone`             | string / null    | Source grouping.                                        |
| `area`             | string / null    | Source grouping.                                        |
| `last_observed_at` | string / null    | Observation time when present.                          |
| `updated_at`       | string / null    | Record update time when present.                        |
| `created_at`       | string / null    | Record creation time.                                   |
| `mountain_name`    | string           | Parent mountain name.                                   |
| `mountain_slug`    | string           | Parent slug on standalone trail reads.                  |
| `links`            | object           | Related resources.                                      |

Record fields may be missing or null. Treat identifiers as opaque and distinguish unavailable values from confirmed false/zero. See [data semantics](/docs/concepts/data-model).

## Errors

| HTTP status | Meaning                                                                    |
| ----------- | -------------------------------------------------------------------------- |
| 400         | Invalid request parameters where validated.                                |
| 401         | Missing, invalid, expired or revoked API key.                              |
| 403         | Origin/IP restriction or endpoint key-type restriction denied the request. |
| 429         | Monthly API allowance exhausted when a key is used.                        |
| 500         | The resource could not be read.                                            |
| 503         | API-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](/docs/concepts/errors).

## Related resources

- [Get a trail](/docs/reference/trails/detail)

- [Data freshness](/docs/concepts/freshness)
- [OpenAPI specification](/openapi.json){external}
