---
title: "Get weather forecast for a location"
method: GET
path: "/{apikey}/weather/{lat}/{lon}"
tags: ["Weather", "Professional"]
---

# Get weather forecast for a location

`GET /{apikey}/weather/{lat}/{lon}`

## Request

- Base URL: `https://api.forecast.solar` (the document declares no server; this is the origin it was published from)
- URL: `https://api.forecast.solar/{apikey}/weather/{lat}/{lon}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/forecast/apis/forecast-solar/docs/:apikey/weather/:lat/:lon/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `apikey` string, required
- `lat` number, float, required
- `lon` number, float, required

## Headers

- `X-Delimiter` string
- `X-Separator` string

## Response `200`

OK

- ResponseWeather: Weather forecast
  - `result` DatasetWeather[]
    - `datetime` string, date-time
    - `timestamp` number: Seconds since 1970
    - `sky` number, float: 0 (very coudy) .. 1 (clear sky)
    - `temperature` number, float: °C
    - `condition` string: Human readable condition
    - `icon` string: Condition icon
    - `wind_speed` number, float: m/s
    - `wind_degrees` number: Grad, 0 = North, 90 = East, 180 = South, 270 = West, 360 = North
    - `wind_direction` number: Human readable wind direction
  - `message` MessageOk
    - `code` integer
    - `type` string
    - `text` string

## Other responses

- `400`: Bad Request
- `404`: Not Found

---

[API](https://skmtc.dev/forecast/apis/forecast-solar.md) - [All operations](https://skmtc.dev/forecast/apis/forecast-solar/llms.txt) - [OpenAPI document](https://skmtc.dev/forecast/apis/forecast-solar/revisions/2e40b595ffd2?raw)
