Ultraviolet Index (Deprecated)

The product retired on 1st April 2021, please find UV data in One Call API.
One Call API includs current, hourly forecast for 7 days and 5 days historical UV data.

Access current, forecast and historical UV data for any location on Earth including over 200,000 cities! Data is available in the JSON format.

Call current UV data

Parameters of API call
lat, lon required Geographical coordinates (latitude, longitude)
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

Example of API response

Example of API response
                      
{
"lat":37.75,
"lon":-122.37,
"date_iso":"2017-06-26T12:00:00Z",
"date":1498478400,
"value":10.06
}
                      
                    

Call forecast UV data

The data is available for 8 days ahead.

Parameters of API call
lat, lon required Geographical coordinates (latitude, longitude)
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
cnt optional A number of timestamps in response.

Example of API call

Example of API response
                      
  [
      {
          "lat":37.75,
          "lon":-122.37,
          "date_iso":"2017-06-27T12:00:00Z",
          "date":1498564800,
          "value":10.1
      },
      {
          "lat":37.75,
          "lon":-122.37,
          "date_iso":"2017-06-28T12:00:00Z",
          "date":1498651200,
          "value":10.19
      },
      ...
      {
          "lat":37.75,
          "lon":-122.37,
          "date_iso":"2017-07-04T12:00:00Z",
          "date":1499169600,
          "value":10.05
      }
  ]
                      
                    

Call historical UV data

Parameters
lat, lon required Geographical coordinates (latitude, longitude)
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
cnt optional A number of timestamps in response.
start optional Starting point of time period in UNIX time
end optional Final point of time period in UNIX time

Example of API call

Example of API response
                       
[
    {
        "lat":37.75,
        "lon":-122.37,
        "date_iso":"2017-06-22T12:00:00Z",
        "date":1498132800,
        "value":9.92
    },
    {
        "lat":37.75,
        "lon":-122.37,
        "date_iso":"2017-06-23T12:00:00Z",
        "date":1498219200,
        "value":10.09
    },
    {
        "lat":37.75,
        "lon":-122.37,
        "date_iso":"2017-06-24T12:00:00Z",
        "date":1498305600,
        "value":10.95
    },
    {
        "lat":37.75,
        "lon":-122.37,
        "date_iso":"2017-06-25T12:00:00Z",
        "date":1498392000,
        "value":11.03
    },
    {
        "lat":37.75,
        "lon":-122.37,
        "date_iso":"2017-06-26T12:00:00Z",
        "date":1498478400,
        "value":10.06
    }
]
                       
                     
The data is available starting from the 2017-06-22.

Server response format

Please remember that data is provided only for 12:00 p.m.
Example
                    
{
  "lat": 38.75,
  "lon": 40.25,
  "date_iso": "2017-06-23T12:00:00Z",
  "date": 1498219200,
  "value": 10.16
}
                    
                  
  • lat float latitude for returned data
  • lon float longitude for returned data
  • date_iso string date and time corresponding to returned date
  • date integer ISO 8601 timestamp
  • value float longitude for returned data

Codes of requests

If API call is successful - 200 HTTP-code is returned. If location is not found or wrong APPID is specified then HTTP-code 404 or HTTP-code 400 are returned accordingly.