{
 "openapi": "3.1.0",
 "info": {
  "title": "status.live API",
  "version": "v1",
  "summary": "Live status of ski lifts, theme park rides, national parks, campgrounds, surf and harbors.",
  "description": "Live status of the physical world, as JSON: ski lifts, theme park rides, national parks, campgrounds, surf and harbors, read from each operator's own site and from official sources (NOAA, NPS, Parks Canada, Caltrans, ...). The same data as status.live's pages and its MCP server.\n\n## Access\n- **No sign-in, no key.** Base URL: `https://status.live/api/v1`.\n- **Free for personal and non-commercial use.** Commercial use needs a license: [terms](https://status.live/terms), info@status.live.\n- **Rate limit:** 120 requests a minute per IP; over it, `429` with `Retry-After`. Need more? Write to info@status.live.\n- **CORS** is open: call it from a browser.\n\n## Freshness\nEvery live section says how current it is:\n- `as_of`: when we read it from the source (ISO 8601, UTC); `age_s`: its age in seconds;\n- `stale`: older than about three refreshes of that source (lifts and rides 15 min, roads 30 min, park alerts 90 min, buoys 3 h, campgrounds 12 h, weather a day);\n- `state`: what the data means, e.g. lifts are `reported`, `none_listed` (the board lists no lifts, usually off-season: not \"closed\") or `source_error` (we couldn't read it: unknown).\n\nA source that fails never fails the request: its section says `source_error` and the rest answers. Weather and snow are model values (Open-Meteo), marked `model: true`.\n\n## Speed\nAnswers are cached as long as each source's own refresh (`Cache-Control`). Pass `?wait_ms=1500` to get an answer within that time: slow parts come back as `{\"state\": \"loading\"}` and keep loading, so a second call shortly after has them.\n\n## Conventions\nsnake_case fields; times in UTC unless named `*_local`; metric units named in the key (`temp_c`, `depth_m`, `speed_kt`). `/v1` only ever gains fields. Errors: `{\"error\": {\"code\", \"message\"}}`; an unknown id gets `404` with `suggestions`.\n\n## Attribution\nShow `meta.attribution` where you show the data (it includes credits sources require, e.g. \"Powered by Queue-Times.com\"). `meta.sources` lists each source and its license.",
  "termsOfService": "https://status.live/terms",
  "contact": {
   "name": "status.live",
   "email": "info@status.live",
   "url": "https://status.live"
  },
  "license": {
   "name": "Free for personal and non-commercial use; commercial use needs a license",
   "url": "https://status.live/terms"
  }
 },
 "security": [],
 "servers": [
  {
   "url": "https://status.live/api/v1",
   "description": "Production"
  }
 ],
 "externalDocs": {
  "description": "MCP server for AI assistants",
  "url": "https://status.live/connect"
 },
 "tags": [
  {
   "name": "Search",
   "description": "Find anything by name or place."
  },
  {
   "name": "Ski",
   "description": "Lift status from each resort's own lift board; access roads, model weather and snow, webcams."
  },
  {
   "name": "National parks",
   "description": "US national parks (NPS) and Canada (Parks Canada): alerts, road events, campgrounds open today, fires, air quality."
  },
  {
   "name": "Theme parks",
   "description": "Ride status and posted waits from Queue-Times.com (credit required: see meta.attribution)."
  },
  {
   "name": "Campgrounds",
   "description": "NPS and Forest Service campgrounds: open today, booking links."
  },
  {
   "name": "Surf",
   "description": "Waves now from the nearest NOAA buoy (or labelled model values), tides, swell forecast."
  },
  {
   "name": "Marine",
   "description": "Beta. Harbors: NWS advisories and coastal forecast, wind and waves, water temperature, tides and currents."
  },
  {
   "name": "Webcams",
   "description": "A catalog of webcams that actually work: Caltrans highway cameras, ski resorts, landmarks (Wikidata). Each is checked about every 12 hours: `working` (its image changed), `frozen` (unchanged since the last check), `offline` (errors, or a \"Temporarily Unavailable\" card), `unverified` (a page we can only reach, not watch). Every camera carries its license and attribution."
  },
  {
   "name": "Status",
   "description": "The status of status.live itself: each upstream source, the ski lift boards, webcams and the API."
  }
 ],
 "paths": {
  "/search": {
   "get": {
    "tags": [
     "Search"
    ],
    "operationId": "search",
    "summary": "Search every category",
    "description": "Ski resorts, parks, campgrounds, surf spots and harbors by name, region or id; best matches first.",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "description": "Words to find, e.g. a name or a place",
      "schema": {
       "type": "string",
       "example": "tahoe"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 50,
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "count": {
           "type": "integer"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "type": {
              "enum": [
               "ski_resort",
               "theme_park",
               "national_park",
               "campground",
               "surf_spot",
               "harbor"
              ]
             },
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "area": {
              "oneOf": [
               {
                "type": "string"
               },
               {
                "type": "null"
               }
              ]
             },
             "url": {
              "type": "string",
              "format": "uri",
              "description": "Its status.live page"
             },
             "api_url": {
              "type": "string",
              "format": "uri",
              "description": "Its status in this API"
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "No query (`q`)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/ski/resorts": {
   "get": {
    "tags": [
     "Ski"
    ],
    "operationId": "listSkiResorts",
    "summary": "List ski resorts",
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Country name",
      "schema": {
       "type": "string",
       "example": "United States"
      }
     },
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "State, province or region",
      "schema": {
       "type": "string",
       "example": "California"
      }
     },
     {
      "name": "pass",
      "in": "query",
      "required": false,
      "description": "Season pass: `ikon` or `epic`",
      "schema": {
       "type": "string",
       "example": "ikon"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "resorts": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Resort"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         },
         "required": [
          "count",
          "resorts",
          "meta"
         ]
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/ski/resorts/{id}": {
   "get": {
    "tags": [
     "Ski"
    ],
    "operationId": "getSkiResort",
    "summary": "Get a resort's live status",
    "description": "Every lift's status from the resort's own lift board, official road conditions on its access routes (where we have a source), model weather and snow at the lower and upper lift elevations, webcams (the resort's own first; some with their position on the mountain) and nearby resorts.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "The resort's id, as in its status.live URL (also in every list and search result).",
      "schema": {
       "type": "string",
       "example": "palisades"
      }
     },
     {
      "name": "wait_ms",
      "in": "query",
      "required": false,
      "description": "Answer within this many milliseconds (300-10000). Parts not ready by then come back as `{\"state\": \"loading\"}` and keep loading in the background, so asking again shortly gets them; such an answer is not cached. Without it the API waits for every source (cached answers take ~100 ms; a cold one up to ~5 s).",
      "schema": {
       "type": "integer",
       "minimum": 300,
       "maximum": 10000,
       "example": 1500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "resort": {
           "allOf": [
            {
             "$ref": "#/components/schemas/Resort"
            },
            {
             "type": "object",
             "properties": {
              "opening": {
               "oneOf": [
                {
                 "type": "string",
                 "format": "date"
                },
                {
                 "type": "null"
                }
               ],
               "description": "Opening day, while the season has not started"
              },
              "website": {
               "oneOf": [
                {
                 "type": "string",
                 "format": "uri"
                },
                {
                 "type": "null"
                }
               ]
              }
             }
            }
           ]
          },
          "lifts": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/Lifts"
            },
            {
             "$ref": "#/components/schemas/Loading"
            },
            {
             "type": "null"
            }
           ]
          },
          "roads": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/Roads"
            },
            {
             "$ref": "#/components/schemas/Loading"
            },
            {
             "type": "null"
            }
           ]
          },
          "weather": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/Weather"
            },
            {
             "$ref": "#/components/schemas/Loading"
            },
            {
             "type": "null"
            }
           ]
          },
          "webcams": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/ResortWebcams"
            },
            {
             "$ref": "#/components/schemas/Loading"
            }
           ]
          },
          "nearby": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "name": {
              "type": "string"
             },
             "km": {
              "type": "number"
             },
             "api_url": {
              "type": "string",
              "format": "uri"
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        },
        "example": {
         "resort": {
          "id": "palisades",
          "name": "Palisades Tahoe",
          "country": "United States",
          "region": "California",
          "location": {
           "lat": 39.196045,
           "lon": -120.233299
          },
          "elevation": {
           "lower_m": 1889,
           "upper_m": 2667
          },
          "passes": [
           "ikon"
          ],
          "url": "https://status.live/ski/palisades",
          "api_url": "https://status.live/api/v1/ski/resorts/palisades",
          "opening": "2026-11-21",
          "website": "https://www.palisadestahoe.com/mountain-information/lift-and-grooming-status"
         },
         "lifts": {
          "state": "reported",
          "as_of": "2026-12-20T17:41:50Z",
          "age_s": 95,
          "stale": false,
          "counts": {
           "open": 31,
           "hold": 2,
           "scheduled": 1,
           "closed": 5,
           "total": 39
          },
          "items": [
           {
            "name": "Aerial Tram",
            "status": "open"
           },
           {
            "name": "KT-22 Express",
            "status": "hold"
           },
           {
            "name": "Gold Coast Funitel",
            "status": "open"
           }
          ],
          "source": {
           "name": "palisadestahoe.com",
           "url": "https://www.palisadestahoe.com/mountain-information/lift-and-grooming-status"
          }
         },
         "roads": {
          "state": "reported",
          "as_of": "2026-12-20T17:39:02Z",
          "age_s": 263,
          "stale": false,
          "source": {
           "name": "Caltrans chain controls",
           "url": "https://roads.dot.ca.gov/"
          },
          "items": [
           {
            "road": "I-80",
            "clear": false,
            "text": "Chains are required on all vehicles except four wheel drive vehicles with snow tread tires.",
            "code": "R-2",
            "since": "2026-12-20T05:12:00"
           }
          ]
         },
         "weather": {
          "model": true,
          "as_of": "2026-12-20T16:58:11Z",
          "age_s": 2714,
          "stale": false,
          "source": {
           "name": "Open-Meteo",
           "url": "https://open-meteo.com",
           "license": "CC BY 4.0"
          },
          "days": [
           {
            "date": "2026-12-20",
            "conditions": "Snow",
            "max_c": -2,
            "min_c": -9,
            "snow_cm": 18,
            "precip_chance": 90,
            "sunrise_local": "2026-12-20T07:16",
            "sunset_local": "2026-12-20T16:41"
           }
          ],
          "snow": {
           "glacier": false,
           "lower": {
            "elevation_m": 1889,
            "depth_m": 0.9,
            "past_7d_cm": 41,
            "past_30d_cm": 118,
            "next_7d_cm": 35
           },
           "upper": {
            "elevation_m": 2667,
            "depth_m": 1.6,
            "past_7d_cm": 58,
            "past_30d_cm": 160,
            "next_7d_cm": 52
           }
          }
         },
         "webcams": {
          "resort": [
           {
            "name": "Olympic Valley base: Funitel",
            "image_url": "https://relay.ozolio.com/pub.api?cmd=poster&oid=EMB_ZIGI00000147",
            "thumb_url": "https://status.live/cam/still?u=https%3A%2F%2Frelay.ozolio.com%2Fpub.api%3Fcmd%3Dposter%26oid%3DEMB_ZIGI00000147",
            "player_url": "https://relay.ozolio.com/pub.api?cmd=embed&oid=EMB_ZIGI00000147",
            "source_url": "https://www.palisadestahoe.com/mountain-information/webcams",
            "credit": "official",
            "location": {
             "lat": 39.19582,
             "lon": -120.23559
            },
            "near": "Gold Coast Funitel, base station",
            "lift_line": true
           }
          ],
          "road": [
           {
            "name": "I-80 at Donner Summit",
            "image_url": "https://cwwp2.dot.ca.gov/data/d3/cctv/image/hwy80atdonnersummit/hwy80atdonnersummit.jpg",
            "thumb_url": "https://cwwp2.dot.ca.gov/data/d3/cctv/image/hwy80atdonnersummit/hwy80atdonnersummit.jpg",
            "hls_url": "https://wzmedia.dot.ca.gov/D3/80_Donner_Summit_JWO_NEV80_EB.stream/playlist.m3u8",
            "source_url": "https://quickmap.dot.ca.gov/",
            "credit": "Caltrans",
            "km": 19
           }
          ]
         },
         "nearby": [
          {
           "id": "alpine",
           "name": "Alpine Meadows",
           "km": 4,
           "api_url": "https://status.live/api/v1/ski/resorts/alpine"
          }
         ],
         "meta": {
          "generated_at": "2026-12-20T17:43:25Z",
          "api_version": "v1",
          "terms": "https://status.live/terms",
          "attribution": "status.live (https://status.live)",
          "sources": [
           {
            "name": "palisadestahoe.com"
           },
           {
            "name": "Open-Meteo",
            "url": "https://open-meteo.com",
            "license": "CC BY 4.0"
           }
          ]
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id. `suggestions` lists close matches.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "code": "not_found",
          "message": "No ski resort \"palisade\".",
          "suggestions": [
           {
            "id": "palisades",
            "name": "Palisades Tahoe",
            "url": "https://status.live/api/v1/ski/resorts/palisades"
           }
          ]
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/ski/open": {
   "get": {
    "tags": [
     "Ski"
    ],
    "operationId": "listOpenSkiResorts",
    "summary": "List resorts with lifts running now",
    "description": "Resorts whose lift board listed running lifts at status.live's last check (every board is checked about every 90 minutes).",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "resorts_checked": {
           "type": "integer"
          },
          "resorts": {
           "type": "array",
           "items": {
            "allOf": [
             {
              "$ref": "#/components/schemas/Resort"
             },
             {
              "type": "object",
              "properties": {
               "lifts_open": {
                "type": "integer"
               },
               "lifts_total": {
                "type": "integer"
               },
               "as_of": {
                "type": "string",
                "format": "date-time"
               }
              }
             }
            ]
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/nationalparks": {
   "get": {
    "tags": [
     "National parks"
    ],
    "operationId": "listNationalParks",
    "summary": "List national parks",
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "`United States` or `Canada`",
      "schema": {
       "type": "string",
       "example": "United States"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "parks": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/NationalPark"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         },
         "required": [
          "count",
          "parks",
          "meta"
         ]
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/nationalparks/{id}": {
   "get": {
    "tags": [
     "National parks"
    ],
    "operationId": "getNationalPark",
    "summary": "Get a national park's live status",
    "description": "US parks (NPS park code, e.g. `yose`): alerts, road events, access road conditions, campgrounds and visitor centers open today, NWS warnings, wildfires within 50 km, air quality, weather, webcams. Canadian parks (e.g. `banff`): bulletins, weather alerts, fire hotspots, air quality, weather, webcams.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "The park's id, as in its status.live URL (also in every list and search result).",
      "schema": {
       "type": "string",
       "example": "yose"
      }
     },
     {
      "name": "wait_ms",
      "in": "query",
      "required": false,
      "description": "Answer within this many milliseconds (300-10000). Parts not ready by then come back as `{\"state\": \"loading\"}` and keep loading in the background, so asking again shortly gets them; such an answer is not cached. Without it the API waits for every source (cached answers take ~100 ms; a cold one up to ~5 s).",
      "schema": {
       "type": "integer",
       "minimum": 300,
       "maximum": 10000,
       "example": 1500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "anyOf": [
          {
           "$ref": "#/components/schemas/UsParkStatus"
          },
          {
           "$ref": "#/components/schemas/CanadaParkStatus"
          }
         ],
         "description": "US parks have alerts and campgrounds; Canadian parks have bulletins."
        }
       }
      }
     },
     "404": {
      "description": "Unknown id. `suggestions` lists close matches.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "code": "not_found",
          "message": "No ski resort \"palisade\".",
          "suggestions": [
           {
            "id": "palisades",
            "name": "Palisades Tahoe",
            "url": "https://status.live/api/v1/ski/resorts/palisades"
           }
          ]
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/themeparks": {
   "get": {
    "tags": [
     "Theme parks"
    ],
    "operationId": "listThemeParks",
    "summary": "List theme parks",
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Country name",
      "schema": {
       "type": "string",
       "example": "United States"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "parks": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/ThemePark"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         },
         "required": [
          "count",
          "parks",
          "meta"
         ]
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/themeparks/{id}": {
   "get": {
    "tags": [
     "Theme parks"
    ],
    "operationId": "getThemePark",
    "summary": "Get a theme park's rides and waits",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "The park's id, as in its status.live URL (also in every list and search result).",
      "schema": {
       "type": "string",
       "example": "disneyland"
      }
     },
     {
      "name": "wait_ms",
      "in": "query",
      "required": false,
      "description": "Answer within this many milliseconds (300-10000). Parts not ready by then come back as `{\"state\": \"loading\"}` and keep loading in the background, so asking again shortly gets them; such an answer is not cached. Without it the API waits for every source (cached answers take ~100 ms; a cold one up to ~5 s).",
      "schema": {
       "type": "integer",
       "minimum": 300,
       "maximum": 10000,
       "example": 1500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "park": {
           "$ref": "#/components/schemas/ThemePark"
          },
          "rides": {
           "allOf": [
            {
             "$ref": "#/components/schemas/Freshness"
            },
            {
             "type": "object",
             "properties": {
              "state": {
               "enum": [
                "reported",
                "none_open",
                "source_error"
               ],
               "description": "`none_open`: every ride closed, usually the park is closed now"
              },
              "open": {
               "type": "integer"
              },
              "total": {
               "type": "integer"
              },
              "lands": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "name": {
                  "oneOf": [
                   {
                    "type": "string"
                   },
                   {
                    "type": "null"
                   }
                  ]
                 },
                 "rides": {
                  "type": "array",
                  "items": {
                   "type": "object",
                   "properties": {
                    "name": {
                     "type": "string"
                    },
                    "open": {
                     "type": "boolean"
                    },
                    "wait_min": {
                     "oneOf": [
                      {
                       "type": "integer"
                      },
                      {
                       "type": "null"
                      }
                     ],
                     "description": "Posted wait; null when closed"
                    }
                   }
                  }
                 }
                }
               }
              },
              "source": {
               "$ref": "#/components/schemas/Source"
              }
             }
            }
           ]
          },
          "weather": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/Weather"
            },
            {
             "$ref": "#/components/schemas/Loading"
            },
            {
             "type": "null"
            }
           ]
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id. `suggestions` lists close matches.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "code": "not_found",
          "message": "No ski resort \"palisade\".",
          "suggestions": [
           {
            "id": "palisades",
            "name": "Palisades Tahoe",
            "url": "https://status.live/api/v1/ski/resorts/palisades"
           }
          ]
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/campgrounds": {
   "get": {
    "tags": [
     "Campgrounds"
    ],
    "operationId": "listCampgrounds",
    "summary": "List campgrounds",
    "parameters": [
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "US state name or code",
      "schema": {
       "type": "string",
       "example": "Utah"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "campgrounds": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Campground"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         },
         "required": [
          "count",
          "campgrounds",
          "meta"
         ]
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/campgrounds/{id}": {
   "get": {
    "tags": [
     "Campgrounds"
    ],
    "operationId": "getCampground",
    "summary": "Get a campground's status today",
    "description": "NPS campgrounds: open or closed today by the park's published schedule. Forest Service: the status the forest lists (`not_listed` means unknown, not closed). Plus booking link and weather.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "The campground's id, as in its status.live URL (also in every list and search result).",
      "schema": {
       "type": "string",
       "example": "upper-pines"
      }
     },
     {
      "name": "wait_ms",
      "in": "query",
      "required": false,
      "description": "Answer within this many milliseconds (300-10000). Parts not ready by then come back as `{\"state\": \"loading\"}` and keep loading in the background, so asking again shortly gets them; such an answer is not cached. Without it the API waits for every source (cached answers take ~100 ms; a cold one up to ~5 s).",
      "schema": {
       "type": "integer",
       "minimum": 300,
       "maximum": 10000,
       "example": 1500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "campground": {
           "allOf": [
            {
             "$ref": "#/components/schemas/Campground"
            },
            {
             "type": "object",
             "properties": {
              "website": {
               "oneOf": [
                {
                 "type": "string",
                 "format": "uri"
                },
                {
                 "type": "null"
                }
               ]
              },
              "booking_url": {
               "oneOf": [
                {
                 "type": "string",
                 "format": "uri"
                },
                {
                 "type": "null"
                }
               ]
              },
              "first_come": {
               "oneOf": [
                {
                 "type": "boolean"
                },
                {
                 "type": "null"
                }
               ]
              },
              "sites": {
               "oneOf": [
                {
                 "type": "integer"
                },
                {
                 "type": "null"
                }
               ]
              },
              "season": {
               "oneOf": [
                {
                 "type": "string"
                },
                {
                 "type": "null"
                }
               ]
              },
              "fees": {
               "oneOf": [
                {
                 "type": "string"
                },
                {
                 "type": "null"
                }
               ]
              }
             }
            }
           ]
          },
          "today": {
           "allOf": [
            {
             "$ref": "#/components/schemas/Freshness"
            },
            {
             "type": "object",
             "properties": {
              "state": {
               "enum": [
                "open",
                "closed",
                "temporarily_closed",
                "not_listed",
                "source_error"
               ]
              },
              "date": {
               "type": "string",
               "format": "date"
              },
              "changes_on": {
               "oneOf": [
                {
                 "type": "string",
                 "format": "date"
                },
                {
                 "type": "null"
                }
               ],
               "description": "The date the schedule changes (NPS)"
              },
              "source": {
               "$ref": "#/components/schemas/Source"
              }
             }
            }
           ]
          },
          "weather": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/Weather"
            },
            {
             "$ref": "#/components/schemas/Loading"
            },
            {
             "type": "null"
            }
           ]
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id. `suggestions` lists close matches.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "code": "not_found",
          "message": "No ski resort \"palisade\".",
          "suggestions": [
           {
            "id": "palisades",
            "name": "Palisades Tahoe",
            "url": "https://status.live/api/v1/ski/resorts/palisades"
           }
          ]
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/surf": {
   "get": {
    "tags": [
     "Surf"
    ],
    "operationId": "listSurfSpots",
    "summary": "List surf spots",
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Country name",
      "schema": {
       "type": "string",
       "example": "United States"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "spots": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/SurfSpot"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         },
         "required": [
          "count",
          "spots",
          "meta"
         ]
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/surf/{id}": {
   "get": {
    "tags": [
     "Surf"
    ],
    "operationId": "getSurfSpot",
    "summary": "Get a surf spot's conditions",
    "description": "Waves now from the nearest NOAA NDBC buoy within 150 km (`measured: true`), else model values; tides (NOAA predictions, or model); the swell forecast; weather; webcams.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "The spot's id, as in its status.live URL (also in every list and search result).",
      "schema": {
       "type": "string",
       "example": "pipeline"
      }
     },
     {
      "name": "wait_ms",
      "in": "query",
      "required": false,
      "description": "Answer within this many milliseconds (300-10000). Parts not ready by then come back as `{\"state\": \"loading\"}` and keep loading in the background, so asking again shortly gets them; such an answer is not cached. Without it the API waits for every source (cached answers take ~100 ms; a cold one up to ~5 s).",
      "schema": {
       "type": "integer",
       "minimum": 300,
       "maximum": 10000,
       "example": 1500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "spot": {
           "$ref": "#/components/schemas/SurfSpot"
          },
          "now": {
           "allOf": [
            {
             "$ref": "#/components/schemas/Freshness"
            },
            {
             "type": "object",
             "properties": {
              "state": {
               "enum": [
                "reported",
                "none_nearby",
                "source_error"
               ]
              },
              "measured": {
               "type": "boolean"
              },
              "buoy": {
               "type": "object",
               "properties": {
                "id": {
                 "type": "string"
                },
                "name": {
                 "type": "string"
                },
                "km": {
                 "type": "number",
                 "description": "Distance from the place"
                }
               }
              },
              "waves": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "height_m": {
                   "type": "number"
                  },
                  "period_s": {
                   "oneOf": [
                    {
                     "type": "number"
                    },
                    {
                     "type": "null"
                    }
                   ]
                  },
                  "from": {
                   "oneOf": [
                    {
                     "oneOf": [
                      {
                       "type": "string"
                      },
                      {
                       "type": "number"
                      }
                     ]
                    },
                    {
                     "type": "null"
                    }
                   ],
                   "description": "Compass point or degrees it comes from, as reported"
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              },
              "swell": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "height_m": {
                   "type": "number"
                  },
                  "period_s": {
                   "oneOf": [
                    {
                     "type": "number"
                    },
                    {
                     "type": "null"
                    }
                   ]
                  },
                  "from": {
                   "oneOf": [
                    {
                     "oneOf": [
                      {
                       "type": "string"
                      },
                      {
                       "type": "number"
                      }
                     ]
                    },
                    {
                     "type": "null"
                    }
                   ],
                   "description": "Compass point or degrees it comes from, as reported"
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              },
              "wind_waves": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "height_m": {
                   "type": "number"
                  },
                  "period_s": {
                   "oneOf": [
                    {
                     "type": "number"
                    },
                    {
                     "type": "null"
                    }
                   ]
                  },
                  "from": {
                   "oneOf": [
                    {
                     "oneOf": [
                      {
                       "type": "string"
                      },
                      {
                       "type": "number"
                      }
                     ]
                    },
                    {
                     "type": "null"
                    }
                   ],
                   "description": "Compass point or degrees it comes from, as reported"
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              },
              "water_c": {
               "oneOf": [
                {
                 "type": "number"
                },
                {
                 "type": "null"
                }
               ]
              },
              "wind": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "speed_ms": {
                   "type": "number"
                  },
                  "gust_ms": {
                   "oneOf": [
                    {
                     "type": "number"
                    },
                    {
                     "type": "null"
                    }
                   ]
                  },
                  "from_deg": {
                   "oneOf": [
                    {
                     "type": "number"
                    },
                    {
                     "type": "null"
                    }
                   ]
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              },
              "model_wind": {
               "type": "object",
               "properties": {
                "speed_kmh": {
                 "type": "number"
                },
                "from_deg": {
                 "type": "number"
                }
               }
              },
              "source": {
               "$ref": "#/components/schemas/Source"
              }
             }
            }
           ]
          },
          "tides": {
           "oneOf": [
            {
             "type": "object",
             "properties": {
              "source": {
               "$ref": "#/components/schemas/Source"
              },
              "station": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "id": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "km": {
                   "type": "number",
                   "description": "Distance from the place"
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              },
              "events": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "time_local": {
                  "type": "string"
                 },
                 "type": {
                  "enum": [
                   "high",
                   "low"
                  ]
                 },
                 "height_m": {
                  "type": "number",
                  "description": "Above mean lower low water (NOAA) or model"
                 }
                }
               }
              }
             }
            },
            {
             "type": "null"
            }
           ]
          },
          "forecast": {
           "oneOf": [
            {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "date": {
                "type": "string",
                "format": "date"
               },
               "wave_min_m": {
                "type": "number"
               },
               "wave_max_m": {
                "type": "number"
               },
               "swell": {
                "oneOf": [
                 {
                  "type": "object",
                  "properties": {
                   "height_m": {
                    "type": "number"
                   },
                   "period_s": {
                    "oneOf": [
                     {
                      "type": "number"
                     },
                     {
                      "type": "null"
                     }
                    ]
                   },
                   "from": {
                    "oneOf": [
                     {
                      "oneOf": [
                       {
                        "type": "string"
                       },
                       {
                        "type": "number"
                       }
                      ]
                     },
                     {
                      "type": "null"
                     }
                    ],
                    "description": "Compass point or degrees it comes from, as reported"
                   }
                  }
                 },
                 {
                  "type": "null"
                 }
                ]
               },
               "morning_wind_kmh": {
                "oneOf": [
                 {
                  "type": "number"
                 },
                 {
                  "type": "null"
                 }
                ]
               },
               "morning_wind_from_deg": {
                "oneOf": [
                 {
                  "type": "number"
                 },
                 {
                  "type": "null"
                 }
                ]
               }
              }
             }
            },
            {
             "$ref": "#/components/schemas/Loading"
            }
           ]
          },
          "weather": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/Weather"
            },
            {
             "$ref": "#/components/schemas/Loading"
            },
            {
             "type": "null"
            }
           ]
          },
          "webcams": {
           "oneOf": [
            {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/Webcam"
             }
            },
            {
             "$ref": "#/components/schemas/Loading"
            }
           ]
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id. `suggestions` lists close matches.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "code": "not_found",
          "message": "No ski resort \"palisade\".",
          "suggestions": [
           {
            "id": "palisades",
            "name": "Palisades Tahoe",
            "url": "https://status.live/api/v1/ski/resorts/palisades"
           }
          ]
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/webcams": {
   "get": {
    "tags": [
     "Webcams"
    ],
    "operationId": "listWebcams",
    "summary": "Find webcams",
    "description": "By place (`near` + `radius_km`, nearest first), region, area, tag or status. `status=working` gives only cameras that worked at their last check.",
    "parameters": [
     {
      "name": "near",
      "in": "query",
      "required": false,
      "description": "`lat,lon`; sorts by distance",
      "schema": {
       "type": "string",
       "example": "39.32,-120.33"
      }
     },
     {
      "name": "radius_km",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "minimum": 1,
       "maximum": 200,
       "default": 25
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "working",
        "frozen",
        "offline",
        "unverified",
        "unchecked"
       ]
      }
     },
     {
      "name": "tag",
      "in": "query",
      "required": false,
      "description": "`road`, `ski`, `lift_line`, `landmark`, `city`, `mountain`, `water`, `bridge`",
      "schema": {
       "type": "string",
       "example": "road"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": false,
      "description": "Country name",
      "schema": {
       "type": "string",
       "example": "United States"
      }
     },
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "State, province or (outside the US and Canada) country",
      "schema": {
       "type": "string",
       "example": "California"
      }
     },
     {
      "name": "area",
      "in": "query",
      "required": false,
      "description": "County, district or place; empty for none",
      "schema": {
       "type": "string",
       "example": "Nevada County"
      }
     },
     {
      "name": "source",
      "in": "query",
      "required": false,
      "description": "`caltrans`, `curated` (ski resorts) or `wikidata`",
      "schema": {
       "type": "string",
       "example": "caltrans"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 500,
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "webcams": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/CatalogWebcam"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Bad parameter",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/webcams/regions": {
   "get": {
    "tags": [
     "Webcams"
    ],
    "operationId": "listWebcamRegions",
    "summary": "Count webcams by region",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "regions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "country": {
              "oneOf": [
               {
                "type": "string"
               },
               {
                "type": "null"
               }
              ]
             },
             "region": {
              "oneOf": [
               {
                "type": "string"
               },
               {
                "type": "null"
               }
              ]
             },
             "cameras": {
              "type": "integer"
             },
             "working": {
              "type": "integer"
             },
             "url": {
              "oneOf": [
               {
                "type": "string",
                "format": "uri"
               },
               {
                "type": "null"
               }
              ]
             },
             "api_url": {
              "oneOf": [
               {
                "type": "string",
                "format": "uri"
               },
               {
                "type": "null"
               }
              ]
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/webcams/areas": {
   "get": {
    "tags": [
     "Webcams"
    ],
    "operationId": "listWebcamAreas",
    "summary": "Count webcams by area within a region",
    "parameters": [
     {
      "name": "region",
      "in": "query",
      "required": true,
      "description": "Region, as in /webcams/regions",
      "schema": {
       "type": "string",
       "example": "California"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "region": {
           "type": "string"
          },
          "count": {
           "type": "integer"
          },
          "areas": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "area": {
              "oneOf": [
               {
                "type": "string"
               },
               {
                "type": "null"
               }
              ]
             },
             "cameras": {
              "type": "integer"
             },
             "working": {
              "type": "integer"
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "No region",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/webcams/pages": {
   "get": {
    "tags": [
     "Webcams"
    ],
    "operationId": "listWebcamPages",
    "summary": "Every working camera with its page",
    "description": "Each working camera and the address of its page on status.live, in one list (the site builds its sitemap from it).",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "webcams": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string"
             },
             "region": {
              "type": "string"
             },
             "area": {
              "oneOf": [
               {
                "type": "string"
               },
               {
                "type": "null"
               }
              ]
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "last_changed": {
              "oneOf": [
               {
                "type": "string",
                "format": "date-time"
               },
               {
                "type": "null"
               }
              ]
             }
            }
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/webcams/stats": {
   "get": {
    "tags": [
     "Webcams"
    ],
    "operationId": "getWebcamStats",
    "summary": "Liveness report",
    "description": "Cameras by status and by source, why the broken ones fail, those that went down in the last two days, the largest regions, and the checking itself (checks in the last 24 hours, overdue checks, each source's last sync).",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "cameras": {
           "type": "integer"
          },
          "by_status": {
           "type": "object",
           "properties": {
            "working": {
             "type": "integer"
            },
            "frozen": {
             "type": "integer"
            },
            "offline": {
             "type": "integer"
            },
            "unverified": {
             "type": "integer"
            },
            "unchecked": {
             "type": "integer"
            },
            "retired": {
             "type": "integer"
            }
           }
          },
          "checked_once": {
           "type": "integer"
          },
          "by_source": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "source": {
              "type": "string"
             },
             "cameras": {
              "type": "integer"
             },
             "working": {
              "type": "integer"
             },
             "frozen": {
              "type": "integer"
             },
             "offline": {
              "type": "integer"
             },
             "unverified": {
              "type": "integer"
             },
             "unchecked": {
              "type": "integer"
             }
            }
           }
          },
          "failures": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "reason": {
              "type": "string"
             },
             "cameras": {
              "type": "integer"
             }
            }
           }
          },
          "recently_down": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/CatalogWebcam"
           }
          },
          "regions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "region": {
              "type": "string"
             },
             "cameras": {
              "type": "integer"
             },
             "working": {
              "type": "integer"
             },
             "checked": {
              "type": "integer"
             }
            }
           }
          },
          "pipeline": {
           "type": "object",
           "properties": {
            "checks_24h": {
             "type": "integer"
            },
            "ok_24h": {
             "type": "integer"
            },
            "changed_24h": {
             "type": "integer"
            },
            "overdue": {
             "type": "integer"
            },
            "check_interval_h": {
             "type": "integer"
            },
            "syncs": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "source": {
                "type": "string"
               },
               "at": {
                "type": "string",
                "format": "date-time"
               },
               "cameras": {
                "type": "integer"
               }
              }
             }
            }
           }
          },
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/status": {
   "get": {
    "tags": [
     "Status"
    ],
    "operationId": "getStatus",
    "summary": "Status of status.live",
    "description": "Each upstream source's success rate over 24 hours and 7 days, from real reads, and a health: `healthy`, `degraded` (under 90% over 24 hours, or more failures than successes in the last 2), `down` (3+ failures and nothing worked in the last 2 hours), `idle` (no reads in 24 hours). Also the ski lift boards (every resort checked about every 90 minutes; flagged ones: failing, went empty, shrank), the webcams catalog's checking, and the API's own errors and speed. The same report as https://status.live/status.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "overall": {
           "enum": [
            "healthy",
            "degraded",
            "down"
           ]
          },
          "ski": {
           "type": "object",
           "properties": {
            "health": {
             "enum": [
              "healthy",
              "degraded",
              "down",
              "idle"
             ]
            },
            "resorts": {
             "type": "integer"
            },
            "checked_6h": {
             "type": "integer"
            },
            "outcomes_6h": {
             "type": "object",
             "properties": {
              "ok": {
               "type": "integer"
              },
              "empty": {
               "type": "integer"
              },
              "error": {
               "type": "integer"
              }
             }
            },
            "flagged": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "id": {
                "type": "string"
               },
               "name": {
                "type": "string"
               },
               "flag": {
                "enum": [
                 "error",
                 "went-empty",
                 "shrank"
                ]
               },
               "error": {
                "oneOf": [
                 {
                  "type": "string"
                 },
                 {
                  "type": "null"
                 }
                ]
               },
               "checked_at": {
                "type": "string",
                "format": "date-time"
               }
              }
             }
            },
            "monitor_last_run": {
             "oneOf": [
              {
               "type": "string",
               "format": "date-time"
              },
              {
               "type": "null"
              }
             ]
            },
            "oldest_check": {
             "oneOf": [
              {
               "type": "string",
               "format": "date-time"
              },
              {
               "type": "null"
              }
             ]
            }
           }
          },
          "sources": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "source": {
              "type": "string"
             },
             "categories": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "health": {
              "enum": [
               "healthy",
               "degraded",
               "down",
               "idle"
              ]
             },
             "fetches_24h": {
              "type": "integer"
             },
             "success_24h": {
              "oneOf": [
               {
                "type": "number"
               },
               {
                "type": "null"
               }
              ],
              "description": "Percent of reads that worked"
             },
             "success_7d": {
              "oneOf": [
               {
                "type": "number"
               },
               {
                "type": "null"
               }
              ]
             },
             "avg_ms_24h": {
              "oneOf": [
               {
                "type": "integer"
               },
               {
                "type": "null"
               }
              ]
             },
             "last_ok": {
              "oneOf": [
               {
                "type": "string",
                "format": "date-time"
               },
               {
                "type": "null"
               }
              ]
             },
             "last_failure": {
              "oneOf": [
               {
                "type": "object",
                "properties": {
                 "at": {
                  "type": "string",
                  "format": "date-time"
                 },
                 "error": {
                  "oneOf": [
                   {
                    "type": "string"
                   },
                   {
                    "type": "null"
                   }
                  ]
                 }
                }
               },
               {
                "type": "null"
               }
              ]
             }
            }
           }
          },
          "webcams": {
           "oneOf": [
            {
             "type": "object",
             "properties": {
              "health": {
               "enum": [
                "healthy",
                "degraded",
                "down",
                "idle"
               ]
              },
              "cameras": {
               "type": "integer"
              },
              "working": {
               "type": "integer"
              },
              "offline": {
               "type": "integer"
              },
              "frozen": {
               "type": "integer"
              },
              "unchecked": {
               "type": "integer"
              },
              "overdue": {
               "type": "integer"
              },
              "last_check": {
               "oneOf": [
                {
                 "type": "string",
                 "format": "date-time"
                },
                {
                 "type": "null"
                }
               ]
              }
             }
            },
            {
             "type": "null"
            }
           ]
          },
          "api": {
           "oneOf": [
            {
             "type": "object",
             "properties": {
              "health": {
               "enum": [
                "healthy",
                "degraded",
                "down",
                "idle"
               ]
              },
              "requests_24h": {
               "type": "integer"
              },
              "server_errors_24h": {
               "type": "integer"
              },
              "avg_ms_24h": {
               "oneOf": [
                {
                 "type": "integer"
                },
                {
                 "type": "null"
                }
               ]
              }
             }
            },
            {
             "type": "null"
            }
           ]
          },
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/webcams/{id}": {
   "get": {
    "tags": [
     "Webcams"
    ],
    "operationId": "getWebcam",
    "summary": "Get a webcam",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "The webcam's id, as in its status.live URL (also in every list and search result).",
      "schema": {
       "type": "string",
       "example": "caltrans-d3-hwy80atdonnersummit"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "webcam": {
           "$ref": "#/components/schemas/CatalogWebcam"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id. `suggestions` lists close matches.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "code": "not_found",
          "message": "No ski resort \"palisade\".",
          "suggestions": [
           {
            "id": "palisades",
            "name": "Palisades Tahoe",
            "url": "https://status.live/api/v1/ski/resorts/palisades"
           }
          ]
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/marine": {
   "get": {
    "tags": [
     "Marine"
    ],
    "operationId": "listHarbors",
    "summary": "List harbors",
    "parameters": [
     {
      "name": "region",
      "in": "query",
      "required": false,
      "description": "US state or territory",
      "schema": {
       "type": "string",
       "example": "California"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "harbors": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Harbor"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         },
         "required": [
          "count",
          "harbors",
          "meta"
         ]
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/marine/{id}": {
   "get": {
    "tags": [
     "Marine"
    ],
    "operationId": "getHarbor",
    "summary": "Get a harbor's conditions",
    "description": "Beta. Not for navigation. NWS advisories and coastal waters forecast for its zone, wind and waves now (NDBC), water temperature, tide and current predictions (NOAA).",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "The harbor's id, as in its status.live URL (also in every list and search result).",
      "schema": {
       "type": "string",
       "example": "san-francisco"
      }
     },
     {
      "name": "wait_ms",
      "in": "query",
      "required": false,
      "description": "Answer within this many milliseconds (300-10000). Parts not ready by then come back as `{\"state\": \"loading\"}` and keep loading in the background, so asking again shortly gets them; such an answer is not cached. Without it the API waits for every source (cached answers take ~100 ms; a cold one up to ~5 s).",
      "schema": {
       "type": "integer",
       "minimum": 300,
       "maximum": 10000,
       "example": 1500
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "harbor": {
           "allOf": [
            {
             "$ref": "#/components/schemas/Harbor"
            },
            {
             "type": "object",
             "properties": {
              "zone": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "id": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              }
             }
            }
           ]
          },
          "advisories": {
           "oneOf": [
            {
             "allOf": [
              {
               "$ref": "#/components/schemas/Freshness"
              },
              {
               "type": "object",
               "properties": {
                "state": {
                 "enum": [
                  "reported",
                  "source_error"
                 ]
                },
                "items": {
                 "type": "array",
                 "items": {
                  "type": "object",
                  "properties": {
                   "event": {
                    "type": "string"
                   },
                   "headline": {
                    "oneOf": [
                     {
                      "type": "string"
                     },
                     {
                      "type": "null"
                     }
                    ]
                   },
                   "ends_local": {
                    "oneOf": [
                     {
                      "type": "string"
                     },
                     {
                      "type": "null"
                     }
                    ]
                   }
                  }
                 }
                },
                "source": {
                 "$ref": "#/components/schemas/Source"
                }
               }
              }
             ]
            },
            {
             "type": "null"
            }
           ]
          },
          "wind": {
           "oneOf": [
            {
             "allOf": [
              {
               "$ref": "#/components/schemas/Freshness"
              },
              {
               "type": "object",
               "properties": {
                "station": {
                 "type": "object",
                 "properties": {
                  "id": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "km": {
                   "type": "number",
                   "description": "Distance from the place"
                  }
                 }
                },
                "speed_kt": {
                 "type": "number"
                },
                "gust_kt": {
                 "oneOf": [
                  {
                   "type": "number"
                  },
                  {
                   "type": "null"
                  }
                 ]
                },
                "from_deg": {
                 "oneOf": [
                  {
                   "type": "number"
                  },
                  {
                   "type": "null"
                  }
                 ]
                },
                "source": {
                 "$ref": "#/components/schemas/Source"
                }
               }
              }
             ]
            },
            {
             "type": "null"
            }
           ]
          },
          "waves": {
           "oneOf": [
            {
             "allOf": [
              {
               "$ref": "#/components/schemas/Freshness"
              },
              {
               "type": "object",
               "properties": {
                "station": {
                 "type": "object",
                 "properties": {
                  "id": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "km": {
                   "type": "number",
                   "description": "Distance from the place"
                  }
                 }
                },
                "height_m": {
                 "type": "number"
                },
                "period_s": {
                 "oneOf": [
                  {
                   "type": "number"
                  },
                  {
                   "type": "null"
                  }
                 ]
                },
                "from_deg": {
                 "oneOf": [
                  {
                   "type": "number"
                  },
                  {
                   "type": "null"
                  }
                 ]
                },
                "source": {
                 "$ref": "#/components/schemas/Source"
                }
               }
              }
             ]
            },
            {
             "type": "null"
            }
           ]
          },
          "water": {
           "oneOf": [
            {
             "allOf": [
              {
               "$ref": "#/components/schemas/Freshness"
              },
              {
               "type": "object",
               "properties": {
                "temp_c": {
                 "type": "number"
                },
                "station": {
                 "oneOf": [
                  {
                   "type": "object",
                   "properties": {
                    "id": {
                     "type": "string"
                    },
                    "name": {
                     "type": "string"
                    },
                    "km": {
                     "type": "number",
                     "description": "Distance from the place"
                    }
                   }
                  },
                  {
                   "type": "null"
                  }
                 ]
                },
                "source": {
                 "$ref": "#/components/schemas/Source"
                }
               }
              }
             ]
            },
            {
             "type": "null"
            }
           ]
          },
          "forecast": {
           "oneOf": [
            {
             "type": "object",
             "properties": {
              "issued": {
               "type": "string",
               "format": "date-time"
              },
              "periods": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "name": {
                  "type": "string"
                 },
                 "text": {
                  "type": "string"
                 }
                }
               }
              },
              "source": {
               "$ref": "#/components/schemas/Source"
              }
             }
            },
            {
             "type": "null"
            }
           ]
          },
          "tides": {
           "oneOf": [
            {
             "type": "object",
             "properties": {
              "station": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "id": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "km": {
                   "type": "number",
                   "description": "Distance from the place"
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              },
              "events": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "time_local": {
                  "type": "string"
                 },
                 "type": {
                  "enum": [
                   "high",
                   "low"
                  ]
                 },
                 "height_m": {
                  "type": "number",
                  "description": "Above mean lower low water (NOAA) or model"
                 }
                }
               }
              },
              "source": {
               "$ref": "#/components/schemas/Source"
              }
             }
            },
            {
             "type": "null"
            }
           ]
          },
          "currents": {
           "oneOf": [
            {
             "type": "object",
             "properties": {
              "station": {
               "oneOf": [
                {
                 "type": "object",
                 "properties": {
                  "id": {
                   "type": "string"
                  },
                  "name": {
                   "type": "string"
                  },
                  "km": {
                   "type": "number",
                   "description": "Distance from the place"
                  }
                 }
                },
                {
                 "type": "null"
                }
               ]
              },
              "events": {
               "type": "array",
               "items": {
                "type": "object",
                "properties": {
                 "time_local": {
                  "type": "string"
                 },
                 "type": {
                  "enum": [
                   "flood",
                   "ebb",
                   "slack"
                  ]
                 },
                 "speed_kt": {
                  "type": "number"
                 }
                }
               }
              },
              "source": {
               "$ref": "#/components/schemas/Source"
              }
             }
            },
            {
             "type": "null"
            }
           ]
          },
          "weather": {
           "oneOf": [
            {
             "$ref": "#/components/schemas/Weather"
            },
            {
             "$ref": "#/components/schemas/Loading"
            },
            {
             "type": "null"
            }
           ]
          },
          "webcams": {
           "oneOf": [
            {
             "type": "array",
             "items": {
              "$ref": "#/components/schemas/Webcam"
             }
            },
            {
             "$ref": "#/components/schemas/Loading"
            }
           ]
          },
          "beta": {
           "const": true
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown id. `suggestions` lists close matches.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        },
        "example": {
         "error": {
          "code": "not_found",
          "message": "No ski resort \"palisade\".",
          "suggestions": [
           {
            "id": "palisades",
            "name": "Palisades Tahoe",
            "url": "https://status.live/api/v1/ski/resorts/palisades"
           }
          ]
         }
        }
       }
      }
     },
     "429": {
      "description": "Rate limited: 120 requests a minute per IP. Wait `Retry-After` seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        },
        "description": "Seconds to wait"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Location": {
    "oneOf": [
     {
      "type": "object",
      "properties": {
       "lat": {
        "type": "number"
       },
       "lon": {
        "type": "number"
       }
      },
      "required": [
       "lat",
       "lon"
      ]
     },
     {
      "type": "null"
     }
    ]
   },
   "Source": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "license": {
      "type": "string"
     }
    },
    "required": [
     "name"
    ]
   },
   "Freshness": {
    "type": "object",
    "properties": {
     "as_of": {
      "oneOf": [
       {
        "type": "string",
        "format": "date-time"
       },
       {
        "type": "null"
       }
      ],
      "description": "When it was read from the source (UTC)"
     },
     "age_s": {
      "oneOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "description": "Its age in seconds"
     },
     "stale": {
      "type": "boolean",
      "description": "Older than about three refreshes of its source"
     }
    },
    "required": [
     "as_of",
     "age_s",
     "stale"
    ]
   },
   "Loading": {
    "type": "object",
    "properties": {
     "state": {
      "const": "loading"
     }
    },
    "required": [
     "state"
    ],
    "description": "Not ready within ?wait_ms; still loading, ask again shortly."
   },
   "Meta": {
    "type": "object",
    "properties": {
     "generated_at": {
      "type": "string",
      "format": "date-time"
     },
     "api_version": {
      "const": "v1"
     },
     "terms": {
      "type": "string",
      "format": "uri"
     },
     "attribution": {
      "type": "string",
      "description": "Show this where you show the data"
     },
     "sources": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Source"
      }
     }
    },
    "required": [
     "generated_at",
     "api_version",
     "terms",
     "attribution",
     "sources"
    ]
   },
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "object",
      "properties": {
       "code": {
        "enum": [
         "not_found",
         "missing_query",
         "no_such_endpoint",
         "method_not_allowed",
         "rate_limited",
         "internal_error"
        ]
       },
       "message": {
        "type": "string"
       },
       "suggestions": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "url": {
           "type": "string",
           "format": "uri"
          }
         }
        }
       }
      },
      "required": [
       "code",
       "message"
      ]
     }
    },
    "required": [
     "error"
    ]
   },
   "Resort": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "country": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "region": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "location": {
      "$ref": "#/components/schemas/Location"
     },
     "elevation": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "lower_m": {
          "type": "number"
         },
         "upper_m": {
          "oneOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         }
        }
       },
       {
        "type": "null"
       }
      ]
     },
     "passes": {
      "type": "array",
      "items": {
       "enum": [
        "ikon",
        "epic"
       ]
      }
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     }
    },
    "required": [
     "id",
     "name",
     "url",
     "api_url"
    ]
   },
   "Lifts": {
    "allOf": [
     {
      "$ref": "#/components/schemas/Freshness"
     },
     {
      "type": "object",
      "properties": {
       "state": {
        "enum": [
         "reported",
         "none_listed",
         "source_error"
        ],
        "description": "`none_listed`: the board lists no lifts, usually off-season (not \"closed\"). `source_error`: unknown."
       },
       "stale_reason": {
        "type": "string",
        "description": "The board didn't answer just now; this is its last good reading"
       },
       "error": {
        "type": "string",
        "description": "Why the board could not be read"
       },
       "last_listed": {
        "type": "object",
        "properties": {
         "as_of": {
          "type": "string",
          "format": "date-time"
         },
         "lifts": {
          "type": "integer"
         }
        },
        "description": "The last time the board listed lifts (when it lists none now)"
       },
       "counts": {
        "oneOf": [
         {
          "type": "object",
          "properties": {
           "open": {
            "type": "integer"
           },
           "hold": {
            "type": "integer"
           },
           "scheduled": {
            "type": "integer"
           },
           "closed": {
            "type": "integer"
           },
           "total": {
            "type": "integer"
           }
          }
         },
         {
          "type": "null"
         }
        ]
       },
       "items": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "name": {
           "type": "string"
          },
          "status": {
           "enum": [
            "open",
            "hold",
            "scheduled",
            "closed"
           ]
          }
         }
        }
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       }
      }
     }
    ]
   },
   "Roads": {
    "allOf": [
     {
      "$ref": "#/components/schemas/Freshness"
     },
     {
      "type": "object",
      "properties": {
       "state": {
        "enum": [
         "reported",
         "source_error"
        ]
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       },
       "items": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "road": {
           "type": "string"
          },
          "clear": {
           "type": "boolean",
           "description": "No restriction"
          },
          "text": {
           "type": "string",
           "description": "The source's own words"
          },
          "code": {
           "type": "string",
           "description": "e.g. Caltrans chain control R-2"
          },
          "since": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    ]
   },
   "Weather": {
    "allOf": [
     {
      "$ref": "#/components/schemas/Freshness"
     },
     {
      "type": "object",
      "properties": {
       "model": {
        "const": true,
        "description": "Model values, not measurements"
       },
       "source": {
        "$ref": "#/components/schemas/Source"
       },
       "days": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "date": {
           "type": "string",
           "format": "date"
          },
          "conditions": {
           "type": "string"
          },
          "max_c": {
           "type": "number"
          },
          "min_c": {
           "type": "number"
          },
          "snow_cm": {
           "type": "number"
          },
          "precip_chance": {
           "type": "number",
           "description": "Percent"
          },
          "precip_type": {
           "type": "string"
          },
          "sunrise_local": {
           "type": "string"
          },
          "sunset_local": {
           "type": "string"
          }
         }
        }
       },
       "snow": {
        "type": "object",
        "properties": {
         "glacier": {
          "type": "boolean"
         },
         "lower": {
          "$ref": "#/components/schemas/SnowAt"
         },
         "upper": {
          "oneOf": [
           {
            "$ref": "#/components/schemas/SnowAt"
           },
           {
            "type": "null"
           }
          ]
         }
        },
        "description": "Ski resorts: model snow at the lower and upper lift elevations"
       }
      }
     }
    ]
   },
   "SnowAt": {
    "type": "object",
    "properties": {
     "elevation_m": {
      "type": "number"
     },
     "depth_m": {
      "oneOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "description": "Absent on glaciers"
     },
     "past_7d_cm": {
      "type": "number"
     },
     "past_30d_cm": {
      "type": "number"
     },
     "next_7d_cm": {
      "type": "number"
     }
    }
   },
   "Webcam": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string"
     },
     "kind": {
      "enum": [
       "official",
       "road",
       "nearby"
      ],
      "description": "official: the place's own; road: on an access road; nearby: towns and coast around. Not on ski resorts, whose two groups say it (ResortWebcams)"
     },
     "image_url": {
      "oneOf": [
       {
        "type": "string",
        "format": "uri"
       },
       {
        "type": "null"
       }
      ],
      "description": "Full-size current still"
     },
     "thumb_url": {
      "oneOf": [
       {
        "type": "string",
        "format": "uri"
       },
       {
        "type": "null"
       }
      ],
      "description": "Still at tile size (640 px)"
     },
     "player_url": {
      "type": "string",
      "format": "uri",
      "description": "Embeddable live player page"
     },
     "hls_url": {
      "type": "string",
      "format": "uri",
      "description": "Live HLS stream (road cameras)"
     },
     "timelapse_url": {
      "type": "string",
      "format": "uri",
      "description": "Embeddable day timelapse (Windy's)"
     },
     "source_url": {
      "oneOf": [
       {
        "type": "string",
        "format": "uri"
       },
       {
        "type": "null"
       }
      ],
      "description": "The camera's own page"
     },
     "credit": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "km": {
      "type": "number"
     },
     "location": {
      "$ref": "#/components/schemas/Location"
     },
     "near": {
      "type": "string",
      "description": "The lift or base it shows"
     },
     "approx_location": {
      "type": "boolean"
     },
     "lift_line": {
      "type": "boolean",
      "description": "A lift line is in view"
     }
    },
    "required": [
     "name"
    ]
   },
   "ResortWebcams": {
    "type": "object",
    "properties": {
     "resort": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Webcam"
      }
     },
     "road": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Webcam"
      }
     }
    },
    "required": [
     "resort",
     "road"
    ],
    "description": "A ski resort's webcams in two groups, as its page shows them. `resort`: cameras we know are the resort's own (curated from its site). `road`: road and nearby: highway cameras on the access routes (Caltrans) and every other camera around, including any we can't confirm is the resort's."
   },
   "NationalPark": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "country": {
      "enum": [
       "United States",
       "Canada"
      ]
     },
     "designation": {
      "type": "string"
     },
     "regions": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "location": {
      "$ref": "#/components/schemas/Location"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "UsParkStatus": {
    "type": "object",
    "properties": {
     "park": {
      "allOf": [
       {
        "$ref": "#/components/schemas/NationalPark"
       },
       {
        "type": "object",
        "properties": {
         "website": {
          "type": "string",
          "format": "uri"
         }
        }
       }
      ]
     },
     "alerts": {
      "allOf": [
       {
        "$ref": "#/components/schemas/Freshness"
       },
       {
        "type": "object",
        "properties": {
         "state": {
          "enum": [
           "reported",
           "source_error"
          ]
         },
         "items": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "category": {
             "type": "string"
            },
            "title": {
             "type": "string"
            },
            "description": {
             "type": "string"
            },
            "url": {
             "oneOf": [
              {
               "type": "string",
               "format": "uri"
              },
              {
               "type": "null"
              }
             ]
            }
           }
          }
         }
        }
       }
      ]
     },
     "access_roads": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Roads"
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "roads": {
      "oneOf": [
       {
        "allOf": [
         {
          "$ref": "#/components/schemas/Freshness"
         },
         {
          "type": "object",
          "properties": {
           "state": {
            "type": "string"
           },
           "items": {
            "type": "array",
            "items": {
             "type": "object",
             "properties": {
              "road": {
               "type": "string"
              },
              "closed": {
               "type": "boolean"
              },
              "type": {
               "type": "string"
              },
              "description": {
               "type": "string"
              },
              "start": {
               "oneOf": [
                {
                 "type": "string"
                },
                {
                 "type": "null"
                }
               ]
              },
              "end": {
               "oneOf": [
                {
                 "type": "string"
                },
                {
                 "type": "null"
                }
               ]
              }
             }
            }
           }
          }
         }
        ]
       },
       {
        "type": "null"
       }
      ]
     },
     "weather_alerts": {
      "oneOf": [
       {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "event": {
           "type": "string"
          },
          "severity": {
           "type": "string"
          },
          "headline": {
           "type": "string"
          },
          "ends": {
           "oneOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ]
          }
         }
        }
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "fires": {
      "oneOf": [
       {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "name": {
           "type": "string"
          },
          "acres": {
           "type": "number"
          },
          "contained_pct": {
           "oneOf": [
            {
             "type": "number"
            },
            {
             "type": "null"
            }
           ]
          },
          "km": {
           "type": "number"
          },
          "prescribed": {
           "type": "boolean"
          }
         }
        }
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "air": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "us_aqi": {
          "type": "integer"
         },
         "pm25": {
          "type": "number"
         },
         "category": {
          "type": "string"
         }
        }
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "date": {
      "type": "string",
      "format": "date"
     },
     "campgrounds": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "open_today": {
         "type": "boolean"
        },
        "changes_on": {
         "oneOf": [
          {
           "type": "string",
           "format": "date"
          },
          {
           "type": "null"
          }
         ]
        },
        "alert": {
         "type": "boolean",
         "description": "Named in a current alert"
        },
        "sites": {
         "type": "integer"
        },
        "reservable": {
         "type": "boolean"
        },
        "location": {
         "$ref": "#/components/schemas/Location"
        },
        "url": {
         "oneOf": [
          {
           "type": "string",
           "format": "uri"
          },
          {
           "type": "null"
          }
         ]
        },
        "reservation_url": {
         "oneOf": [
          {
           "type": "string",
           "format": "uri"
          },
          {
           "type": "null"
          }
         ]
        }
       }
      }
     },
     "visitor_centers": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "open_today": {
         "type": "boolean"
        },
        "changes_on": {
         "oneOf": [
          {
           "type": "string",
           "format": "date"
          },
          {
           "type": "null"
          }
         ]
        },
        "location": {
         "$ref": "#/components/schemas/Location"
        }
       }
      }
     },
     "weather": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Weather"
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "webcams": {
      "type": "object",
      "properties": {
       "live": {
        "oneOf": [
         {
          "type": "array",
          "items": {
           "$ref": "#/components/schemas/Webcam"
          }
         },
         {
          "$ref": "#/components/schemas/Loading"
         }
        ]
       },
       "official": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "title": {
           "type": "string"
          },
          "url": {
           "type": "string",
           "format": "uri"
          }
         }
        }
       }
      }
     },
     "meta": {
      "$ref": "#/components/schemas/Meta"
     }
    }
   },
   "CanadaParkStatus": {
    "type": "object",
    "properties": {
     "park": {
      "allOf": [
       {
        "$ref": "#/components/schemas/NationalPark"
       },
       {
        "type": "object",
        "properties": {
         "website": {
          "type": "string",
          "format": "uri"
         }
        }
       }
      ]
     },
     "bulletins": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "state": {
          "type": "string"
         },
         "items": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "title": {
             "type": "string"
            },
            "date": {
             "type": "string"
            },
            "url": {
             "type": "string",
             "format": "uri"
            }
           }
          }
         }
        }
       },
       {
        "type": "null"
       }
      ]
     },
     "access_roads": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Roads"
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "weather_alerts": {
      "oneOf": [
       {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "event": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "area": {
           "type": "string"
          },
          "ends": {
           "oneOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ]
          }
         }
        }
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "fire_hotspots": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "count_24h_50km": {
          "type": "integer"
         },
         "nearest_km": {
          "oneOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         }
        }
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "air": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "us_aqi": {
          "type": "integer"
         },
         "pm25": {
          "type": "number"
         },
         "category": {
          "type": "string"
         }
        }
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "weather": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Weather"
       },
       {
        "$ref": "#/components/schemas/Loading"
       },
       {
        "type": "null"
       }
      ]
     },
     "webcams": {
      "type": "object",
      "properties": {
       "live": {
        "oneOf": [
         {
          "type": "array",
          "items": {
           "$ref": "#/components/schemas/Webcam"
          }
         },
         {
          "$ref": "#/components/schemas/Loading"
         }
        ]
       },
       "official": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "title": {
           "type": "string"
          },
          "url": {
           "type": "string",
           "format": "uri"
          }
         }
        }
       }
      }
     },
     "meta": {
      "$ref": "#/components/schemas/Meta"
     }
    }
   },
   "ThemePark": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "group": {
      "type": "string"
     },
     "country": {
      "type": "string"
     },
     "location": {
      "$ref": "#/components/schemas/Location"
     },
     "timezone": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "Campground": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "source": {
      "enum": [
       "nps",
       "usfs"
      ]
     },
     "unit": {
      "type": "string",
      "description": "The national park or forest"
     },
     "region": {
      "type": "string"
     },
     "location": {
      "$ref": "#/components/schemas/Location"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "SurfSpot": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "area": {
      "type": "string"
     },
     "country": {
      "type": "string"
     },
     "location": {
      "$ref": "#/components/schemas/Location"
     },
     "timezone": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "Harbor": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "region": {
      "type": "string"
     },
     "water": {
      "oneOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "location": {
      "$ref": "#/components/schemas/Location"
     },
     "timezone": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     }
    }
   },
   "CatalogWebcam": {
    "allOf": [
     {
      "$ref": "#/components/schemas/Freshness"
     },
     {
      "type": "object",
      "properties": {
       "id": {
        "type": "string"
       },
       "name": {
        "type": "string"
       },
       "kind": {
        "enum": [
         "still",
         "hls",
         "embed",
         "page"
        ],
        "description": "still: an image URL; hls: a live stream; embed: a player page; page: a page with the camera"
       },
       "status": {
        "enum": [
         "working",
         "frozen",
         "offline",
         "unverified",
         "unchecked"
        ]
       },
       "last_ok": {
        "oneOf": [
         {
          "type": "string",
          "format": "date-time"
         },
         {
          "type": "null"
         }
        ]
       },
       "last_changed": {
        "oneOf": [
         {
          "type": "string",
          "format": "date-time"
         },
         {
          "type": "null"
         }
        ],
        "description": "When its image last changed between checks"
       },
       "reason": {
        "type": "string",
        "description": "Why it is not working, e.g. \"placeholder card\""
       },
       "location": {
        "$ref": "#/components/schemas/Location"
       },
       "km": {
        "type": "number",
        "description": "From `near`"
       },
       "country": {
        "oneOf": [
         {
          "type": "string"
         },
         {
          "type": "null"
         }
        ]
       },
       "region": {
        "oneOf": [
         {
          "type": "string"
         },
         {
          "type": "null"
         }
        ]
       },
       "area": {
        "oneOf": [
         {
          "type": "string"
         },
         {
          "type": "null"
         }
        ]
       },
       "route": {
        "oneOf": [
         {
          "type": "string"
         },
         {
          "type": "null"
         }
        ]
       },
       "direction": {
        "oneOf": [
         {
          "type": "string"
         },
         {
          "type": "null"
         }
        ]
       },
       "tags": {
        "type": "array",
        "items": {
         "type": "string"
        }
       },
       "image_url": {
        "oneOf": [
         {
          "type": "string",
          "format": "uri"
         },
         {
          "type": "null"
         }
        ]
       },
       "hls_url": {
        "oneOf": [
         {
          "type": "string",
          "format": "uri"
         },
         {
          "type": "null"
         }
        ]
       },
       "player_url": {
        "oneOf": [
         {
          "type": "string",
          "format": "uri"
         },
         {
          "type": "null"
         }
        ]
       },
       "page_url": {
        "oneOf": [
         {
          "type": "string",
          "format": "uri"
         },
         {
          "type": "null"
         }
        ]
       },
       "near": {
        "type": "object",
        "properties": {
         "ski_resort": {
          "type": "object",
          "properties": {
           "id": {
            "type": "string"
           },
           "km": {
            "oneOf": [
             {
              "type": "number"
             },
             {
              "type": "null"
             }
            ]
           },
           "api_url": {
            "type": "string",
            "format": "uri"
           }
          }
         }
        }
       },
       "license": {
        "type": "string"
       },
       "attribution": {
        "type": "string",
        "description": "Show this with the image"
       },
       "url": {
        "oneOf": [
         {
          "type": "string",
          "format": "uri"
         },
         {
          "type": "null"
         }
        ]
       },
       "api_url": {
        "type": "string",
        "format": "uri"
       }
      },
      "required": [
       "id",
       "name",
       "kind",
       "status",
       "location",
       "license",
       "attribution"
      ]
     }
    ]
   }
  }
 }
}
