Defining the icon set parameter in the Weather API

The Weather API enables you to return a icon name for each row of weather data that summaries the weather that for that time period. This is done through the iconSet parameter in the API requests.

We have built this parameter to be extended over time to offer different icon sets. At the moment, the parameters allows for a single icon set called ”icons1″.

Be supplying the icon as an individual id, this enables you to create an output with the icons that you choose and display either by CSS, image or other rules.

In all icon sets, icons are chosen based on a priority of weather conditions. For example snow fall is higher importance than cloudiness and so snow icon will be chosen. The tables below are listed in descending order of priority.

Where an icon alternates between a day or nighttime, the sunrise and sunset parameters are used to decide between and nighttime.

Icon set icons

Icon idWeather Conditions
snowAmount of snow is greater than zero
rain Amount of rainfall is greater than zero
fogVisibility is low (lower than one kilometer or mile)
windWind speed is high (greater than 30 kph or mph)
cloudCloud cover is greater than 75% cover
partly-cloudy-day Cloud cover is greater than 25% cover during day time.
partly-cloudy-night Cloud cover is greater than 25% cover during night time.
clear-day Cloud cover is less than 25% cover during day time
clear-night Cloud cover is less than 25% cover during day time

2 Replies to “Defining the icon set parameter in the Weather API”

  1. I don’t get icons for forecasts, only for current conditions. I’m trying to switch away from DarkSky, but I use the ‘Icon’ property there a lot.

    Here’s the query:
    “https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/forecast?IconSet=icons1&aggregateHours=24&combinationMethod=aggregate&shortColumnNames=true&contentType=json&unitGroup=metric&locationMode=single&locations=49.1791,-122.3161&forecastDays=7&key=”

    Suggestions?

    1. Thank you for your note. The ‘iconSet’ API parameter is case sensitive – the first ‘i’ should be lower case and it looks like your may include an upper case I. For example:

      https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/forecast?iconSet=icons1&aggregateHours=24&combinationMethod=aggregate&shortColumnNames=true&contentType=json&unitGroup=metric&locationMode=single&locations=49.1791,-122.3161&forecastDays=7&key=

      Please let us know if that doesn’t help.

      Regards
      Visual Crossing Support

Leave a Reply

Your email address will not be published. Required fields are marked *