GET /forecast-daily
This endpoint provides a daily weather forecast for a list of cities, up to 16 days ahead. Forecast data includes temperature, wind, humidity, sunrise/sunset times, cloud coverage, weather alerts, and more. The data is structured by date (Unix timestamp in seconds).
π Authentication
You must provide an API key either as a query parameter or in the headers:
- Query:
?apiKey=YOUR_API_KEY - Header:
Authorization: Bearer YOUR_API_KEY - Header:
x-api-key: YOUR_API_KEY
π§© Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | No* | API key (alternative to headers) |
| count | number | Yes | Number of forecasted days (1β16) |
| format | string | No | Response format: json (default) or xml |
π§Ύ Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer YOUR_API_KEY | No* |
| x-api-key | YOUR_API_KEY | No* |
π¦ Response
Returns a list of cities with their 16-day weather forecast data.
β Example Successful Response
1{
2"message": [
3 {
4 "city": "ZΓΌrich",
5 "locale": "de-CH",
6 "data": {
7 "forecast": {
8 "2025-05-17": {
9 "time": "2025-05-17",
10 "icon": "https://cdn.skycaster.tv/set-1-gif/01d.gif",
11 "weather_description": "Clear sky",
12 "temperature": 24.9,
13 "temperature_max": 24.9,
14 "temperature_min": 9.4,
15 "wind_speed": 4.1,
16 "wind_direction": 36,
17 "humidity": 47,
18 "sunrise": "2025-05-17T05:33",
19 "sunset": "2025-05-17T21:14"
20 },
21 "2025-05-18": {
22 "time": "2025-05-18",
23 "icon": "https://cdn.skycaster.tv/set-1-gif/02d.gif",
24 "weather_description": "Partly cloudy",
25 "temperature": 21.3,
26 "temperature_max": 21.3,
27 "temperature_min": 11.1,
28 "wind_speed": 3.8,
29 "wind_direction": 120,
30 "humidity": 55,
31 "sunrise": "2025-05-18T05:32",
32 "sunset": "2025-05-18T21:15"
33 }
34 },
35 "type": "daily",
36 "days": 2
37 }
38 }
39]
40}
β Possible Errors
| Status Code | Error Message | Description |
|---|---|---|
| 400 | count is required | Missing count query parameter. |
| 400 | count must be 1β16 | count value is outside the allowed range. |
| 400 | No cities configured | No cities saved on the Weather Data page. |
| 400 | No daily fields configured | No daily fields selected on the Weather Data page. |
| 401 | Unauthorized | No valid API key was provided. |
| 429 | Rate limit exceeded | The user has exceeded their rate limit. |
| 500 | Error fetching daily forecast | An internal server error occurred. |
βοΈ Internal Notes
- Forecast data is daily and spans up to 16 days.
- Forecast data is sourced from the Open-Meteo API.
- Keys in
forecastare ISO 8601 date strings (e.g."2025-05-17"). - Units (temperature, wind speed, etc.) depend on user preferences set in the dashboard.
π Related Types
See Data Types β ForecastData (Daily) for the full response structure and available field names.
π Need Assistance?
If you have questions or need support:
- Contact Support: Reach out via our Support Pageβ.
- Email Us: Send inquiries to support@skycaster.tv.
Last updated on