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
timestringISO 8601 timestamp or time range2024-01-15T00:00:00Z
issuancestringIssuance Time2024-01-15T00:00:00Z
valid_timestringValid Time or interval2024-01-15T00:00:00Z/P1D

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 namesglobal,north_america
productstringProduct identifiersof
time_bundlestringTime Bundle optionhourly

Available Bundles

BundleDescription
basicStandard meteorological variables
maritimeMarine-specific parameters
agriculturalAgriculture-focused variables
aviationAviation weather parameters
solarSolar radiation data
windWind power parameters
precipitationDetailed precipitation data

Available Regions

Regions vary by subscription. Common options:

RegionCoverage
globalWorldwide
north_americaNorth America
europeEurope
asiaAsia
australiaAustralia

Output Format Parameters

ParameterTypeDescriptionExample
unit_systemstringUnit system for responsesi or us
tzstringTimezone for timestampsAmerica/New_York

Unit Systems

SystemDescription
siSI Units (default)
usUS Units

See Units Reference for complete unit mappings.

Timezone Format

Use standard IANA timezone identifiers:


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

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}}}'

# Return location and temperature only
-H 'X-Fields: {data{location,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=2024-01-15T00:00:00Z&valid_time=2024-01-15T00:00:00Z/P7D' \
  -H 'spire-api-key: YOUR_API_KEY' \
  -H 'X-Fields: {meta,data{times,values{air_temperature,wind_speed,significant_wave_height}}}'