Getting a CVS COVID-19 Vaccination Appointment

If you want to get a COVID-19 vaccination appointment at CVS, it doesn't really work to just go to the website and book the soonest available time. You'll get a message saying that they're fully booked. To get an appointment, you basically have to check frequently or get lucky.

Fortunately, the task of refreshing and checking a webpage can be automated in a pretty straightforward way. Here are step-by-step instructions for doing that on the CVS COVID website.

  1. Go to the CVS COVID-19 vaccination page.
  2. Find a state with available appointments and go through the process of entering your information. Even if you start with the wrong state, you will be able to change states during this sequence (thanks to Aimée Birnbaum for pointing out this trick). The last step here is the one where you enter you zip code.
  3. After entering your zip code, open your browser console.
  4. In your console, paste

    Notification.requestPermission()

    and press enter. Approve notifications when the browser asks.

  5. In your console, paste

    setInterval( () => 
      document
        .getElementsByClassName("search-icon")[0]
        .click(), 
      60000
    )

    and press enter.

  6. Several seconds later, paste

    setInterval( () => 
      !document
        .documentElement
        .innerHTML
        .includes("sorry") && 
        new Notification("Check CVS page"), 
      60000
    )

    into your console and press enter.

Then as long as you leave that browser window open, you'll get a Desktop notification if the search returns results that don't include the word "sorry". At that point, you can select and book your appointment.

P.S. It isn't a good habit to paste Javascript from random places into your console, but in this case the code is hopefully simple enough that you can be pretty confident it isn't doing anything malicious.