### Hourly Forecast - Multilingual Support Source: https://openweathermap.org/api/hourly-forecast?collection=current_forecast This example shows how to get hourly forecast data in a specific language. ```APIDOC ## GET /data/2.5/forecast/hourly ### Description Retrieves hourly weather forecast data with translated city names and descriptions based on the specified language code. ### Method GET ### Endpoint https://pro.openweathermap.org/data/2.5/forecast/hourly ### Parameters #### Query Parameters - **lat** (float) - Required - Latitude of the location. - **lon** (float) - Required - Longitude of the location. - **appid** (string) - Required - Your unique API key. - **lang** (string) - Optional - Language code for translations (e.g., 'zh_cn', 'fr', 'es'). ### Request Example ``` https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&lang=zh_cn&appid={API key} ``` ### Supported Languages - `sq` Albanian - `af` Afrikaans - `ar` Arabic - `az` Azerbaijani - `eu` Basque - `be` Belarusian - `bg` Bulgarian - `ca` Catalan - `zh_cn` Chinese Simplified - `zh_tw` Chinese Traditional - `hr` Croatian - `cz` Czech - `da` Danish - `nl` Dutch - `en` English - `fi` Finnish - `fr` French - `gl` Galician - `de` German - `el` Greek - `he` Hebrew - `hi` Hindi - `hu` Hungarian - `is` Icelandic - `id` Indonesian - `it` Italian - `ja` Japanese - `kr` Korean - `ku` Kurmanji (Kurdish) - `la` Latvian - `lt` Lithuanian - `mk` Macedonian - `no` Norwegian - `fa` Persian (Farsi) - `pl` Polish - `pt` Portuguese - `pt_br` Português Brasil - `ro` Romanian - `ru` Russian - `sr` Serbian - `sk` Slovak - `sl` Slovenian - `sp, es` Spanish - `sv, se` Swedish - `th` Thai - `tr` Turkish - `ua, uk` Ukrainian - `vi` Vietnamese - `zu` Zulu ``` -------------------------------- ### Example API Call for Timeline 1 Day Source: https://openweathermap.org/api/one-call-4 An example of a GET request to the Timeline 1 Day endpoint with specified latitude and longitude. ```http https://api.openweathermap.org/data/4.0/onecall/timeline/1day?lat=51.5&lon=-0.1&appid={API key} ``` -------------------------------- ### Example Radar Tile URL Source: https://openweathermap.org/api/global-precipitation-map?collection=maps An example of a complete URL to fetch a specific radar tile, demonstrating the parameter usage. ```URL https://maps.openweathermap.org/maps/2.0/radar/6/13/24?&appid={API key}&tm=1600781400 ``` -------------------------------- ### Example URL for HRD0 Layer Source: https://openweathermap.org/api/weather-map-1h?collection=maps This is a basic example of a URL to retrieve the Relative Humidity layer. ```URL https://maps.openweathermap.org/maps/2.0/weather/1h/HRD0/4/1/6?date=1618898990&appid={API key} ``` -------------------------------- ### Example API Call with API Key Source: https://openweathermap.org/api_keys This is an example of how to construct an API call to retrieve forecast data, including your unique API key. ```http http://api.openweathermap.org/data/2.5/forecast?id=524901&appid={API key} ``` -------------------------------- ### Example API Call for 1-Hour Timeline Source: https://openweathermap.org/api/one-call-4 An example of a complete API call for the 1-hour timeline, including latitude, longitude, and API key. ```http https://api.openweathermap.org/data/4.0/onecall/timeline/1h?lat=51.5&lon=-0.1&appid={API key} ``` -------------------------------- ### Example API Call by ZIP Code Source: https://openweathermap.org/api/forecast30 An example of an API call using a ZIP code and country code to get forecast data. ```HTTP https://pro.openweathermap.org/data/2.5/forecast/climate?zip=94040,us&appid={API key} ``` -------------------------------- ### Hourly Forecast API - Metric Units Source: https://openweathermap.org/api/hourly-forecast This example shows how to call the Hourly Forecast API to get data in metric units. ```APIDOC ## GET /data/2.5/forecast/hourly ### Description Retrieves hourly weather forecast data for a specified latitude and longitude using metric units. ### Method GET ### Endpoint https://pro.openweathermap.org/data/2.5/forecast/hourly ### Parameters #### Query Parameters - **lat** (number) - Required - Latitude of the location. - **lon** (number) - Required - Longitude of the location. - **appid** (string) - Required - Your unique API key. - **units** (string) - Optional - Units of measurement. Use `metric` for Celsius. ### Request Example ``` https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&units=metric ``` ### Response #### Success Response (200) - **list** (array) - Hourly forecast data. - **city** (object) - City information. - **description** (string) - Description of the weather condition (translated if `lang` is specified). #### Response Example ```json { "list": [ { "dt": 1698940800, "main": { "temp": 10.5, "feels_like": 9.8, "temp_min": 10.0, "temp_max": 11.0, "pressure": 1015, "sea_level": 1015, "grnd_level": 1005, "humidity": 80, "temp_kf": 0.5 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "speed": 3.5, "deg": 180, "gust": 5.0, "pop": 0.1, "rain": { "1h": 0.0 } } ], "city": { "id": 2655603, "name": "Aberdeen", "coord": { "lat": 57.1441, "lon": -2.0943 }, "country": "GB", "population": 0, "timezone": 0, "sunrise": 1698918000, "sunset": 1698950400 } } ``` ``` -------------------------------- ### XML Response Example Source: https://openweathermap.org/api/current?collection=current_forecast An example of the current weather data response in XML format. ```APIDOC ## XML Response Example ### Description This example demonstrates the structure of the current weather data when returned in XML format. ### Response Example ```xml IT 7200 ``` ``` -------------------------------- ### Example API Call with Coordinates Source: https://openweathermap.org/api/one-call-4 An example of a complete API call including latitude, longitude, and your API key. Ensure your API key is correctly substituted. ```HTTP https://api.openweathermap.org/data/4.0/onecall/timeline/15min?lat=51.5&lon=-0.1&appid={API key} ``` -------------------------------- ### Example 1-Minute Timeline API Call Source: https://openweathermap.org/api/one-call-4 An example of a complete API call for the 1-minute timeline, demonstrating the use of latitude, longitude, and API key parameters. ```URL https://api.openweathermap.org/data/4.0/onecall/timeline/1min?lat=51.5&lon=-0.1&appid={API key} ``` -------------------------------- ### Current Weather API Call Example (City) Source: https://openweathermap.org/api/hourly-forecast?collection=current_forecast Example of an API call to retrieve current weather data for a specified city. ```URL api.openweathermap.org/data/2.5/weather?q=London&appid={API key} ``` -------------------------------- ### Hourly Forecast API Call Example (Coordinates) Source: https://openweathermap.org/api/hourly-forecast?collection=current_forecast Example of an API call to retrieve hourly forecasts using latitude and longitude coordinates. ```URL https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key} ``` -------------------------------- ### Example Historical API Call Source: https://openweathermap.org/api/statistics-api?collection=historical An example of a complete API request for historical aggregated daily data. Ensure you replace '{API key}' with your actual key. ```URL https://history.openweathermap.org/data/2.5/aggregated/day?lat=35&lon=139&month=2&day=2&appid={API key} ``` -------------------------------- ### Current Weather API Call Example (XML Mode) Source: https://openweathermap.org/api/hourly-forecast?collection=current_forecast Example of an API call to retrieve current weather data in XML format for a specified city. ```URL api.openweathermap.org/data/2.5/weather?q=London&mode=xml ``` -------------------------------- ### XML API Response Example Source: https://openweathermap.org/api/current?collection=current_forecast This snippet shows an example of the XML format for an API response, detailing current weather conditions for a city. ```xml IT 7200 ``` -------------------------------- ### Example: Download Hourly Forecast Bulk in CSV Format Source: https://openweathermap.org/api/bulk This example demonstrates how to construct a URL to download an hourly forecast bulk file in CSV format for EU ZIP codes. Replace {API key} with your valid API key. ```URL https://bulk.openweathermap.org/snapshot/hourly1h_zip_eu.csv.gz?appid={API key} ``` -------------------------------- ### Relief Map URL Example Source: https://openweathermap.org/api/relief?collection=maps This is a basic URL example for fetching relief map tiles. Customize parameters like sun azimuth, sun elevation, and opacity as needed. Ensure you replace '{API key}' with your actual OpenWeatherMap API key. ```url http://maps.openweathermap.org/maps/2.0/relief/{z}/{x}/{y}?sun_az=0&sun_el=45& opacity=1&appid={API key} ``` -------------------------------- ### Example: Download Current Weather Bulk in CSV Format Source: https://openweathermap.org/api/bulk This example shows how to construct a URL to download a current weather bulk file in CSV format for US ZIP codes. Ensure you replace {API key} with your actual API key. ```URL https://bulk.openweathermap.org/snapshot/weather_zip_us.csv.gz?appid={API key} ``` -------------------------------- ### 1-Hour Weather Data URL Example Source: https://openweathermap.org/api/weather-map-1h?collection=maps This is an example URL for fetching 1-hour weather data tiles. Replace `{z}`, `{x}`, `{y}` with tile coordinates and `{API key}` with your actual API key. The `date` parameter specifies the timestamp. ```text https://maps.openweathermap.org/maps/2.0/weather/1h/WNDUV/{z}/{x}/{y}?date=1618898990&use_norm=true&arrow_step=16&appid={API key} ``` -------------------------------- ### Hourly Forecast API - Multilingual Support Source: https://openweathermap.org/api/hourly-forecast This example demonstrates how to use the `lang` parameter to get forecast descriptions in different languages. ```APIDOC ## GET /data/2.5/forecast/hourly ### Description Retrieves hourly weather forecast data with translated city names and descriptions using the `lang` parameter. ### Method GET ### Endpoint https://pro.openweathermap.org/data/2.5/forecast/hourly ### Parameters #### Query Parameters - **lat** (number) - Required - Latitude of the location. - **lon** (number) - Required - Longitude of the location. - **appid** (string) - Required - Your unique API key. - **lang** (string) - Optional - Language code for translation (e.g., `zh_cn`, `fr`, `es`). ### Request Example ``` https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&lang=zh_cn ``` ### Supported Languages - `sq` Albanian - `af` Afrikaans - `ar` Arabic - `az` Azerbaijani - `eu` Basque - `be` Belarusian - `bg` Bulgarian - `ca` Catalan - `zh_cn` Chinese Simplified - `zh_tw` Chinese Traditional - `hr` Croatian - `cz` Czech - `da` Danish - `nl` Dutch - `en` English - `fi` Finnish - `fr` French - `gl` Galician - `de` German - `el` Greek - `he` Hebrew - `hi` Hindi - `hu` Hungarian - `is` Icelandic - `id` Indonesian - `it` Italian - `ja` Japanese - `kr` Korean - `ku` Kurmanji (Kurdish) - `la` Latvian - `lt` Lithuanian - `mk` Macedonian - `no` Norwegian - `fa` Persian (Farsi) - `pl` Polish - `pt` Portuguese - `pt_br` Português Brasil - `ro` Romanian - `ru` Russian - `sr` Serbian - `sk` Slovak - `sl` Slovenian - `sp, es` Spanish - `sv, se` Swedish - `th` Thai - `tr` Turkish - `ua, uk` Ukrainian - `vi` Vietnamese - `zu` Zulu ### Response Example (with `lang=zh_cn`) ```json { "list": [ { "dt": 1698940800, "main": { "temp": 10.5, "feels_like": 9.8, "temp_min": 10.0, "temp_max": 11.0, "pressure": 1015, "sea_level": 1015, "grnd_level": 1005, "humidity": 80, "temp_kf": 0.5 }, "weather": [ { "id": 800, "main": "Clear", "description": "晴朗的天空", "icon": "01d" } ], "speed": 3.5, "deg": 180, "gust": 5.0, "pop": 0.1, "rain": { "1h": 0.0 } } ], "city": { "id": 2655603, "name": "阿伯丁", "coord": { "lat": 57.1441, "lon": -2.0943 }, "country": "GB", "population": 0, "timezone": 0, "sunrise": 1698918000, "sunset": 1698950400 } } ``` ``` -------------------------------- ### Hourly Forecast API - Imperial Units Source: https://openweathermap.org/api/hourly-forecast This example shows how to call the Hourly Forecast API to get data in imperial units. ```APIDOC ## GET /data/2.5/forecast/hourly ### Description Retrieves hourly weather forecast data for a specified latitude and longitude using imperial units. ### Method GET ### Endpoint https://pro.openweathermap.org/data/2.5/forecast/hourly ### Parameters #### Query Parameters - **lat** (number) - Required - Latitude of the location. - **lon** (number) - Required - Longitude of the location. - **appid** (string) - Required - Your unique API key. - **units** (string) - Optional - Units of measurement. Use `imperial` for Fahrenheit. ### Request Example ``` https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&units=imperial ``` ### Response #### Success Response (200) - **list** (array) - Hourly forecast data. - **city** (object) - City information. - **description** (string) - Description of the weather condition (translated if `lang` is specified). #### Response Example ```json { "list": [ { "dt": 1698940800, "main": { "temp": 50.9, "feels_like": 49.64, "temp_min": 50.0, "temp_max": 51.8, "pressure": 1015, "sea_level": 1015, "grnd_level": 1005, "humidity": 80, "temp_kf": 0.5 }, "weather": [ { "id": 800, "main": "Clear", "description": "clear sky", "icon": "01d" } ], "speed": 7.83, "deg": 180, "gust": 11.18, "pop": 0.1, "rain": { "1h": 0.0 } } ], "city": { "id": 2655603, "name": "Aberdeen", "coord": { "lat": 57.1441, "lon": -2.0943 }, "country": "GB", "population": 0, "timezone": 0, "sunrise": 1698918000, "sunset": 1698950400 } } ``` ``` -------------------------------- ### Weather Tile URL Example Source: https://openweathermap.org/api/weather-map-2 Example URL for fetching weather data tiles. Replace {z}, {x}, {y} with tile coordinates and {API key} with your OpenWeatherMap API key. ```text http://maps.openweathermap.org/maps/2.0/weather/WND/{z}/{x}/{y}?date=1552861800&use_norm=true&arrow_step=16&appid={API key} ``` -------------------------------- ### Hourly Forecast API Call with Specific Language (Chinese Simplified) Source: https://openweathermap.org/api/hourly-forecast?collection=current_forecast This example demonstrates an API call to get hourly forecast data in Chinese Simplified. ```URL https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&lang=zh_cn&appid={API key} ``` -------------------------------- ### Accumulated Precipitation API Call with Parameters Source: https://openweathermap.org/api/accumulated-parameters?collection=historical Example of an API call for accumulated precipitation, specifying latitude, longitude, start and end dates, and an API key. ```http http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?lat=51.51&lon=-0.12&start=1586853378&end=1589445367&appid={API key} ``` -------------------------------- ### Example API Call (Alternative Format) Source: https://openweathermap.org/api_keys An alternative format for an API call to retrieve forecast data, demonstrating the placement of the API key. ```http api.openweathermap.org/data/2.5/forecast?id=524901&appid={API key} ``` -------------------------------- ### Accumulated Temperature API Call with Parameters Source: https://openweathermap.org/api/accumulated-parameters?collection=historical Example of an API call for accumulated temperature, specifying latitude, longitude, start and end dates, a temperature threshold, and an API key. ```http http://history.openweathermap.org/data/2.5/history/accumulated_temperature?lat=51.51&lon=-0.13&start=1586853378&end=1589445367&threshold=284&appid={API key} ``` -------------------------------- ### Get Air Pollution History Source: https://openweathermap.org/api/air-pollution?collection=environmental Fetches historical air pollution data for a given latitude and longitude within a specified start and end date. Requires an API key for authentication. ```APIDOC ## GET /data/2.5/air_pollution/history ### Description Retrieves historical air pollution data for a specific location and time range. ### Method GET ### Endpoint /data/2.5/air_pollution/history ### Parameters #### Query Parameters - **lat** (number) - Required - Latitude. - **lon** (number) - Required - Longitude. - **start** (integer) - Required - Start date (unix time, UTC time zone), e.g. start=1606488670. - **end** (integer) - Required - End date (unix time, UTC time zone), e.g. end=1606747870. - **appid** (string) - Required - Your unique API key. ### Response #### Success Response (200) - **coord** (array) - Coordinates from the specified location (latitude, longitude). - **list** (array) - An array of historical air pollution data points. - **dt** (integer) - Date and time, Unix, UTC. - **main** (object) - **aqi** (integer) - Air Quality Index. Possible values: 1, 2, 3, 4, 5. - **components** (object) - **co** (number) - Concentration of CO (Carbon monoxide), μg/m3. - **no** (number) - Concentration of NO (Nitrogen monoxide), μg/m3. - **no2** (number) - Concentration of NO2 (Nitrogen dioxide), μg/m3. - **o3** (number) - Concentration of O3 (Ozone), μg/m3. - **so2** (number) - Concentration of SO2 (Sulphur dioxide), μg/m3. - **pm2_5** (number) - Concentration of PM2.5 (Fine particles matter), μg/m3. - **pm10** (number) - Concentration of PM10 (Coarse particulate matter), μg/m3. - **nh3** (number) - Concentration of NH3 (Ammonia), μg/m3. ### Request Example ```json { "coord": [ 50.0, 50.0 ], "list": [ { "main": { "aqi": 2 }, "components": { "co": 270.367, "no": 5.867, "no2": 43.184, "o3": 4.783, "so2": 14.544, "pm2_5": 13.448, "pm10": 15.524, "nh3": 0.289 }, "dt": 1606482000 } ] } ``` ### Response Example ```json { "coord": [ 50, 50 ], "list": [ { "dt": 1605182400, "main": { "aqi": 1 }, "components": { "co": 201.94053649902344, "no": 0.01877197064459324, "no2": 0.7711350917816162, "o3": 68.66455078125, "so2": 0.6407499313354492, "pm2_5": 0.5, "pm10": 0.540438711643219, "nh3": 0.12369127571582794 } } ] } ``` ``` -------------------------------- ### Current Weather API Response Example (JSON) Source: https://openweathermap.org/api/hourly-forecast?collection=current_forecast Illustrates the 'main' object in a current weather API response, showing temperature, pressure, humidity, and min/max temperatures for reference. ```json "main":{ "temp":306.15, //current temperature "pressure":1013, "humidity":44, "temp_min":306.15, //min current temperature in the city "temp_max":306.15 //max current temperature in the city } ``` -------------------------------- ### API Call with Standard Units Source: https://openweathermap.org/api/history?collection=historical Example of an API call to fetch historical weather data using default (standard) units. This call includes latitude, longitude, type, start, and end dates. ```HTTP https://history.openweathermap.org/data/2.5/history/city?lat=41.85&lon=-87&type=hour&start=1643720400&end=1643806800&appid={API key} ``` -------------------------------- ### API Call Example Source: https://openweathermap.org/api_keys This example demonstrates how to make an API call to retrieve weather forecast data using your API key. The API key is a required parameter for all OpenWeather API requests. ```APIDOC ## API call http://api.openweathermap.org/data/2.5/forecast?id=524901&appid={API key} ### Parameters `appid`| required| Your unique API key (you can always find it on your account page under the "API key" tab) ## Example of API call api.openweathermap.org/data/2.5/forecast?id=524901&appid={API key} ``` -------------------------------- ### Accumulated Precipitation API Call Example Source: https://openweathermap.org/api/accumulated-parameters Use this endpoint to retrieve accumulated precipitation data. Specify latitude, longitude, start and end dates (Unix time). The threshold parameter is not used for precipitation. ```HTTP http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?lat={lat}&lon={lon}&start={start}&end={end}&appid={API key} ``` ```HTTP http://history.openweathermap.org/data/2.5/history/accumulated_precipitation?lat=51.51&lon=-0.12&start=1586853378&end=1589445367&appid={API key} ``` -------------------------------- ### History Forecast Bulk Data Structure Example Source: https://openweathermap.org/api/history-forecast-bulk?collection=historical Illustrates the time steps for forecast data retrieval. Older forecasts may have different time steps for later days. ```text 00:00 UTC {forecast weather data for 1st day - 16th day} 06:00 UTC {forecast weather data for 1st day - 16th day} 12:00 UTC {forecast weather data for 1st day - 16th day} 18:00 UTC {forecast weather data for 1st day - 16th day} ``` -------------------------------- ### Accumulated Temperature API Call Example Source: https://openweathermap.org/api/accumulated-parameters Use this endpoint to retrieve accumulated temperature data. Specify latitude, longitude, start and end dates (Unix time), and an optional temperature threshold. An API key is required. ```HTTP http://history.openweathermap.org/data/2.5/history/accumulated_temperature?lat={lat}&lon={lon}&start={start}&end={end}&threshold={threshold}&appid={API key} ``` ```HTTP http://history.openweathermap.org/data/2.5/history/accumulated_temperature?lat=51.51&lon=-0.13&start=1586853378&end=1589445367&threshold=284&appid={API key} ``` -------------------------------- ### Example Fire Weather Index Map API Call Source: https://openweathermap.org/api/fire-index-map?collection=maps An example of a complete API call for a Fire Weather Index map. This specific example requests data for a particular date. ```URL https://maps.openweathermap.org/maps/2.0/fwi/4/1/6?appid={API key}&date=1600780200 ``` -------------------------------- ### Hourly Forecast API Call Example Source: https://openweathermap.org/api/hourly-forecast?collection=current_forecast An example of an hourly forecast API call with specific latitude and longitude values. Ensure you replace `{API key}` with your actual key. ```bash https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=44.34&lon=10.99&appid={API key} ``` -------------------------------- ### API Response Example Source: https://openweathermap.org/api/one-call-4 An example of the JSON response structure for the current weather data, including various meteorological parameters. ```APIDOC ## API Response Example This is an example of the JSON response structure for the current weather data. ### Response Body ```json { "lat": 51.5, "lon": -0.1, "timezone": "Europe/London", "timezone_offset": 3600, "data": [ { "dt": 1777449371, "sunrise": 1777437375, "sunset": 1777490344, "temp": 286.42, "feels_like": 285.32, "pressure": 1024, "humidity": 58, "dew_point": 278.34, "uvi": 1.55, "clouds": 0, "visibility": 10000, "wind_speed": 8.23, "wind_deg": 70, "weather": [ { "id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d" } ], "alerts": [ "8B46C632-DCA7-44D7-8BDF-02445621BAFF", "29F58A35-BB91-4A73-9F46-9FC64BDF604F" ] } ] } ``` ### Fields in API Response If you do not see some of the parameters in your API response, it means these weather phenomena did not occur at the time of measurement for the selected city or location. Only measured or calculated data is displayed in the API response. **Current weather endpoint returns 1 record in the API response.** * `lat` (number) - Latitude of the location, decimal (−90; 90) * `lon` (number) - Longitude of the location, decimal (-180; 180) * `timezone` (string) - Timezone name for the requested location * `timezone_offset` (integer) - Shift in seconds from UTC * `data` (array) - Array of weather data records. * `dt` (integer) - Current time, Unix, UTC * `sunrise` (integer) - Sunrise time, Unix, UTC. For polar areas in midnight sun and polar night periods this parameter is not returned in the response * `sunset` (integer) - Sunset time, Unix, UTC. For polar areas in midnight sun and polar night periods this parameter is not returned in the response * `temp` (number) - Temperature. Units - default: kelvin, metric: Celsius, imperial: Fahrenheit. * `feels_like` (number) - Temperature. This temperature parameter accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit. * `pressure` (integer) - Atmospheric pressure at sea level, hPa * `humidity` (integer) - Humidity, % * `dew_point` (number) - Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit * `uvi` (number) - Current UV index. * `clouds` (integer) - Cloudiness, % * `visibility` (integer) - Average visibility, metres. The maximum value of the visibility is 10 km * `wind_speed` (number) - Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. * `wind_gust` (number, optional) - Wind gust. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. * `wind_deg` (integer) - Wind direction, degrees (meteorological) * `rain` (object, optional) - Precipitation data. * `1h` (number) - Precipitation, mm/h. Please note that only mm/h as units of measurement are available for this parameter * `snow` (object, optional) - Snowfall data. * `1h` (number) - Precipitation, mm/h. Please note that only mm/h as units of measurement are available for this parameter * `weather` (array) - Array of weather conditions. * `id` (integer) - Weather condition id * `main` (string) - Group of weather parameters (Rain, Snow etc.) * `description` (string) - Weather condition within the group (full list of weather conditions). Get the output in your language * `icon` (string) - Weather icon id. * `alerts` (array of strings) - Array of weather alert IDs associated with the requested location and time. Each ID can be used to retrieve detailed information about the corresponding alert via the Weather Alert detailed information endpoint. National weather alerts are provided in English by default. Please note that some agencies provide the alert’s description only in a local language. ``` -------------------------------- ### API Call Example Source: https://openweathermap.org/api/current?collection=current_forecast This snippet shows a sample JSON response from an API call, likely for weather data. It includes coordinates, weather conditions, temperature, wind, and location details. ```json test( { "coord":{ "lon":-0.13, "lat":51.51 }, "weather":[ { "id":300, "main":"Drizzle", "description":"light intensity drizzle", "icon":"09d" } ], "base":"stations", "main":{ "temp":280.32, "pressure":1012, "humidity":81, "temp_min":279.15, "temp_max":281.15 }, "visibility":10000, "wind":{ "speed":4.1, "deg":80 }, "clouds":{ "all":90 }, "dt":1485789600, "sys":{ "type":1, "id":5091, "message":0.0103, "country":"GB", "sunrise":1485762037, "sunset":1485794875 }, "id":2643743, "name":"London", "cod":200 } ) ``` -------------------------------- ### Example API Response (Imperial Units) Source: https://openweathermap.org/api/current?collection=current_forecast This is an example of a JSON response for a weather API call using imperial units. ```json { "coord": { "lon": -2.15, "lat": 57 }, "weather": [ { "id": 804, "main": "Clouds", "description": "overcast clouds", "icon": "04d" } ], "base": "stations", "main": { "temp": 47.26, "feels_like": 40.82, "temp_min": 46.72, "temp_max": 48.67, "pressure": 1016, "humidity": 79, "sea_level": 1016, "grnd_level": 1016 }, "visibility": 10000, "wind": { "speed": 16.33, "deg": 189, "gust": 30.15 }, "clouds": { "all": 100 }, "dt": 1647347504, "sys": { "type": 2, "id": 2031790, "country": "GB", "sunrise": 1647325488, "sunset": 1647367827 }, "timezone": 0, "id": 2641549, "name": "Newtonhill", "cod": 200 } ```