Weather Icons
Icon codes and day/night indicators returned in forecast responses.
Overview
All forecast responses include an icon field on every data point that represents a weather condition. This string value contains everything needed to display an appropriate weather icon or condition label.
The icon field is a string like "01d" or "07n", where the first two digits are the condition code and the suffix indicates day (d) or night (n).
Icon Codes
| Code | Day | Night | Condition |
|---|---|---|---|
| 00 | "00d" |
"00n" |
Clear |
| 01 | "01d" |
"01n" |
Partly cloudy |
| 02 | "02d" |
"02n" |
Cloudy |
| 03 | "03d" |
"03n" |
Drizzle |
| 04 | "04d" |
"04n" |
Rain |
| 05 | "05d" |
"05n" |
Heavy rain |
| 06 | "06d" |
"06n" |
Snow |
| 07 | "07d" |
"07n" |
Heavy snow |
| 08 | "08d" |
"08n" |
Wintry mix |
| 09 | "09d" |
"09n" |
Fog |
| 10 | "10d" |
"10n" |
Mist |
| 11 | "11d" |
"11n" |
Haze |
| 12 | "12d" |
"12n" |
Thunderstorm |
| 13 | "13d" |
"13n" |
Hail |
| 14 | "14d" |
"14n" |
Wind |
Day/Night Indicator
The last character of the icon string indicates day (d) or night (n). This corresponds to whether the data point falls during daylight hours at the requested location, determined by sunrise and sunset times. The is_day boolean field is also provided alongside icon for convenience.
Use the day/night suffix to select the correct visual. For example, "00d" (Clear, day) should display a sun, while "00n" (Clear, night) should display a moon. Most conditions (rain, snow, fog, etc.) do not need a day/night variant.
Where These Fields Appear
Both icon and is_day are present on:
currently– the current conditions objecthourly.data[]– each hourly forecast pointdaily.data[]– each daily forecast entry (represents the daytime condition; suffix is alwaysd)
Example
{
"currently": {
"time": 1709132400,
"summary": "Partly Cloudy",
"icon": "01d",
"is_day": true,
"temperature": 8.2
},
"hourly": {
"data": [
{
"time": 1709132400,
"icon": "01d",
"is_day": true,
"temperature": 8.2
},
{
"time": 1709175600,
"icon": "00n",
"is_day": false,
"temperature": 3.1
}
]
}
}
Usage Notes
- Icon codes are stable and will not change meaning. New codes may be added at the end of the range.
- Codes 00 and 01 (Clear and Partly cloudy) are the only conditions where a day/night visual distinction is typically needed. All other conditions can use a single icon regardless of the day/night suffix.