Skip to content

Pirate Weather: A Modern, Developer-Centric, Open-Source, Extensively Documented Weather API

Pirate Weather

Get an API key Try It Now

Publications and Press

Who is using Pirate Weather?

Libraries

Do you use Pirate Weather? Open a pull request to add it to the list.

Introduction

Weather forecasts are primarily found using models run by government agencies, but the outputs aren't easy to use or in formats built for the web. To try to address this, I've put together a service that reads weather forecasts and serves it following the Dark Sky API style.

Before going any farther, I wanted to add a link to sign up and support this project! Running this on AWS means that it scales beautifully and is much more reliable than if I was trying to host this, but also costs real money. I'd love to keep this project going long-term, but I'm still paying back my student loans, which limits how much I can spend on this! Anything helps, and a $2 monthly donation lets me raise your API limit from 10,000 calls/ month to 20,000 calls per month.

Alternatively, I also have a GitHub Sponsorship page set up on my profile! This gives the option to make a one-time donation to contribute this project. This project (especially the free tier) wouldn't be possible without the ongoing support from the project sponsors, so they're the heros here!

Recent Updates- Spring 2026

Up to version 2.9.6! As always, details are available in the changelog.

  • Added the hosted MCP server as per PR #638 and PR #641.
  • Added city/country location requests such as Ottawa,Canada or New%20York,US as per PR #642.
  • Changed fireIndex to be calculated from temperature, humidity, and wind speed wherever those inputs are available as per PR #643.
  • Added AI models behind the include=aimodels flag as per PR #610.
  • Extended historic data requests back to 7 days using the days=7 flag as per PR #624.

MCP Server

In addition to the main REST endpoint, Pirate Weather exposes a new, hosted MCP server for apps and agents that support remote streamable HTTP MCP servers. Add it to your MCP client with this URL:

https://mcp.pirateweather.net/mcp?apikey=<APIKEY>

Replace <APIKEY> with your Pirate Weather API key. The MCP server uses the same API key as regular forecast requests, returns Pirate Weather API version 2 style responses, and adds a timeISO field next to returned UNIX time fields for easier reading.

The available tools include forecast, current weather, hourly forecast, minutely forecast, tomorrow forecast, daily forecast, alerts, historical weather, weather summary, API connection status, and subscription status helpers. Most forecast tools accept units and lang; supported units are auto, us, si, ca, uk, and uk2.

Background

This project started from two points: as part of my PhD, I had to become very familiar with working with NOAA forecast results (https://orcid.org/0000-0003-4725-3251). Separately, an old tablet set up as a "Magic Mirror,” and was using a weather module that relied on the Dark Sky API, as well as my Home Assistant setup. So when I heard that it was shutting down, I thought, "I wonder if I could do this.” Plus, I love learning new things (http://alexanderrey.ca/), and I had been looking for a project to learn Python on, so this seemed like the perfect opportunity! Spoiler alert, but it was way more difficult than I thought, but learned a lot throughout the process, and I think the end result turned out really well!

Why?

This API is designed to be a drop in replacement/ alternative to the Dark Sky API, and as a tool for assessing GFS, HRRR and NBM forecasts via a JSON API. This solves two goals:

  1. It will also allow legacy applications to continue running after the Dark Sky shutdown, since as Home Assistant Integrations, Magic Mirror cards, and a whole host of other applications that have been developed over the years.
  2. For anyone that is interested in knowing exactly how your weather forecasts are generated, this is the "show me the numbers" approach, since the data returned is directly from NOAA models, and every processing step I do is documented. There are lots of existing services that provide custom forecasts using their own unique technologies, which can definitely improve accuracy, but I'm an engineer, so I wanted to be able to know what's going into the forecasts I'm using. If you're the sort of person who wants a dense 34-page PowerPoint about why it rained when the forecast said it wouldn't, then this might be for you.
  3. I wanted to provide a more community focused source of weather data. Weather is local, but I'm only in one spot, so I rely on people filing issues to help improve the forecast!