Developers
Mesonet API
  • Getting Started
  • Reference
  • Explorer
  • Examples
  • Pricing
  • Station Selectors

    Ways to filter and discover available weather stations

    These selectors individually or combined to target the desired stations.

    NEW Inversion Operator

    Many station selectors support the addition of ! to a value to invert the selection. So stid=!KSLC would prevent KSLC from returning in a query. Remember to only include any given selection parameter once.

    stid

    (string), Single or comma separated list of SynopticLabs station IDs. Use a ! before any value to exclude matching stations. Example: stid=mtmet,kslc,fps.

    state

    (string), Single or comma separated list of abbreviated 2 character states. If country is not included, default is United States (US). Use a ! before any value to exclude matching stations. Example: state=ut,wy,dc.

    country

    (string), Single or comma separated list of abbreviated 2 or 3 character countries. Use a ! before any value to exclude matching stations. Example: country=us,ca,mx.

    nwszone

    (string), Single or comma separated list of National Weather Service Zones. Use a ! before any value to exclude matching stations. Example: nwszone=UT003,CA041.

    nwsfirezone

    (string), Single or comma separated list of National Weather Service Fire Zones. Use a ! before any value to exclude matching stations. Example: nwsfirezone=LOX241

    cwa

    (string), Single or comma separated list of National Weather Service County Warning Areas. Use a ! before any value to exclude matching stations.Example: cwa=LOX.

    gacc

    (string), Single or comma separated list of Geographic Area Coordination Centers. Use a ! before any value to exclude matching stations. Example: gacc=GB.

    subgacc

    (string), Single or comma separated list of Sub Geographic Area Coordination Centers. Use a ! before any value to exclude matching stations. Example: subgacc=EB07.

    county

    (string), Single or comma separated list of counties. Use the state parameter to filter by state in the case of duplicate county names (i.e. “King”). Use a ! before any value to exclude matching stations. Example: county=king&state=wa.

    vars

    (string), Single or comma separated list of sensor variables found here. The request will return all stations matching at least one of the variables provided. This is useful for filtering all stations that sense only certain variables, such as wind speed, or pressure. Do not specify vars twice in a query string. Some web services use this argument to adjust what information is delivered. Use a ! before any value to exclude matching stations. Example: vars=wind_speed,pressure.

    network

    (number, string), Single or comma separated list of network IDs or short names. The ID can be found be using the Networks API. Use a ! before any value to exclude specific networks from a result set. Example: network=153 or network=uunet,raws

    radius

    (string), A comma separated list of three values of the type [latitude,longitude,miles] or [stn_id,miles]. Coordinates are in decimal degrees. Returns all stations within radius of the point (or station, given by the station ID) and provides the distance of the station from given location by ‘Distance’ with units of miles. Adding limit=n to the query will limit the number of returned stations to n stations. Some examples are: radius=41.5,-120.25,20, radius=wbb,10, radius=41.5,-120.25,20&limit=10.

    bbox

    (string), A bounding box defined by the lower left and upper right corners in decimal degrees latitude and longitude coordinates, in the form of [lonmin,latmin,lonmax,latmax]. Recall that for regions involving the western and southern hemispheres that the coordinates are negative values (e.g., 120 W is -120, 20 S is -20). Example: bbox=-120,40,-119,41.

    Bounding Box Thinning

    A new feature allows you to use the API to thin the returned station set within a bounding box by providing some additional arguments. These arguments only take effect when the bbox parameter is used:

    height

    (number) the height of the map viewport in pixels

    width

    (number) the width of the map viewport in pixels

    spacing

    (number) the preferred number of pixels a station on the map should consume

    networkimportance

    (numbers, comma-separated) a list of comma separated network IDs that will be considered in the order provided. When there is a collision of stations within the defined “spacing” area, any station matching the list of preferred networks will be shown over any other.


    status

    (string), A value of either active or inactive returns only stations that are currently set as active in the. archive. By default, omitting this parameter will return all stations. Use a ! before any value to exclude matching stations. Example: status=active.

    complete

    (1, 0), A value of 1 or 0. When set to 1 an extended list of metadata attributes for each returned station is provided. This result is useful for exploring the zones and regions in which a station resides. Default is 0. Example: complete=1.

    fields

    (string), Case-insensitive comma-separated list of metadata attributes to include in the output response. Default is to include all attributes. Only works with attributes defined in the default metadat set (e.g. attributes shown via complete=1 cannot be selected). Example: fields=stid,name.