Weather

Get blended weather for a location.

Changed on

Returns a composite blended weather payload for a single location. A single call covers current conditions, hourly forecast, daily forecast, active alerts, convective outlooks, and astronomical data by default; other sections (location echo, geographic metadata, narrative text, forecaster guidance) are available via the include parameter.

Location selector

Exactly one of the following must be provided:

  • lat and lon — latitude/longitude pair.
  • zip — 5-digit US ZIP code.
  • location — free-text location name (e.g., "Boston, MA", "94043", "Denver"). Resolved by the same upstream geocoder that powers the dedicated /v1/geocode/{search,autosuggest,reverse} endpoints; clients that need geocoding without a weather fetch should call those directly.

Sending more than one selector, or none, returns 400.

Units

  • imperial (default): °F, mph, inHg, mi, in.
  • metric: °C, kph, hPa, km, mm.

SI is not exposed in v1; partners that need SI should convert client-side.

Include semantics

include is a comma-separated list. Unknown tokens are silently dropped. See the API-level "Include tokens" table in the info.description for the full token catalog, defaults, and stability markers.

Coverage

Coverage is the 50 US states and DC, for every caller. A location outside it (another country, Puerto Rico, Guam and the other territories, or open water beyond about 3 nm offshore) returns 404 with type https://smarterweather.com/errors/outside-coverage and next_steps (recommended = coverage); in POST /v1/weather/batch that row's error.code is outside_coverage. Do not retry the same point. A zip or location resolves to its first match inside coverage (so Carolina is Carolina, RI, not Carolina, PR); one whose every match is outside coverage returns outside-coverage, and one that matches no US place returns 404 not-found, both with next_steps. Partial-coverage scenarios inside coverage are reported via meta.warnings[] with a structured code so clients can respond programmatically. When a read from an upstream weather source times out or is unavailable, the affected section's warning is upstream_timeout or upstream_unavailable and the response is sent Cache-Control: no-store, so no cache replays it after the upstream recovers.

Response density, sampling and sparse fieldsets

Three independent, opt-in controls shrink the hourly and daily rows. Without them the response is exactly the detailed body. They never add sections, never change current, alerts, outlooks, astro, location, meta (beyond meta.hourly_sampling) or attribution, and never change pricing.

view is a column preset: detailed (default) returns every column; concise returns a documented subset and never drops rows.

  • concise hourly columns: time, temperature, feels_like, humidity, wind_speed, wind_gust, wind_direction, precip_probability, precip_amount, precip_type, snow_amount, thunderstorm_probability, cape, cloud_ceiling, snow_level, uv_index, conditions, icon, severe, thunder_possible.
  • concise daily columns: date, relative_day, active_period, high, low, conditions, icon, severe, precip_probability, precip_total, snow_total, ice_total, wind_speed_max, wind_direction, humidity_avg, uv_index_max, cape_max, thunder_possible, threats, astro, day.precip_probability, night.precip_probability.
  • include wins over the preset: with include=uncertainty, hourly[].uncertainty and daily[].uncertainty stay; with include=climate, daily[].climate stays.
  • The preset only grows. A column may be added to concise (announced in the changelog); none is ever removed from it.

hourly_step and hourly_step_from thin hourly rows, after hourly_hours sets the window and independently of view and fields. Rows whose offset from hourly[0].time is below hourly_step_from hours are all kept; from there on, only rows at hourly_step_from + k * hourly_step hours are kept. A row's offset is the whole hours between its time and hourly[0].time (rows are labelled by hour start), so the first row is offset 0 and the hours after it are 1, 2, ... Offsets come from timestamps, not array indexes, so a gap in the series does not shift the grid. hourly_step=3&hourly_step_from=24 keeps the first day at full resolution and every third hour after it (48 hours become 32 rows, 72 become 40, 168 become 72). When thinning drops at least one row, meta.hourly_sampling echoes the effective parameters so a thinned series is distinguishable from a short forecast.

