Sometimes a weather display only needs a temperature and a small picture. You shouldn't have to set up an icon library just to show that it's sunny.
The weather response includes condition_emoji for this. Here's the relevant part of a clear-weather response:
{
"current": {
"condition": "clear",
"condition_name": "Clear",
"condition_emoji": "☀️"
}
}
Use condition when your code needs a known value such as clear, rain, or snow. condition_name is the readable description. The emoji is a string you can put next to it in a page, notification, or message without fetching an image. Its appearance depends on the device displaying it.
A station that doesn't report sky conditions can return null for these fields. If there is a description but we can't classify it, condition is unknown and the emoji is null. Keep displaying the available description when the emoji is missing. If the description is missing too, use a label such as "Conditions unavailable" instead of defaulting to sunshine.
Keep the readable condition beside the emoji so the picture isn't the only explanation. In HTML, an emoji that repeats adjacent text can have aria-hidden="true" so a screen reader doesn't announce the same condition twice.
Fog, haze, smoke, and dust share 🌫️. If your interface needs to distinguish them visually, use the condition code and your own icons. The weather docs show the rest of the response.