weather array in the response.
Each entry includes:
- a numeric condition code (
id) - a short group label (
main) - a human-readable description (
description) - an icon code (
icon)
id field for application logic, and the description field for display.
Example response:
weather array may contain multiple entries, but most applications use the first item (weather[0]).
Weather icons
Weather icons provide a visual representation of the current conditions. To display an icon, construct the URL using theicon value returned by the API:
https://openweathermap.org/img/wn/<ICON_CODE>@2x.png
Replace <ICON_CODE> with the appropriate icon code from the API response (for example, 10n for light rain).
Icon codes ending in d are for daytime, and those ending in n are for nighttime.
The following sections include the icon list and commonly used weather condition codes.
Weather icon list
Weather condition codes
The Current Weather Data API uses numerical codes to represent different weather conditions. These codes are grouped by type of weather condition. Use these codes to drive application logic (for example, grouping conditions or triggering UI changes). Avoid relying on thedescription field for logic, as it is intended for display and may vary.