fields selects exact members of hourly and daily rows, as section.name paths (hourly.temperature,daily.high). It is exact for every section it names and beats view there; a section it does not name follows view. hourly[].time and daily[].date are always returned. fields never implies include: a path whose section, or uncertainty / climate object, is not in the effective include is a 400. Unknown names are a 400 that lists the valid names, never a silent drop (unlike include, which drops unknown tokens).

Presence semantics. A selected (or preset) field is present, and null when its value is unavailable, exactly as in detailed. A field the schema marks optional can be absent for its zero value, exactly as in detailed. A field that was not selected is absent. A field that does not exist is a 400 at request time, so a 200 never hides an unknown name. Every shaped response is a key-subset of the detailed response for the same request.

get/v1/weather

Request

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

Query parameters

lat, number double

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

lon, number double

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

zip, string

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

location, string

Free-text location name. Examples: "Boston, MA", "94043", "Denver", "KSLC". Resolved by the Smarter Weather geocoder (a station id resolves as on /v1/geocode/search). Mutually exclusive with lat/lon and zip.

units, 'imperial' | 'metric'

Unit system for numeric response fields. imperial (default) uses °F, mph, inHg, mi, in; metric uses °C, kph, hPa, km, mm. See the Units schema returned with every response for the exact label set.

include, string

Comma-separated list of sections to include. See the "Include tokens" table in info.description for the full catalog, defaults, and stability markers. Unknown tokens are silently dropped.

days, integer

Number of days for the daily forecast.

hourly_hours, integer

Number of hours for the hourly forecast.

view, 'concise' | 'detailed'

Column preset for hourly and daily rows. detailed (default) returns every column; concise returns the documented subset (20 hourly and 22 daily columns, listed in the GET /v1/weather description) and never drops rows. include wins over the preset. The enum and the concise preset only grow. Any other value is a 400.

hourly_step, integer

Keep one hourly row every hourly_step hours (by whole-hour offset from hourly[0].time), from hourly_step_from on. 1 (default) keeps every row. Out of range or non-integer is a 400.

hourly_step_from, integer

Offset in hours from hourly[0].time below which every hourly row is kept; hourly_step applies from this offset on. 0 (default) thins from the first row. A no-op when hourly_step is 1. Out of range is a 400.

fields, string

Sparse fieldset for hourly and daily rows: comma-separated section.name paths, where section is hourly or daily and name is the exact JSON member name (no aliases). Whitespace is trimmed, paths are lowercased, duplicates collapse, and repeated fields parameters are concatenated; at most 64 distinct paths.

A second segment is allowed only under the objects that are not taken whole: hourly.uncertainty, daily.day, daily.night, daily.uncertainty, daily.climate (e.g. daily.day.precip_probability). Every other member, including daily.astro and daily.threats, is selected whole.

fields is exact for each section it names and overrides view there; hourly[].time and daily[].date are always returned. fields never implies include.

Returns 400, with the first bad path and the valid names in detail, for: an empty value or empty path; an unknown section; an unknown name; a second segment outside the five objects above; a bare section (fields=hourly, use include); a section missing from the effective include; an uncertainty path without include=uncertainty; a daily.climate path without include=climate.

Response

Blended weather data for the requested location.

Weather required

Composite blended weather payload returned by GET /v1/weather. Section presence is controlled by the include query parameter; location and gis are always present. With the default view=detailed and no fields, every section that is present is the complete shape documented below. view=concise and fields project the members of hourly[] and daily[] rows (every other section stays complete), and hourly_step thins hourly[] rows; see "Response density, sampling and sparse fieldsets" on GET /v1/weather. A shaped body is always a key-subset of the detailed body for the same request.

location, Location required

Resolved location.

current, Current

Current weather conditions derived from the RTMA + MRMS blend.

hourly, Hourly[]

Hourly forecast, ordered ascending by time.

daily, Daily[]

Daily forecast, ordered ascending by date.

