# getWeatherForecast

**Identifier:** `openweather_getWeatherForecast`

**Provider:** [OpenWeather](https://kirha.com/providers/openweather.md)

Get weather forecast for up to 5 days with 3-hour intervals for a specific location.

## Run it with the CLI

```bash
kirha tools run openweather_getWeatherForecast \
  --input '{
    "location": "London"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "openweather_getWeatherForecast",
  "input": {
    "location": "London"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "days": {
      "default": 3,
      "description": "Number of days to forecast (1-5)",
      "maximum": 5,
      "minimum": 1,
      "type": "number"
    },
    "location": {
      "description": "City name or city,country code (e.g., 'London' or 'London,UK')",
      "type": "string"
    }
  },
  "required": [
    "location"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "coordinates": {
      "additionalProperties": false,
      "properties": {
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        }
      },
      "required": [
        "lat",
        "lon"
      ],
      "type": "object"
    },
    "country": {
      "type": "string"
    },
    "forecasts": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "cloudiness": {
            "type": "number"
          },
          "feelsLike": {
            "type": "number"
          },
          "humidity": {
            "type": "number"
          },
          "precipitationProbability": {
            "type": "number"
          },
          "pressure": {
            "type": "number"
          },
          "rain3h": {
            "type": "number"
          },
          "snow3h": {
            "type": "number"
          },
          "tempMax": {
            "type": "number"
          },
          "tempMin": {
            "type": "number"
          },
          "temperature": {
            "type": "number"
          },
          "timestamp": {
            "type": "string"
          },
          "visibility": {
            "type": "number"
          },
          "weather": {
            "additionalProperties": false,
            "properties": {
              "description": {
                "type": "string"
              },
              "icon": {
                "type": "string"
              },
              "main": {
                "type": "string"
              }
            },
            "required": [
              "main",
              "description",
              "icon"
            ],
            "type": "object"
          },
          "windDirection": {
            "type": "number"
          },
          "windGust": {
            "type": "number"
          },
          "windSpeed": {
            "type": "number"
          }
        },
        "required": [
          "timestamp",
          "temperature",
          "feelsLike",
          "tempMin",
          "tempMax",
          "pressure",
          "humidity",
          "weather",
          "cloudiness",
          "windSpeed",
          "precipitationProbability"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "location": {
      "type": "string"
    },
    "timezone": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "location",
    "country",
    "coordinates",
    "forecasts",
    "timezone"
  ],
  "type": "object"
}
```

-----

[All OpenWeather tools](https://kirha.com/providers/openweather.md) · [< Back to tools list](https://kirha.com/tools.md)