<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WeatherKit",
  "identifier" : "/documentation/WeatherKit/WeatherQuery",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WeatherKit"
    ],
    "preciseIdentifier" : "s:10WeatherKit0A5QueryV"
  },
  "title" : "WeatherQuery"
}
-->

# WeatherQuery

A structure that encapsulates a generic weather dataset request.

```
struct WeatherQuery<T>
```

## Overview

Use the properties of this structure to create a weather query. You can combine multiple weather queries into a single [`WeatherService`](/documentation/WeatherKit/WeatherService) request.

Here’s how to get the weather for New York City:

```swift
let (hourly, daily, alerts) = try await service.weather(for: newYork, including: .hourly, .daily, .alerts)
```

## Topics

### Creating queries

[`alerts`](/documentation/WeatherKit/WeatherQuery/alerts)

The weather alerts query.

[`availability`](/documentation/WeatherKit/WeatherQuery/availability)

The availability query.

[`current`](/documentation/WeatherKit/WeatherQuery/current)

The current weather query.

[`daily`](/documentation/WeatherKit/WeatherQuery/daily)

The daily forecast query. This returns 10 contiguous days, beginning with the current day.

[`hourly`](/documentation/WeatherKit/WeatherQuery/hourly)

The hourly forecast query. This returns 25 contiguous hours, beginning with the current hour.

[`minute`](/documentation/WeatherKit/WeatherQuery/minute)

The minute forecast query.

[`daily(startDate:endDate:)`](/documentation/WeatherKit/WeatherQuery/daily(startDate:endDate:))

Returns weather for an arbitrary range of days, with the following caveats:

[`hourly(startDate:endDate:)`](/documentation/WeatherKit/WeatherQuery/hourly(startDate:endDate:))

The hourly forecast query that takes a start date and end date for the request, with the following caveats:

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)