Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The Spire Weather API provides programmatic access to global weather data products. This guide covers authentication, the Base URL, and core concepts.

What Spire Weather Offers

Spire Weather is first of all a forecast provider; the products below are listed forecasts first, then the present-day and historical products.

HorizonProductWhat it isWhere to find it
ForecastHigh-Resolution Forecast (srfs)Regional 3 km forecasts over Europe and the contiguous United States, initialised with Spire satellite data, delivered as GRIB2 files.Forecasts
ForecastGlobal Weather Forecast (sof-d)Spire’s proprietary global model, initialised with radio-occultation and other satellite data, at 1/8° resolution. Hourly steps for the first 48 hours, 3-hourly to day 5 and 6-hourly to day 15, refreshed four times a day. Delivered as JSON (point, route, profile), GRIB2 files and WMS map layers.Forecasts
ForecastAI Weather Forecast (saifs-wx)Spire’s AI ensemble weather forecast on a 0.25° grid: 6-hourly steps to 15 days, every field as ensemble mean and spread, refreshed every 6 hours, delivered as GRIB2 files.Forecasts
ForecastAI Sub-seasonal to Seasonal Forecast (saifs-s2s, regimes)Spire’s AI sub-seasonal ensemble on a 0.5° grid: daily and weekly ensemble means, spreads, anomalies, probabilities and percentiles out to 46 days, plus daily weather-regime probabilities for Europe and North America, refreshed daily, delivered as GRIB2 and CSV files.Forecasts
ForecastOptimized Point ForecastA hyperlocal forecast for a fixed location, produced by combining Spire’s global model with other global and regional models and nearby observations through machine learning. Available for more than 10,000 airports, ports and weather stations, and for customer-defined assets. Refreshed every hour.Optimized Point Forecast
ForecastPower production forecastsAggregated wind or solar generation in megawatts for a country or market region, hourly to day 6, trained on historical generation data.Power Forecast
ForecastMaritime InsightsWeather risk and efficiency assessments for a planned vessel route, derived from the 15-day global forecast and the vessel’s characteristics.Maritime Insights
Forecast and historyTidesAstronomical tide height relative to mean sea level at 1/16° (about 6 km), hourly, historical and forecast in one query.Tides
NowCurrent Weather Conditions (cwc)Global analysis of the weather now at 3 km (0.027°), refreshed every hour and available about 35 minutes after the top of the hour, with the most common surface variables. Files for the past 72 hours stay on the API.Current Weather
NowLightning densityRolling 60-minute cloud-to-ground strike counts on a 5 km grid over the contiguous United States, refreshed every 5 minutes.Lightning
Now and historyStorm TracksObserved and forecast tropical cyclone tracks aggregated from NHC, CPHC and JTWC, back to 1990.Storm Tracks
HistoryHistorical weatherGlobal reanalysis at 1/8° (about 14 km), hourly, from 1 January 1990 to about six days ago; the most recent six days are filled from Spire’s own short-range forecasts. Extracted along a past route (vessel, truck, aircraft) as an asynchronous job.Archive Data

Spire’s satellite-based Soil Moisture Insights (6 km, 500 m and 100 m surface soil moisture) are also served through this API. They have their own documentation site at developers.smi.spire.com; the Soil Moisture page here covers the endpoints.

Your API key is subscribed to a subset of these products, bundles, regions and time bundles. A request for something outside the subscription returns HTTP 403 with the list of values you can use.

Base URL

All API endpoints are relative to:

https://api.wx.spire.com

Authentication

An API Key is required for all requests. Include your key in the spire-api-key header:

Shell
Python
Node.js
curl -X GET 'https://api.wx.spire.com/forecast/point?lat=40.0&lon=-105.0' \
  -H 'spire-api-key: YOUR_API_KEY'

Response Format

All API responses are returned as JSON (except file downloads). A typical response includes:

{
  "meta": {
    "unit_system": "si",
    "forecast": "Spire SOF-D Forecast",
    "units": {
      "air_temperature": "degreeK",
      "wind_speed": "m/s",
      "precipitation_amount": "mm"
    }
  },
  "data": [...]
}

meta.units lists the unit of every field in data[].values, so you never have to infer units from the unit system alone.

Available Endpoints

The API is organized into the following categories:

CategoryDescriptionBase Path
ForecastsPoint, file, and route forecasts/forecast/
Current WeatherReal-time weather observations/current/weather/
LightningLightning data products/lightning/
Storm TracksTropical cyclone data/storm/
TidesTidal predictions/tides/
Archive DataHistorical weather data/archive/
WMSOGC Web Map Service layers/ows/wms
Maritime InsightsRoute optimization data/insights/maritime/
Custom ProductsCustom data products/custom/
Soil MoistureLand surface data products/soil-moisture/

Common Parameters

Many endpoints share common query parameters:

ParameterDescriptionExample
latLatitude (-90 to 90)40.0
lonLongitude (-180 to 180)-105.0
bundlesBundle selectionbasic,maritime
productForecast product (default sof-d)sof-d
unit_systemUnit system: si (SI Units), us (US Units, Celsius) or us-f (US Units, Fahrenheit)si
issuance_timeIssuance Time2024-01-15T00:00:00Z
valid_time_intervalValid Time interval (ISO 8601)2024-01-15T00:00:00Z/P1D
time_bundleTime Bundle (temporal resolution and horizon)hourly
tzTime zone for returned timestamps (IANA name or local)Europe/Amsterdam

Dates and Times

All timestamps sent to and returned by the API use ISO 8601 format. Times are in UTC unless you pass tz to the endpoints that support it.

Rate Limits

API requests are subject to rate limiting based on your subscription tier. If you exceed your rate limit, you’ll receive a 429 Too Many Requests response.

Error Handling

The API uses standard HTTP status codes:

CodeDescription
200Success
302Redirect (follow for file downloads)
400Bad Request - Invalid request body
401Unauthorized - Invalid or missing API key
403Forbidden - A product, bundle, region or time bundle that is not part of your subscription
404Not Found - Resource doesn’t exist, or no data matches the request
412Precondition Failed - Parameters that must be combined were given separately
422Unprocessable - Invalid parameter value, or a required parameter is missing
429Too Many Requests - Rate limit exceeded
500Server Error

Error responses come in three shapes, depending on which service answered.

A subscription (entitlement) error lists the values your key is allowed to use:

{
  "detail": "param: bundles requested: ['solar'] -- allowed: ['basic', 'maritime', 'solar-energy', ...] -- unallowed: ['solar']"
}

A validation error identifies the parameter and what was expected:

{
  "detail": [
    {
      "type": "enum",
      "loc": ["query", "status"],
      "msg": "Input should be 'active', 'inactive' or 'any'",
      "input": "all"
    }
  ]
}

Other errors carry a single message:

{
  "message": "No data found matching the request"
}

Next Steps