Observations

Get nearest METAR station observations.

Returns the N nearest METAR stations to a point, deduplicated to the latest observation per station (within the last 2 hours), sorted by distance.

Pass one location: lat and lon, zip, or location. A request without one returns 400; a ZIP or name that does not resolve returns 404; while location lookup is unavailable, a zip or location request returns 503 with Retry-After.

A point outside the 50 US states and DC returns 404 outside-coverage with next_steps.

get/v1/observations/nearest

Request

  • Base URL: https://api.smarterweather.com
  • URL: https://api.smarterweather.com/v1/observations/nearest
  • Auth: HTTP bearer

Query parameters

latnumber double

Latitude (WGS84 decimal degrees). Give it with lon. On a route that also takes zip or location, give only one location form.

lonnumber double

Longitude (WGS84 decimal degrees). Give it with lat. On a route that also takes zip or location, give only one location form.

zipstring

5-digit US ZIP code. Mutually exclusive with lat/lon and location.

locationstring

Free-text location name. Examples: "Boston, MA", "94043", "Denver". Resolved by the Smarter Weather geocoder. Mutually exclusive with lat/lon and zip.

ninteger

Number of stations to return (1-10, default 1). A value that is not an integer in range falls back to 1.

Response

GeoJSON FeatureCollection of nearest METAR observations.

Changes

No recorded changes to this operation across all 1 revision of this API.