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.

Point forecasts, file downloads, route forecasts, and related endpoints.

Endpoints

MethodEndpointDescription
GET/forecast/pointGet forecast at a point
GET/forecast/point/statusCheck forecast availability
GET/forecast/fileList forecast files
GET/forecast/file/{file_id}Download a forecast file
GET/forecast/profileGet vertical profile
GET/forecast/point/optimizedGet optimized point forecast
GET/forecast/point/optimized/statusCheck optimized forecast status
GET/forecast/optimized/bulkList bulk optimized files
GET/forecast/optimized/bulk/{file_id}Download bulk optimized file
GET/forecast/latest/fileList latest forecast files
GET/forecast/latest/pointGet latest point forecast
GET/forecast/powerGet power forecast
POST/forecast/routeGet route forecast

Point Forecast

GET /forecast/point

Retrieve forecast data for a specific latitude/longitude.

Parameters

ParameterTypeRequiredDescription
latnumberYesLatitude (-90 to 90)
lonnumberYesLongitude (-180 to 180)
bundlesstringNoComma-separated Bundle names
issuancestringNoISO 8601 Issuance Time
valid_timestringNoISO 8601 Valid Time or interval
time_bundlestringNoTime Bundle grouping option
unit_systemstringNoSI Units (default) or US Units
productstringNoProduct identifier
tzstringNoTimezone identifier

Example Request

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

Example Response

{
  "meta": {
    "unit_system": "si",
    "forecast": "Spire Operational Forecast"
  },
  "data": [
    {
      "location": {
        "coordinates": {
          "lat": 40.018672,
          "lon": -105.250537
        }
      },
      "times": {
        "issuance_time": "2024-01-15T00:00:00",
        "valid_time": "2024-01-15T00:00:00"
      },
      "values": {
        "relative_humidity": 75.67,
        "air_temperature": 258.00,
        "dew_point_temperature": 257.25,
        "northward_wind": 1.55,
        "eastward_wind": -1.97
      }
    }
  ]
}

Forecast Status

GET /forecast/point/status

Check the availability of a forecast product.

Parameters

ParameterTypeRequiredDescription
issuancestringNoISO 8601 issuance time
productstringNoProduct identifier
bundlesstringNoBundle names

List Forecast Files

GET /forecast/file

Retrieve a list of available forecast files.

Parameters

ParameterTypeRequiredDescription
issuancestringNoISO 8601 issuance time
bundlesstringNoComma-separated Bundle names
time_bundlestringNoTime Bundle grouping option
regionsstringNoComma-separated region names

Example Request

Shell
Python
Node.js
curl -X GET \
  'https://api.wx.spire.com/forecast/file?bundles=basic&regions=global' \
  -H 'spire-api-key: YOUR_API_KEY'

Example Response

{
  "meta": {
    "count": 29
  },
  "files": [
    "sof-d.20240115.t00z.0p25.basic.global.f000.grib2",
    "sof-d.20240115.t00z.0p25.basic.global.f006.grib2",
    "sof-d.20240115.t00z.0p25.basic.global.f012.grib2"
  ]
}

Download Forecast File

GET /forecast/file/{file_id}

Download a specific forecast file.

Path Parameters

ParameterTypeRequiredDescription
file_idstringYesThe filename to download

Example Request

Shell
Python
Node.js
curl -OJL -X GET \
  'https://api.wx.spire.com/forecast/file/sof-d.20240115.t00z.0p25.basic.global.f000.grib2' \
  -H 'spire-api-key: YOUR_API_KEY'

Vertical Profile

GET /forecast/profile

Retrieve a vertical atmospheric profile at a location.

Parameters

ParameterTypeRequiredDescription
latnumberYesLatitude (-90 to 90)
lonnumberYesLongitude (-180 to 180)
bundlesstringNoBundle names
issuancestringNoISO 8601 issuance time
valid_timestringNoValid Time or interval
time_bundlestringNoTime Bundle grouping
productstringNoProduct identifier

Optimized Point Forecast

GET /forecast/point/optimized

Retrieve optimized point forecasts for named locations (airports, ports, etc.) using ICAO Code, WMO ID, or UN/LOCODE identifiers.

Parameters

ParameterTypeRequiredDescription
locationstringNoLocation identifier (ICAO, WMO, UN/LOCODE)
location_idstringNoUUID location identifier
bundlesstringNoBundle names
issuancestringNoISO 8601 issuance time
valid_timestringNoValid Time or interval
time_bundlestringNoTime Bundle grouping
unit_systemstringNosi or us
tzstringNoTimezone

Location Format Examples

