# Weather

## /weather

This endpoint retrieves weather information for a specified city. It accepts a GET request with query parameters including the `city`, `format`, and `lang`. If any of these parameters are missing, it returns a custom HTML page indicating missing parameters. If the city is not found, it throws an error. If the weather data is successfully fetched, it returns the temperature, weather description, time of observation, and the city name. If the weather data retrieval fails or an error occurs, it returns a corresponding error message with a status code of 500.

### Query Parameters

| Parameter | Type   | Description                                                             |
| --------- | ------ | ----------------------------------------------------------------------- |
| city      | string | The name of the city for which weather data is requested.               |
| format    | string | The format of the temperature (e.g., 'metric', 'imperial', 'standard'). |
| lang      | string | The language code for the response (e.g., 'en', 'fr', 'es').            |

### Example Usage

```
GET /weather?city=London&format=metric&lang=en
```

### Response

```
{
  "temperature": 20,
  "description": "Cloudy",
  "time": "10:30:00 AM",
  "city": "London"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ziomark.xyz/get-endpoints/weather.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
