Skip to Content
APIEndpoints🟒 GET /forecast-daily

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

NameTypeRequiredDescription
apiKeystringNo*API key (alternative to headers)
countnumberYesNumber of forecasted days (1–16)
formatstringNoResponse format: json (default) or xml

🧾 Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_KEYNo*
x-api-keyYOUR_API_KEYNo*

πŸ“¦ 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 CodeError MessageDescription
400count is requiredMissing count query parameter.
400count must be 1–16count value is outside the allowed range.
400No cities configuredNo cities saved on the Weather Data page.
400No daily fields configuredNo daily fields selected on the Weather Data page.
401UnauthorizedNo valid API key was provided.
429Rate limit exceededThe user has exceeded their rate limit.
500Error fetching daily forecastAn 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 forecast are ISO 8601 date strings (e.g. "2025-05-17").
  • Units (temperature, wind speed, etc.) depend on user preferences set in the dashboard.

See Data Types β†’ ForecastData (Daily) for the full response structure and available field names.

πŸ“ž Need Assistance?

If you have questions or need support:

Last updated on