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.

Reference for query parameters used across multiple API endpoints.

Location Parameters

ParameterTypeDescriptionExample
latnumberLatitude in decimal degrees (-90 to 90)40.0
lonnumberLongitude in decimal degrees (-180 to 180)-105.0
locationstringNamed location identifier (ICAO Code, WMO ID, UN/LOCODE)icao:KDFW
location_idstringUUID location identifier4ac2ae1f-...

Location Identifier Formats

FormatDescriptionExample
icao:{code}ICAO airport codeicao:KJFK
wmo:{id}WMO synoptic stationwmo:72259
unlocode:{code}UN/LOCODE port codeunlocode:USNYC

Time Parameters

ParameterTypeDescriptionExample
issuance_timestringIssuance Time of the forecast run (forecast, optimized point, route, file endpoints)2024-01-15T00:00:00Z
valid_time_intervalstringISO 8601 interval of Valid Time values to return (point, profile, optimized point)2024-01-15T00:00:00Z/P1D
timestringISO 8601 timestamp or time range (current weather and lightning endpoints only)2024-01-15T00:00:00Z
start_datetime, end_datetimestringTime window for tide endpoints2024-01-15T00:00:00Z
start_date, end_datestringDate window for soil moisture endpoints2024-01-15

Time Format Examples

Single timestamp:

2024-01-15T12:00:00Z

Time range (start/end):

2024-01-15T00:00:00Z/2024-01-16T00:00:00Z

Time range (start + duration):

2024-01-15T00:00:00Z/P7D

Duration Format (ISO 8601)

DurationDescription
PT1H1 hour
PT6H6 hours
P1D1 day
P7D7 days
P1M1 month

Data Selection Parameters

ParameterTypeDescriptionExample
bundlesstringComma-separated Bundle namesbasic,maritime
regionsstringComma-separated region codes (file endpoints)global,europe
productstringForecast product (file and status endpoints; default sof-d)srfs
time_bundlestringTime Bundle optionhourly

Available Bundles

Bundle names for the global forecast (sof-d):

basic, clouds, precipitation, thunderstorm, maritime, maritime-atmos, maritime-wave, maritime-wave-ext, agricultural, wind-energy, solar-energy, upper-air, aviation, plus the opt-in basic-accumulation, precipitation-accumulation and solar-energy-accumulation.

Other products use their own bundle names: core-v2, upper-air, thunderstorm, derived (SRFS; core is legacy); core, upper-air, derived (SAIFS-WX); surface, upper-air, derived, derived-upper-air, probabilities, percentiles, each with a :daily or :weekly suffix (SAIFS-S2S). The optimized point endpoint accepts basic, wind-energy and solar-energy.

A bundle outside your subscription returns HTTP 403 with the list of names your key may use. See Data Bundles & Variables for the fields in every bundle.

Available Products

ProductDescription
sof-dSpire global deterministic forecast (default)
srfsSpire Regional Forecast System (3 km)
saifs-wxSpire AI weather forecast
saifs-s2sSpire AI subseasonal-to-seasonal forecast
saifs-s2s-regimesWeather regime probabilities (CSV) from the S2S forecast
saifs-wx-regimesWeather regime probabilities (CSV) from the AI weather forecast

Current weather conditions (cwc) are served by the /current/weather endpoints rather than through product=.

Available Regions

Regions vary by subscription. Global forecast regions:

RegionCoverage
globalWorldwide
africaAfrica
asiaAsia
atlanticAtlantic Ocean
conusContiguous United States
europeEurope
north-america_central-america_caribbeanNorth America, Central America, Caribbean
south-americaSouth America
south-west_pacificSouth-West Pacific

Regional products cover a subset (SRFS: conus, europe). Use the codes exactly as written. See the Operational Reference.


Output Format Parameters

ParameterTypeDescriptionExample
unit_systemstringUnit system for responsesi, us or us-f
tzstringTimezone for timestampsAmerica/New_York

Unit Systems

SystemDescription
siSI Units (default): K, Pa, m/s, m, mm
usUS Units with Celsius: °C, hPa, mph, miles, inches
us-fUS Units with Fahrenheit: °F, hPa, mph, miles, inches

See Units Reference for complete unit mappings.

Timezone Format

Use standard IANA timezone identifiers, or local to use the time zone of the requested coordinates:


Filtering Parameters

ParameterTypeDescription
prefixstringFilter files starting with value
suffixstringFilter files ending with value
containsstringFilter files containing value

Pagination Parameters

ParameterTypeDefaultDescription
limitinteger100Maximum items to return
offsetinteger0Number of items to skip

Pagination applies to the Storm Tracks endpoints. Other list endpoints return the complete list.


Request Headers

HeaderDescriptionExample
spire-api-keyAPI authentication keyyour-api-key
X-FieldsField Mask for response filtering{data{values{air_temperature}}}
Content-TypeRequest body formatapplication/json

Field Mask Syntax

Use X-Fields header to request specific fields:

# Only return temperature and wind speed
-H 'X-Fields: {data{values{air_temperature,wind_speed}}}'

On /forecast/point and /forecast/latest/point the mask may only select keys inside data{values{...}}; location, times and meta are always returned. The optimized point, current weather and route endpoints also accept masks such as {data{times,values{air_temperature}}}.


Example: Complete Request

curl -X GET \
  'https://api.wx.spire.com/forecast/point?lat=40.0&lon=-105.0&bundles=basic,maritime&unit_system=si&issuance_time=2024-01-15T00:00:00Z&valid_time_interval=2024-01-15T00:00:00Z/P7D&time_bundle=6_hourly' \
  -H 'spire-api-key: YOUR_API_KEY' \
  -H 'X-Fields: {data{values{air_temperature,wind_speed,sea_surface_wave_significant_height}}}'