TypeExampleDescription
ICAO Codeicao:KDFWAirport identifier
WMO IDwmo:72259Synoptic station ID
UN/LOCODEunlocode:IDJKTPort/city code

Example Request

Shell
Python
Node.js
curl -X GET \
  'https://api.wx.spire.com/forecast/point/optimized?location=icao:KDFW&bundles=basic' \
  -H 'spire-api-key: YOUR_API_KEY'

Latest Forecast Files

GET /forecast/latest/file

Get the most recent forecast files, regardless of issuance time.

Parameters

ParameterTypeRequiredDescription
bundlesstringNoBundle names
regionsstringNoRegion names

Latest Point Forecast

GET /forecast/latest/point

Get the most recent forecast for a point, regardless of issuance time.

Parameters

Same as /forecast/point but without issuance parameter.


Power Forecast

GET /forecast/power

Retrieve power forecasts of aggregated power generation from wind or solar assets over a predetermined geographic region. The forecast predicts actual power output (in megawatts) rather than raw meteorological variables.

Parameters

ParameterTypeRequiredDescription
typestringYeswind, solar, or both comma-separated
regionstringYesOne or more regions, comma-separated
time_bundlestringNoTime grouping (see below)
issuance_timestringNoISO 8601 issuance time (default: most recent)
sourcestringNoNWP data source (default: SRFS)

Available Regions

Region
austria
france
germany
hungary
netherlands
uk

Time Bundles for Power

Time BundleDescription
hourly2-day hourly forecast
3_hourlyEvery 3 hours to day 6
6_hourlyEvery 6 hours to day 6
hourly_6dayEvery hour to day 6 (recommended for maximum time series)

Example Request

Shell
Python
Node.js
curl -X GET \
  'https://api.wx.spire.com/forecast/power?type=solar,wind&region=uk,france&time_bundle=hourly_6day' \
  -H 'spire-api-key: YOUR_API_KEY'

Example Response

{
  "data": [
    {
      "region": "france",
      "source": "srfs",
      "type": "wind",
      "times": {
        "issuance_time": "2024-09-05T12:00:00+00:00",
        "valid_time": "2024-09-05T12:00:00+00:00"
      },
      "values": {
        "power": 2336.83
      }
    },
    {
      "region": "france",
      "source": "srfs",
      "type": "wind",
      "times": {
        "issuance_time": "2024-09-05T12:00:00+00:00",
        "valid_time": "2024-09-05T13:00:00+00:00"
      },
      "values": {
        "power": 2521.23
      }
    }
  ]
}

Output Fields

FieldDescription
regionThe region for this data point
sourceBackground NWP data source (SRFS = Spire high-resolution forecast)
typewind or solar
powerPredicted power output over the previous hour, in megawatts (MW)

Route Forecast

POST /forecast/route

Retrieve forecast data along a route defined by waypoints and times. Unlike the point API where the location is fixed, the route API follows a moving position through time (e.g., a vessel path).

A single route API call returns all supported weather variables you have access to from all data bundles. A maximum of 120 waypoints may be included per request.

Query Parameters

ParameterTypeRequiredDescription
issuance_timestringNoISO 8601 issuance time (default: most recent)
tzstringNoTimezone for response times (default: local time at coordinate)
unit_systemstringNoSI Units (default) or US Units

Request Body

The request body contains the route definition and bundle selection:

{
  "route": {
    "name": "my_route",
    "waypoints": [
      {
        "lat": 26.71,
        "lon": -22.41,
        "time": "2024-01-15T12:00:00"
      },
      {
        "lat": 26.54,
        "lon": -22.48,
        "time": "2024-01-15T13:00:00"
      },
      {
        "lat": 26.23,
        "lon": -22.62,
        "time": "2024-01-15T14:00:00"
      }
    ]
  },
  "bundles": "basic,maritime"
}

Example Request

Shell
Python
Node.js
curl -X POST 'https://api.wx.spire.com/forecast/route' \
  -H 'spire-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "route": {"name": "atlantic_crossing", "waypoints": [
      {"lat": 26.71, "lon": -22.41, "time": "2024-01-15T12:00:00"},
      {"lat": 26.54, "lon": -22.48, "time": "2024-01-15T13:00:00"},
      {"lat": 26.23, "lon": -22.62, "time": "2024-01-15T14:00:00"}
    ]},
    "bundles": "basic,maritime"
  }'

Time Alignment

When requested waypoint times do not align with available forecast times, the API returns data for the nearest available time. The response includes both the matched time and the originally requested time:

{
  "times": {
    "issuance_time": "2024-01-13T12:00:00+00:00",
    "valid_time": "2024-01-15T12:00:00+00:00",
    "requested_valid_time": "2024-01-15T13:10:00+00:00"
  }
}