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/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/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
GET/forecast/power/sourcesList power forecast sources
POST/forecast/routeGet route forecast

Forecast Products

The product parameter selects the forecast product to query. It defaults to sof-d. Access to each product is controlled by your API key’s entitlements; requesting a product that is not in your subscription returns 403 with the list of products you can access.

The point-style endpoints (point, profile, route) support sof-d. The other products are delivered as files through the File API.

ProductNameAccessBundles
sof-dSpire SOF-D Forecast (global, 0.125°)Point + FilesStandard bundles — see Data Bundles & Variables
cwcSpire Current Weather Conditions (0.027°, hourly)Point + Files via /current/weather/*basic — see Current Weather
srfsSpire Regional Forecast System (3 km)Filescore-v2, upper-air, thunderstorm, derived (core is legacy)
saifs-wxSpire AI Weather Forecast (0.25°, ensemble mean and spread, to 15 days)Filescore, upper-air, derived
saifs-s2sSpire AI Subseasonal-to-Seasonal Forecast (0.5°)Filessurface, upper-air, derived, derived-upper-air, percentiles, probabilities — each at :daily or :weekly resolution (e.g. surface:daily)
saifs-s2s-regimesSpire AI Sub-Seasonal Weather Regime ForecastFilesn/a — one CSV per region
saifs-wx-regimesSpire AI Weather Regime ForecastFilesn/a — one CSV per region

AI Weather Products (SAIFS)

The SAIFS products are generated by Spire’s AI/ML forecast models rather than traditional numerical weather prediction:

SAIFS data is delivered as files. Use the File API to list and download the files for an issuance:

Shell
Python
Node.js
curl -X GET \
  'https://api.wx.spire.com/forecast/file?product=saifs-s2s' \
  -H 'spire-api-key: YOUR_API_KEY'
{
  "meta": {
    "count": 780,
    "issuance_time": "2026-09-11T00:00:00+00:00"
  },
  "files": [
    "saifs-s2s.20260911.t00z.0p5.surface.europe.D001.grib2",
    "saifs-s2s.20260911.t00z.0p5.surface.europe.D002.grib2"
  ]
}

Time Bundles

The time_bundle parameter selects how a forecast run is sliced into lead times. The values are the same for the point and file endpoints. Record counts are for the point API; the file API returns the same number of files.

time_bundleStepRangeRecords (00/12 UTC run)Records (06/18 UTC run)
hourly1 h0–48 h4925 (0–24 h)
3_hourly3 h0–120 h419
6_hourly6 h0–168 h295
6_hourly_extended6 h0–240 h415
6_hourly_10day6 h0–240 h415
6_hourly_15day6 h0–360 h615
hourly_6day1 h0–144 h145—

Notes:


Time bundles can be combined as a comma-separated list, for example time_bundle=hourly,6_hourly for hourly steps to 48 hours followed by 6-hourly steps to 168 hours. The optimized point endpoint also accepts all, which returns the full 15-day forecast at hourly steps.

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
issuance_timestringNoISO 8601 Issuance Time (default: most recent)
valid_time_intervalstringNoISO 8601 interval of Valid Time values to return, e.g. 2026-09-12T00:00:00Z/P1D
time_bundlestringNoTime Bundle — see Time Bundles
unit_systemstringNosi (default), us or us-f — see Units Reference
productstringNosof-d (default) — see Forecast Products
tzstringNoIANA time zone for the returned times (default UTC), or local for the time zone at the requested coordinates

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.units lists the unit of every field in the response. location.coordinates.elevation is the model terrain height at the point in metres.

{
  "data": [
    {
      "location": {
        "coordinates": {
          "lat": 40.018672,
          "lon": -105.250537,
          "elevation": 1655.2
        }
      },
      "times": {
        "issuance_time": "2026-09-11T00:00:00+00:00",
        "valid_time": "2026-09-11T00:00:00+00:00"
      },
      "values": {
        "air_pressure_at_sea_level": 101708.8,
        "air_temperature": 287.7,
        "dew_point_temperature": 284.2,
        "eastward_wind": 0.7,
        "northward_wind": 3.0,
        "precipitation_amount": 0.0,
        "precipitation_rate": 0.0,
        "relative_humidity": 79.0,
        "surface_visibility": 24135.3,
        "total_cloud_cover": 100.0,
        "wind_direction": 193.0,
        "wind_gust": 6.5,
        "wind_speed": 3.1
      }
    }
  ],
  "meta": {
    "unit_system": "si",
    "forecast": "Spire SOF-D Forecast",
    "units": {
      "air_pressure_at_sea_level": "Pa",
      "air_temperature": "degreeK",
      "dew_point_temperature": "degreeK",
      "eastward_wind": "m/s",
      "northward_wind": "m/s",
      "precipitation_amount": "mm",
      "precipitation_rate": "mm/h",
      "relative_humidity": "%",
      "surface_visibility": "m",
      "total_cloud_cover": "%",
      "wind_direction": "deg",
      "wind_gust": "m/s",
      "wind_speed": "m/s",
      "air_temperature_max_in_last_6_hours": "degreeK",
      "air_temperature_min_in_last_6_hours": "degreeK",
      "orography": "m"
    }
  }
}

Server-Side Filtering

The point, route, optimized point and current weather endpoints support the X-Fields header to limit which fields are returned. This reduces response size when you only need specific variables. The value uses a GraphQL-like selection syntax.

Example — Request only air temperature and wind speed:

X-Fields: {data{values{air_temperature,wind_speed}}}

Example — Request values with times and location (Optimized Point, Route and Current Weather):

X-Fields: {meta,data{location,times,values{air_temperature,wind_speed}}}

On /forecast/point and /forecast/latest/point the mask selects keys inside data{values{...}}; location, times and meta are always returned. The optimized point, current weather and route endpoints also accept masks that name times, location or meta.


Min/Max Temperature

The basic bundle includes 6-hour min/max temperature fields:

These values cover the previous 6 hours, so they are only present at lead times that are multiples of 6 hours (f006, f012, …). The first lead time (f000) has no min/max values because it is the start of the forecast window.

With time_bundle=hourly or 3_hourly the fields are therefore absent at the intermediate lead times; with 6_hourly, 6_hourly_extended or 6_hourly_15day every record after the first carries them. The same applies to the corresponding files from the File API.

Example — Request min/max only with X-Fields:

X-Fields: {data{values{air_temperature_min_in_last_6_hours,air_temperature_max_in_last_6_hours}}}

List Forecast Files

GET /forecast/file

Retrieve a list of available forecast files. Without filters the response lists every file of the most recent issuance across all bundles and regions in your subscription.

Parameters

ParameterTypeRequiredDescription
issuance_timestringNoISO 8601 issuance time (default: most recent)
productstringNoProduct identifier (see Forecast Products, default sof-d)
bundlesstringNoComma-separated Bundle names
time_bundlestringNoTime Bundle — restricts the listed lead times, see Time Bundles
regionsstringNoComma-separated region names — see Operational Reference

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

For a 00 or 12 UTC issuance the default listing contains the 49 hourly files f000–f048; a 06 or 18 UTC issuance has 25. Add time_bundle=6_hourly_15day to list the 61 six-hourly files out to f360.

{
  "meta": {
    "count": 49,
    "issuance_time": "2026-09-11T00:00:00+00:00"
  },
  "files": [
    "sof-d.20260911.t00z.0p125.basic.global.f000.grib2",
    "sof-d.20260911.t00z.0p125.basic.global.f001.grib2",
    "sof-d.20260911.t00z.0p125.basic.global.f002.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.20260911.t00z.0p125.basic.global.f000.grib2' \
  -H 'spire-api-key: YOUR_API_KEY'

Vertical Profile

GET /forecast/profile

Retrieve a vertical wind profile at a location. The profile is derived from the basic, maritime-atmos and wind-energy levels of the SOF-D forecast; bundles other than these return 422 No valid bundles provided.

Parameters

ParameterTypeRequiredDescription
latnumberYesLatitude (-90 to 90)
lonnumberYesLongitude (-180 to 180)
bundlesstringNoBundle names (default: all profile-capable bundles)
issuance_timestringNoISO 8601 issuance time
valid_time_intervalstringNoISO 8601 interval of Valid Time values
time_bundlestringNoTime Bundle grouping
productstringNosof-d (default) — see Forecast Products

Response

The response is a CoverageJSON CoverageCollection: one Coverage per valid time, each with a VerticalProfile domain. The z axis lists the heights above ground in metres (10, 50, 80, 100, 120, 152, 305, 457, 610, 762, 914, 1067, 1219, 1372, 1524, 1676 and 1829 m); the ranges hold one array per parameter with the same length as z.

{
  "type": "CoverageCollection",
  "parameters": {
    "wind_speed__height_above_ground": {
      "type": "Parameter",
      "observedProperty": {"label": {"en": "wind_speed__height_above_ground"}},
      "unit": {"symbol": "m s**-1"}
    },
    "wind_direction__height_above_ground": {
      "type": "Parameter",
      "observedProperty": {"label": {"en": "wind_direction__height_above_ground"}},
      "unit": {"symbol": "deg"}
    }
  },
  "coverages": [
    {
      "type": "Coverage",
      "domain": {
        "type": "Domain",
        "domainType": "VerticalProfile",
        "axes": {
          "x": {"values": [4.9]},
          "y": {"values": [52.375]},
          "z": {"values": [10.0, 50.0, 80.0, 100.0, 120.0, 152.0, 305.0, 457.0, 610.0, 762.0, 914.0, 1067.0, 1219.0, 1372.0, 1524.0, 1676.0, 1829.0]},
          "t": {"values": ["2026-09-11T06:00:00+00:00"]}
        }
      },
      "ranges": {
        "wind_speed__height_above_ground": {
          "type": "NdArray",
          "dataType": "float",
          "axisNames": ["z"],
          "shape": [17],
          "values": [3.1, 4.8, 5.6, 6.0, 6.3, 6.8, 8.4, 9.2, 9.7, 10.1, 10.4, 10.6, 10.8, 10.9, 11.0, 11.0, 11.1]
        }
      }
    }
  ]
}

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.

When are forecasts issued? Spire’s Optimized Point Forecast is updated every hour.

How the Optimized Forecast Is Produced

The optimized point system starts from Spire’s global model and improves it for one specific location by combining several forecast systems (Spire’s 12 km global model, other global models at 10 to 26 km, and regional models at 3 to 6 km where available) with observations from the location or nearby weather stations, through machine learning. Because this depends on reliable, well-maintained observations, Spire is selective about the stations it uses.

The forecast is available out of the box for more than 10,000 airports, maritime ports and weather stations. It can also be set up for customer-defined assets such as wind or solar farms, construction sites or mines, using nearby stations and, where the customer provides them, the asset’s own sensors. For solar assets the panel configuration matters: tilt and azimuth angles, and for tracking systems the axis orientation and the tilt and azimuth limits. Contact Spire to configure custom locations.

The core variables are hourly to 15 days (361 steps with time_bundle=all). Hub-height wind and irradiance variables are available where the location has been configured for them.

Parameters

ParameterTypeRequiredDescription
locationstringOne ofLocation identifier (ICAO, WMO, UN/LOCODE)
location_idstringOne ofUUID location identifier, as returned in location.uuid
bundlesstringNobasic (default, all variables), wind-energy or solar-energy — see below
issuance_timestringNoISO 8601 issuance time
valid_time_intervalstringNoISO 8601 interval of Valid Time values
time_bundlestringNohourly (default, 49 records), 6_hourly (29), hourly_6day (145) or 6_hourly_15day (61)
unit_systemstringNosi (default), us or us-f
tzstringNoIANA time zone or local

Location Format Examples

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

Location examples:

Optimized forecasts are available at ~10,000 locations worldwide (airports, maritime ports, and well-known weather stations). Qualified custom locations can be discussed for interested clients.

Bundles

bundlesReturns
basic (or omitted)Every variable in the table below
wind-energyHub-height wind speed at 80, 100 and 120 m — only at locations configured for wind energy; other locations return 404 No data found matching the request
solar-energyIrradiance (GHI, DNI, POA) — only at locations configured for solar energy; other locations return 404

Any other bundle name returns 403 with the allowed list.

Optimized Point Data Variables

Field names are the JSON keys in data[].values; units are for unit_system=si and are also given in meta.units.

FieldLevelDescriptionUnits
air_temperature2 m AGLAir temperatureK
dew_point_temperature2 m AGLDew point temperatureK
relative_humidity2 m AGLRelative humidity%
heat_index2 m AGLHeat index (null when not applicable)K
wind_chill2 m AGLWind chill (null when not applicable)K
max_temperature_utc_day, min_temperature_utc_day2 m AGLMax/min for the remainder of the UTC dayK
max_temperature_local_day, min_temperature_local_day2 m AGLMax/min for the remainder of the local dayK
heating_degree_days, cooling_degree_days2 m AGLDegree-day contribution of the hourK
air_pressure_at_mean_sea_levelSea levelMean sea-level pressurePa
surface_air_pressureSurfaceStation-level pressurePa
ceilingSurfaceBase of lowest cloud layer with >50% coveragem
total_cloud_coverSurfaceSky coverage%
visibilitySurfaceHorizontal visibilitym
probability_of_fogSurfaceFog likelihood%
probability_of_thunderstormSurfaceThunderstorm likelihood%
wind_speed, wind_direction10 m AGLWind speed and meteorological directionm/s, deg
eastward_wind_velocity, northward_wind_velocity10 m AGLWind componentsm/s
wind_gust10 m AGLInstantaneous gustm/s
precipitation_rateSurfaceRate at valid timemm/h
probability_of_precipitation_1hr, _3hr, _6hr, _24hrSurfaceProbability of precipitation in the interval%
precipitation_amount_1hr, _3hr, _6hrSurfaceLiquid precipitation in the intervalmm
snowfall_amount_1hr, _3hr, _6hr, _totalSurfaceSnowfall in the interval / since issuancecm
ice_amount_1hr, _3hr, _6hr, _totalSurfaceIce accumulation in the interval / since issuancecm
conditional_probability_of_rain, _snow, _iceSurfacePrecipitation type if precipitation occurs%

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'

Example Response

The location object identifies the matched station and includes every identifier it is known by.

{
  "data": [
    {
      "location": {
        "coordinates": {"lat": 32.9, "lon": -97.03},
        "name": "DALLAS/FORT WORTH INTERNATIONAL AIRPORT",
        "icao": "KDFW",
        "wmo": "72259",
        "uuid": "4ac2ae1f-2386-44f6-9c8b-7363da8c51e2"
      },
      "times": {
        "issuance_time": "2026-09-11T11:00:00+00:00",
        "valid_time": "2026-09-11T11:00:00+00:00"
      },
      "values": {
        "air_temperature": 290.2,
        "dew_point_temperature": 289.2,
        "relative_humidity": 94.0,
        "air_pressure_at_mean_sea_level": 101750.0,
        "surface_air_pressure": 101800.0,
        "ceiling": 1073.8,
        "total_cloud_cover": 75.0,
        "visibility": 10000.0,
        "wind_speed": 5.7,
        "wind_direction": 210.0,
        "wind_gust": 8.5,
        "precipitation_rate": 0.31,
        "precipitation_amount_1hr": 0.3,
        "probability_of_precipitation_1hr": 100.0,
        "conditional_probability_of_rain": 100.0,
        "snowfall_amount_total": 0.0,
        "heat_index": null,
        "wind_chill": null
      }
    }
  ],
  "meta": {
    "unit_system": "si",
    "forecast": "Spire Optimized Point Forecast",
    "units": {
      "air_temperature": "degreeK",
      "precipitation_rate": "mm/h",
      "snowfall_amount_total": "cm",
      "visibility": "m"
    }
  }
}

Bulk Optimized Point Files

GET /forecast/optimized/bulk
GET /forecast/optimized/bulk/{file_id}

For customers with many optimized locations, the bulk endpoint delivers the forecasts of a pre-configured group of locations as one file. Every time the optimized forecast is refreshed (hourly), a new bulk file is generated for each group.

Groups are configured by Spire, not through the API. To set one up, provide a name for the group, the list of locations it contains, and the preferred format (CSV or JSON). Once configured, listing the endpoint without parameters returns the files available; prefix, suffix and contains narrow the list.

File names follow point.{date}.t{HHMM}z.{group}.{csv|json}, for example point.20240523.t1100z.my-ports.csv for the 11:00 UTC issuance of 23 May 2024. Download a file by appending its name to the endpoint path, following the redirect.

Latest Forecast Files

GET /forecast/latest/file

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

Parameters

ParameterTypeRequiredDescription
productstringNoProduct identifier (default sof-d)
bundlesstringNoBundle names
regionsstringNoRegion names

The response has the same shape as List Forecast Files, with meta.issuance_time set to the issuance that was selected.


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 the issuance_time and time_bundle parameters. The response has the same shape as the point forecast.


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.

How Power Forecasts Are Produced

Instead of forecasting the weather at each asset, the power endpoint forecasts the total generation of all wind or solar assets in a region, in megawatts. Two kinds of sources are offered, listed by /forecast/power/sources. The Spire AI sources (srfs-*-ai) are machine-learning models trained on the region’s aggregated historical generation together with historical forecasts from Spire’s high-resolution model. The physical sources (*-physical) convert the wind speed or solar radiation of a weather model into power with the same conversion for every model, so that forecasts driven by different models can be compared like for like. Because each power forecast depends on its driving weather model, it is published shortly after that model’s run completes, and its horizon and update times follow that model.

Parameters

ParameterTypeRequiredDescription
typestringNowind, solar, or both comma-separated (default: all types licensed on your key). bundles is accepted as a synonym.
regionstringNoOne or more regions, comma-separated (default: all regions licensed on your key)
time_bundlestringNoTime grouping (see below)
issuance_timestringNoISO 8601 issuance time (default: most recent)
sourcestringNoNWP source, see Power Forecast Sources. When omitted, the response contains one series per available source for the region.
tzstringNoIANA time zone (default UTC)

Available Regions

RegionCoverage
austriaAustria
franceFrance
germanyGermany
hungaryHungary
netherlandsNetherlands
ukUnited Kingdom
ercotERCOT (Texas)

Time Bundles for Power

Time BundleDescription
hourlyHourly steps through 48 hours
3_hourly3-hourly steps through 120 hours
6_hourly6-hourly steps, to the end of the source’s range
hourly_6dayHourly steps through 144 hours (recommended for the longest hourly series)
6_hourly_15day6-hourly steps, to the end of the source’s range

The end of the range depends on the source (see max_lead_hours in Power Forecast Sources).

An unknown value returns {"message": "Unknown time bundle ..."}.

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&source=srfs-europe-physical' \
  -H 'spire-api-key: YOUR_API_KEY'

Example Response

The first valid_time is one hour after the issuance because each value is the generation over the previous hour.

{
  "data": [
    {
      "region": "france",
      "source": "srfs-europe-physical",
      "type": "wind",
      "times": {
        "issuance_time": "2026-09-11T06:00:00Z",
        "valid_time": "2026-09-11T07:00:00Z"
      },
      "values": {
        "power": 2336.8
      }
    },
    {
      "region": "france",
      "source": "srfs-europe-physical",
      "type": "wind",
      "times": {
        "issuance_time": "2026-09-11T06:00:00Z",
        "valid_time": "2026-09-11T08:00:00Z"
      },
      "values": {
        "power": 2521.2
      }
    }
  ]
}

Output Fields

FieldDescription
regionThe region for this data point
sourceNWP source that drove the power model (see below)
typewind or solar
powerPredicted power output over the previous hour, in megawatts (MW)

Power Forecast Sources

GET /forecast/power/sources

List the forecast sources available for power forecasts, including their issuance hours and maximum lead times. Use this endpoint to discover valid values for the source parameter of the Power Forecast endpoint.

SourceIssuance hours (UTC)Max lead (h)Description
sofd-physical0, 6, 12, 18360Spire global forecast (SOF-D)
srfs-europe-physical6, 12144Spire regional forecast, Europe
srfs-europe-ai6, 12144Spire regional forecast, Europe, AI post-processed
srfs-conus-physical6, 12144Spire regional forecast, CONUS
srfs-conus-ai6, 12144Spire regional forecast, CONUS, AI post-processed
aiwx-physical0, 6, 12, 18480Spire AI weather forecast
ecmwf-physical0, 6, 12, 18240ECMWF deterministic
ecmwf-ens-physical0, 6, 12, 18360ECMWF ensemble
hrrr-physicalevery hour48NOAA HRRR (CONUS)

Example Request

Shell
Python
Node.js
curl -X GET \
  'https://api.wx.spire.com/forecast/power/sources' \
  -H 'spire-api-key: YOUR_API_KEY'

Example Response

{
  "sources": [
    {
      "name": "ecmwf-physical",
      "issuance_hours": [0, 6, 12, 18],
      "max_lead_hours": 240
    },
    {
      "name": "sofd-physical",
      "issuance_hours": [0, 6, 12, 18],
      "max_lead_hours": 360
    },
    {
      "name": "srfs-europe-physical",
      "issuance_hours": [6, 12],
      "max_lead_hours": 144
    }
  ]
}

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 the variables of the requested bundles at every waypoint. A maximum of 120 waypoints may be included per request.

Point Versus Route

A point request keeps the location fixed and returns the whole forecast period for it. A route request follows a position that moves through time: a vessel that is in port today, at sea tomorrow and in another port next week. For each waypoint the API returns the forecast valid at that place and that time. Waypoint times do not have to match forecast steps; the response reports the step actually used in valid_time and your request in requested_valid_time.

Query Parameters

ParameterTypeRequiredDescription
bundlesstringYesComma-separated Bundle names
issuance_timestringNoISO 8601 issuance time (default: most recent)
tzstringNoIANA time zone or local (default UTC)
unit_systemstringNosi (default), us or us-f
productstringNosof-d (default)

Request Body

The body contains a route object with a waypoints array; name is optional. Bundles are selected with the bundles query parameter, not in the body. Each waypoint has lat, lon and an ISO 8601 time.

{
  "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"
      }
    ]
  }
}

Example Request

Shell
Python
Node.js
curl -X POST 'https://api.wx.spire.com/forecast/route?bundles=basic,maritime' \
  -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"}
    ]}
  }'

Response

One record per waypoint, in the same shape as the point forecast (including meta.units and location.coordinates.elevation). When a requested waypoint time does not align with an available forecast time, the API returns data for the nearest available time and reports both:

{
  "location": {
    "coordinates": {"lat": 26.71, "lon": -22.41, "elevation": 0.0}
  },
  "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"
  },
  "values": {
    "air_temperature": 293.1,
    "sea_surface_wave_significant_height": 1.8
  }
}