---
title: "Building a Ski Resort API"
date: 2022-03-20T00:00:00.000Z
tags: ["projects"]
url: https://matthewhall.com/posts/building-a-ski-resort-api/
---
import YearOfProjects from '@/components/shortcodes/YearOfProjects.astro';

Yes, yes, it's now March. Almost the end of March at that! The last month and a half have been very hectic — I moved, went to [Spain for MWC](https://arborxr.com/blog/barcelona-mobile-world-congress-and-tasty-tapas/), and then got sick! I created Ski API at the start of February before I moved, but this blog post got stuck on the back burner. So I'm choosing to go with a loophole. Even if the blog post wasn't done in February, the project was!

This was an idea that started out as another idea. It was a website that tells you which ski resort near you is the best to ski at today. I live in Vancouver, Canada, and we have many ski resorts near us. I have 3 resorts within a 30-minute drive, with another 3 under 2 hours away. This gluttony of choice can make it hard for many to decide where to ski! Should I stay at a local mountain, or is it worth the trek farther away?

![Vancouver Ski Resorts](/posts/building-a-ski-resort-api/map.png)

As I started down that path, I realized that sourcing the data to build these suggestions didn't exist. So I wrote out the things that mattered the most for an MVP algorithm. It came down to 3 items: lift statuses, snow levels, and weather forecasts. Between these 3 variables, I can make a (relatively) accurate assessment of where it will be best to ski on any given day.

After some research, it became clear that no one offers this data. [Snow Forecast](https://www.snow-forecast.com/resorts/Whistler-Blackcomb/6day/top) offers some snow level details and forecasts, but not all. 
There was one exception - lift statuses. My research led me to the incredible [Liftie project on Github](https://github.com/pirxpilot/liftie). It offers a [simple, clean web interface](https://liftie.info/) for seeing lift status at different ski resorts. But it only solved one of my core needs.

[![Liftie on Github](/posts/building-a-ski-resort-api/liftie-github.jpeg)](https://github.com/pirxpilot/liftie)

I love building APIs. It's what I've spent most of the last decade of my life doing. A few years ago, I created a little [weather embedding API](https://weatherembed.com/) and offered it through [RapidAPI](https://rapidapi.com/random-shapes-random-shapes-default/api/weather-embed). I decided I'd do the same thing with 

After some back and forth, I decided to fork Liftie to add my needed functionality. It's a great project, but there were too many changes I wanted to make. It's designed as a [great, simple web application](https://liftie.info/) rather than my API-only approach.

The codebase is more or less a complete re-write of the Liftie project. All that's left is its base scraping logic. In addition, I've re-done the webserver logic of the database/caching system and added a whack load of new features. It offers a clean simple API for reading all the information about a resort that you would care about.

![API Example](/posts/building-a-ski-resort-api/code.png)

After finishing up [Ski API](https://skiapi.com/), it felt too late in the season to build my original idea of a "where to ski" recommender. It's on my list as my potential project for December! It felt too late in the season to build my original idea of a "where to ski" recommender. It's on my list as my potential project for December!

<a href="https://rapidapi.com/random-shapes-random-shapes-default/api/ski-resorts-and-conditions/" target="_blank">
    <img src="https://files.readme.io/1de5087-rapidapi-badge-light.png" width="215" alt="Connect on RapidAPI"/>
</a>

<YearOfProjects />