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.
| Horizon | Product | What it is | Where to find it |
|---|---|---|---|
| Forecast | High-Resolution Forecast (srfs) | Regional 3 km forecasts over Europe and the contiguous United States, initialised with Spire satellite data, delivered as GRIB2 files. | Forecasts |
| Forecast | Global 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 |
| Forecast | AI 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 |
| Forecast | AI 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 |
| Forecast | Optimized Point Forecast | A 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 |
| Forecast | Power production forecasts | Aggregated wind or solar generation in megawatts for a country or market region, hourly to day 6, trained on historical generation data. | Power Forecast |
| Forecast | Maritime Insights | Weather 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 history | Tides | Astronomical tide height relative to mean sea level at 1/16° (about 6 km), hourly, historical and forecast in one query. | Tides |
| Now | Current 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 |
| Now | Lightning density | Rolling 60-minute cloud-to-ground strike counts on a 5 km grid over the contiguous United States, refreshed every 5 minutes. | Lightning |
| Now and history | Storm Tracks | Observed and forecast tropical cyclone tracks aggregated from NHC, CPHC and JTWC, back to 1990. | Storm Tracks |
| History | Historical weather | Global 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
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.comAuthentication¶
An API Key is required for all requests. Include your key in the spire-api-key header:
curl -X GET 'https://api.wx.spire.com/forecast/point?lat=40.0&lon=-105.0' \
-H 'spire-api-key: YOUR_API_KEY'import requests
response = requests.get(
"https://api.wx.spire.com/forecast/point",
params={"lat": 40.0, "lon": -105.0},
headers={"spire-api-key": "YOUR_API_KEY"},
)
data = response.json()const response = await fetch(
"https://api.wx.spire.com/forecast/point?lat=40.0&lon=-105.0",
{ headers: { "spire-api-key": "YOUR_API_KEY" } }
);
const data = await response.json();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:
| Category | Description | Base Path |
|---|---|---|
| Forecasts | Point, file, and route forecasts | /forecast/ |
| Current Weather | Real-time weather observations | /current/weather/ |
| Lightning | Lightning data products | /lightning/ |
| Storm Tracks | Tropical cyclone data | /storm/ |
| Tides | Tidal predictions | /tides/ |
| Archive Data | Historical weather data | /archive/ |
| WMS | OGC Web Map Service layers | /ows/wms |
| Maritime Insights | Route optimization data | /insights/maritime/ |
| Custom Products | Custom data products | /custom/ |
| Soil Moisture | Land surface data products | /soil-moisture/ |
Common Parameters¶
Many endpoints share common query parameters:
| Parameter | Description | Example |
|---|---|---|
lat | Latitude (-90 to 90) | 40.0 |
lon | Longitude (-180 to 180) | -105.0 |
bundles | Bundle selection | basic,maritime |
product | Forecast product (default sof-d) | sof-d |
unit_system | Unit system: si (SI Units), us (US Units, Celsius) or us-f (US Units, Fahrenheit) | si |
issuance_time | Issuance Time | 2024-01-15T00:00:00Z |
valid_time_interval | Valid Time interval (ISO 8601) | 2024-01-15T00:00:00Z/P1D |
time_bundle | Time Bundle (temporal resolution and horizon) | hourly |
tz | Time 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:
| Code | Description |
|---|---|
200 | Success |
302 | Redirect (follow for file downloads) |
400 | Bad Request - Invalid request body |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - A product, bundle, region or time bundle that is not part of your subscription |
404 | Not Found - Resource doesn’t exist, or no data matches the request |
412 | Precondition Failed - Parameters that must be combined were given separately |
422 | Unprocessable - Invalid parameter value, or a required parameter is missing |
429 | Too Many Requests - Rate limit exceeded |
500 | Server 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¶
Quick Start Guide - Make your first API call
File Products Guide - Download forecast files
API Reference - Complete endpoint documentation