Ultraviolet Index (Deprecated)
The product retired on 1st April 2021, please find UV data in One Call API 4.0. 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 | ||
|---|---|---|
| required | Geographical coordinates (latitude, longitude) |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
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 | ||
|---|---|---|
| required | Geographical coordinates (latitude, longitude) |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | A number of timestamps in response. |
Example of API call
[
{
"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 | ||
|---|---|---|
| required | Geographical coordinates (latitude, longitude) |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | A number of timestamps in response. |
| optional | Starting point of time period in UNIX time |
| optional | Final point of time period in UNIX time |
Example of API call
[
{
"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.
{
"lat": 38.75,
"lon": 40.25,
"date_iso": "2017-06-23T12:00:00Z",
"date": 1498219200,
"value": 10.16
}latfloat latitude for returned datalonfloat longitude for returned datadate_isostring date and time corresponding to returned datedateinteger ISO 8601 timestampvaluefloat 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.