GET /api/v1/weather/{language}/{latitude}/{longitude}
Obtain weather data for the specified location.
URL
GET https://weatherkit.apple.com/api/v1/weather/{language}/{latitude}/{longitude}Path Parameters
| Name | Type | Description |
|---|---|---|
language Required | string | The language tag to use for localizing responses. |
latitude Required | Latitude | The latitude of the desired location. |
longitude Required | Longitude | The longitude of the desired location. |
Query Parameters
| Name | Type | Description |
|---|---|---|
countryCode Optional | string | The ISO Alpha-2 country code for the requested location. This parameter is necessary for weather alerts. |
currentAsOf Optional | date-time | The time to obtain current conditions. Defaults to |
dailyEnd Optional | date-time | The time to end the daily forecast. If this parameter is absent, daily forecasts run for 10 days. |
dailyStart Optional | date-time | The time to start the daily forecast. If this parameter is absent, daily forecasts start on the current day. |
dataSets Optional | [DataSet] | A comma-delimited list of data sets to include in the response. |
hourlyEnd Optional | date-time | The time to end the hourly forecast. If this parameter is absent, hourly forecasts run 24 hours or the length of the daily forecast, whichever is longer. |
hourlyStart Optional | date-time | The time to start the hourly forecast. If this parameter is absent, hourly forecasts start on the current hour. |
timezone Required | string | The name of the timezone to use for rolling up weather forecasts into daily forecasts. |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | Weather | The request is successful. The weather alert is in the response. |
| 400 | Bad Request | The server is unable to process the request due to an invalid parameter value. | |
| 401 | Unauthorized | The request isn’t authorized or doesn’t include the correct authentication information. |