Weather

Get blended weather for up to 25 locations in one call.

Multi-location form of GET /v1/weather. Accepts a JSON body with an array of up to 25 locations and returns one weather result per input, preserving order.

Locations

Each entry in locations[] follows the same selector rules as the single-location endpoint: exactly one of lat+lon, zip, or location must be set. Mixing selectors in a single entry, or omitting all of them, fails that row only — the rest of the batch still runs.

Per-location failure semantics

A single location failure does not fail the whole request. The corresponding results[i] carries error (a structured WeatherBatchError) instead of weather. Callers can detect a partial result by scanning for non-null error fields on results[]. Section-level partial failures inside a successfully resolved location surface as weather.meta.warnings[], exactly as for GET /v1/weather.

Shared parameters

include, units, days, hourly_hours, view, fields, hourly_step, and hourly_step_from are applied to every location; per-location overrides are not supported. Defaults match the GET /v1/weather defaults. An invalid shaping parameter (view, fields, hourly_step, hourly_step_from) fails the whole request with 400, and shaping applies to every results[i].weather, including rows served from the stale cache.

post/v1/weather/batch

Request

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

Request body

includestring

Same semantics as the include query parameter on GET /v1/weather. Applied to every location.

units'imperial' | 'metric'

Same semantics as the units query parameter on GET /v1/weather.

daysinteger

Same semantics as the days query parameter on GET /v1/weather.

hourly_hoursinteger

Same semantics as the hourly_hours query parameter on GET /v1/weather.

view'concise' | 'detailed'

Same semantics as the view query parameter on GET /v1/weather. Applied to every row.

fieldsstring

Same semantics as the fields query parameter on GET /v1/weather, as one comma-separated string. Validated once against the batch include; an invalid path fails the whole request with 400.

hourly_stepinteger

Same semantics as the hourly_step query parameter on GET /v1/weather.

hourly_step_frominteger

Same semantics as the hourly_step_from query parameter on GET /v1/weather.

Example request

{
  "include": "current,daily,alerts",
  "fields": "hourly.temperature,daily.high,daily.low"
}

Response

Batch result, one entry per input location.

Example response

{
  "results": [
    {
      "weather": {
        "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",
            "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"
          }
        ],
        "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"
              ]
            }
          ]
        }
      }
    }
  ],
  "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

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