alerts, Alert[]

Active NWS alerts for the location, present whenever the section is included and its fetch succeeded. [] means no alerts were in effect in the latest alerts snapshot, which can trail meta.generated_at by up to about 30 seconds. Absent when the section is not included, or when its fetch failed (a meta.warnings entry with section: alerts says so). A stale replay (X-SW-Stale: 1 header, or a stale_response warning on a batch row) repeats the alerts as of its own meta.generated_at, not the current set.

outlooks, Outlook[]

SPC convective outlooks active for the location, present whenever the section is included and its fetch succeeded. [] means no outlook was in effect in the latest outlooks snapshot, which can trail meta.generated_at by up to about 30 seconds. Absent when the section is not included, or when its fetch failed (a meta.warnings entry with section: outlooks says so). A stale replay repeats the outlooks as of its own meta.generated_at.

astro, Astro

Astronomical data for the requested location and date.

gis, GIS required

Geographic metadata for the resolved location. Contains coordinate data, political boundaries, population, timezone, and nearest NEXRAD radar site metadata.

Radar data URLs (visual-products manifest, NEXRAD imagery) are not returned in the v1 response. Radar imagery will ship later as a separate /v1/radar/* family.

units, Units

Unit labels for the numeric fields in this response. The exact label set is determined by the units request parameter.

attribution, Attribution required

Attribution for the data sources that contributed to this response. sources is an explicit list of canonical identifiers suitable for compliance checklists; notice is a human-readable catch-all covering licensing / credit language.

narrations, Narrations

Rule-based narrative text for current and short-term conditions, generated deterministically from the blended forecast (not an LLM).

Experimental. Field shapes and prose styling may change without notice: excluded from the 90-day breaking-change commitment.

guidance, Guidance

NWS forecaster text products (AFD, HWO, NOW, HLS, MCD, MPD, PMD) for the point: structured fields plus raw bulletin body when available. Canonical weather surface for forecaster guidance; map polygons live on GET /v1/guidance/mesoscale and GET /v1/guidance/precipitation (bodies omitted there). guidance.now is the WFO short-term NOW product, not the radar nowcast block. guidance.hls is the WFO Hurricane Local Statement for the office covering the point; omitted when none is live. guidance.pmds is the latest national Prognostic Discussion per enabled desk (SPD/EPD/HI/CA/MRD/THR/ENS); omitted when empty. Distinct from guidance.mpds (WPC precipitation discussions).

Experimental. Field shapes may change without notice: excluded from the 90-day breaking-change commitment.

nowcast, Nowcast

Minute-scale MRMS radar precipitation nowcast for the queried location. Populated when include=nowcast is requested.

climate, ClimateNormals

Day-of-year climate normals for the location, populated when include=climate is requested. Identical in shape to the GET /v1/climate/normals body.

This block is the normals themselves — what is typical here. For how the forecast compares to them, read daily[].climate, which carries the same normals joined to each forecast day along with the signed departure.

Omitted when no station with normals is near the point; that case reports coverage_limited in meta.warnings[] rather than failing the request.

metar, Metar

Compact nearest METAR observation for the queried point. Populated when include=metar is requested. Sky layers and present-weather tokens are parsed from raw_metar (stop at RMK); the raw string itself is not forwarded.

Omitted when no recent station is near the point or the fetch fails; those cases report coverage_limited or a fetch warning in meta.warnings[] rather than failing the request.

aqi, AQISection

Populated when include=aqi is requested: the air quality index at the point now (current) and its forecast by local day (forecast). Both come from the catalog, never a fixed product: current from the domain's product of record for air_quality_index (role.default_for, as GET /v1/series?select=air_quality_index resolves it), forecast from its forecast tier (as @forecast:air_quality_index resolves), each naming its product. aqi_category is the EPA category, the same vocabulary as current.aqi_category. Omitted where the domain has no air quality product or neither reads a value; that case reports coverage_limited in meta.warnings[].

meta, Meta required

Per-response metadata: response schema version, generation time, upstream data freshness, and any non-fatal warnings.

Example response

{
  "location": {
    "name": "Boston",
    "region": "MA",
    "country": "US",
    "timezone": "America/New_York",
    "county": "Suffolk",
    "zip": "02108"
  },
  "current": {
    "conditions": "Partly Cloudy",
    "icon": "partly-cloudy-day"
  },
  "daily": [
    {
      "date": "2026-04-20",
      "astro": {
        "sky": {
          "sunrise": {
            "label": "vivid",
            "confidence": "medium",
            "source": "hrrr"
          },
          "sunset": {
            "label": "vivid",
            "confidence": "medium",
            "source": "hrrr"
          }
        }
      },
      "threats": [
        {
          "type": "severe"
        }
      ],
      "climate": {
        "normal_high": 78,
        "normal_low": 58,
        "high_departure": 4,
        "low_departure": -2
      }
    }
  ],
  "alerts": [
    {
      "id": "urn:oid:2.49.0.1.840.0.d1e1a911ed0a8ca7b56a9e6a3c5d6ba0035c88fb.001.1",
      "event": "Wind Advisory"
    }
  ],
  "outlooks": [
    {
      "product_id": "spc_otlk_day1",
      "type": "severe",
      "risk_label": "Slight"
    }
  ],
  "astro": {
    "sky": {
      "sunrise": {
        "label": "vivid",
        "confidence": "medium",
        "source": "hrrr"
      },
      "sunset": {
        "label": "vivid",
        "confidence": "medium",
        "source": "hrrr"
      }
    }
  },
  "gis": {
    "nearest_radar": {
      "id": "BOX",
      "name": "Boston"
    },
    "nearest_station": {
      "id": "KJFK"
    }
  },
  "attribution": {
    "sources": [
      "NOAA/NWS",
      "NBM",
      "GFS",
      "HRRR",
      "RTMA",
      "MRMS",
      "EPA AirNow"
    ],
    "notice": "Data sourced from NOAA/NWS and EPA AirNow public products. Derived products produced by Smarter Weather."
  },
  "nowcast": {
    "interval_seconds": 300
  },
  "climate": {
    "station": {
      "station_id": "USW00094728",
      "name": "NEW YORK CNTRL PK",
      "state": "NY",
      "latitude": 40.7789,
      "longitude": -73.9692,
      "elevation_m": 42.7,
      "distance_km": 3.4
    },
    "meta": {
      "normals_period": "1991-2020",
      "source": "station",
      "normals_method": "official"
    },
    "days": [
      {
        "date": "2026-07-28",
        "month": 7,
        "day": 28,
        "normal_high": 84.2,
        "normal_low": 69.8,
        "normal_mean": 77,
        "normal_high_stddev": 5.4,
        "normal_low_stddev": 5,
        "normal_mean_stddev": 4.7,
        "normal_precip": 0.11,
        "years": 30,
        "completeness_flag": "C"
      }
    ],
    "location": {
      "name": "Boston",
      "region": "MA",
      "country": "US",
      "timezone": "America/New_York",
      "county": "Suffolk",
      "zip": "02108"
    }
  },
  "metar": {
    "station_id": "KORD"
  },
  "meta": {
    "schema_version": "1.0.0",
    "freshness": [
      {
        "source": "rtma",
        "product_id": "rtma_conus_2p5km"
      }
    ],
    "warnings": [
      {
        "code": "partial_fetch",
        "section": "alerts",
        "product_id": "airquality_combined",
        "fields": [
          "aqi",
          "aqi_category",
          "pm25",
          "ozone",
          "pm10"
        ]
      }
    ]
  }
}

Changes

    • info

      added the optional property allOf[#/components/schemas/Problem]/alternatives to the response with the status

    • info

      added the optional property alternatives to the response with the status

    • info

      added the optional property alternatives to the response with the status

    7 more changes in this revision