UV Index

Overview

  • Domain Portfolio: Forecast
  • Domain: Lifestyle - Indices
  • Usage Classification: Standard
  • Geography: Global
  • Attribution Required: n/a
  • Attribution Requirements: n/a

The UV Index provides indices of the intensity of the solar radiation level and risk of skin damage due to exposure.

HTTP Headers and Data Lifetime - Caching and Expiration

For details on appropriate header values as well as caching and expiration definitions, please see The Weather Company Data | API Common Usage Guide.

URL Construction

Atomic API URL Examples:  
UV Index - Daypart API  

Request by Geocode (Latitude & Longitude): Required Parameters: geocode, language, format

https://api.weather.com/v2/indices/uv/daypart/<duration>?geocode=33.74,-84.39&language=en-US&format=<json>&apiKey=yourApiKey

https://api.weather.com/v2/indices/uv/daypart/15day?geocode=33.74,-84.39&language=en-US&format=json&apiKey=yourApiKey

 

Request by Postal Code: Required Parameters: postalCode, countryCode, language, format

https://api.weather.com/v2/indices/uv/daypart/<duration>?postalCode=94608&countryCode=US&format=<json>&language=en-US&apiKey=yourApiKey

https://api.weather.com/v2/indices/uv/daypart/15day?postalCode=94608&countryCode=US&format=json&language=en-US&apiKey=yourApiKey  
UV Index - Hourly API  

Request by Geocode (Latitude & Longitude): Required Parameters: geocode, language, format

https://api.weather.com/v2/indices/uv/hourly/<duration>?geocode=33.74,-84.39&language=en-US&format=<json>&apiKey=yourApiKey

Aggregate Product Name

https://api.weather.com/v2/indices/uv/hourly/360hour?geocode=33.74,-84.39&language=en-US&format=json&apiKey=yourApiKey

v2idxUVhourly360

Request by Postal Code: Required Parameters: postalCode, countryCode, language, format

https://api.weather.com/v2/indices/uv/hourly/<duration>?postalCode=94608&countryCode=US&format=<json>&language=en-US&apiKey=yourApiKey

Aggregate Product Name
https://api.weather.com/v2/indices/uv/hourly/360hour?postalCode=94608&countryCode=US&format=json&language=en-US&apiKey=yourApiKey v2idxUVhourly360

Data Elements & Definitions

API Name Field Name Description Type Range Sample Nulls Allowed Usage
Repeating Elements: Unique to Current              
  obsTime Time observation is valid [epoch]   1369252800 N Display As Provided
  obsTimeLocal Time observation is valid ... . in local, but at top of next UTC hour [ISO]   2013-05-22T20:00:00-0400 N Display As Provided
Repeating Elements: Unique to Forecast              
  fcstValid Time forecast is valid ... start of the forecast period, always 7am local time. [epoch]   1369306800 N Display As Provided
  fcstValidLocal Time forecast is valid ... start of the forecast period, always 7am local time. [ISO]   2013-05-23T07:00:00-0400 N Display As Provided
Repeating Elements: Common Per Time Segment              
Unique to Hourly dow Forecast valid day of week [string]   Wednesday N Display As Provided
  num

Daypart Segment (12hour) - Sequential daypart number, where 1 = daytime of Day 0

Short-Range - Sequential hour number, where 1 = first available 15-minute timestep of forecast, usually <= 15 minutes from “now”

Long - Range - Sequential hour number, where 1 = first available hour of forecast, usually <= 1hr from “now”

[integer]   21 N Display As Provided
  dayInd Day / Night Indicator [string] D, N D N Display As Provided
Unique to Daypart daypartName Name of 12hr daypart, not including day names in first 48hrs [string]   Tomorrow N Display As Provided
Atomic Indices              
UV Index uvIndex

TWC-created UV index

Current

12 Hour - 12hr daypart maximum UV Index. N/A (null) at NIGHT

1 Hour - Short-Range & Long Range Hourly UV Index

15 Minute - Short-Range UV Index

Value of 0 used when nighttime. During daytime, value will be between 1-11

1-2=Low, 3-5=Moderate, 6-7=High, 8-10= Very High, 11=Extreme

[integer] 0-11 6 N Display As Provided
  uvWarning TWC-created UV warning based on UV index of XX or greater bool   1 N Display As Provided
  uvDesc

Descriptive text of UV Index

0-2=Low, 3-5=Moderate, 6-7=High, 8-10= Very High, 11=Extreme

[string]   Low N Display As Provided
  uvIndexRaw

12 Hour - 12hr daypart untruncated maximum UV Index. N/A (null) at NIGHT

1 Hour - Short-Range & Long Range Hourly Untruncated UV Index

15 Minute - Short-Range Untruncated UV Index

[float] 0-16 2.13 N Display As Provided

JSON Sample

JSON Sample - Current Conditions

{

"metadata": {},

"uvIndexCurrent": {

"obsTime": 1458921900,

"obsTimeLocal": "2016-03-25T12:05:00-0400",

"dow": "Friday",

"dayInd": "D",

"uvIndex": 4,

"uvDesc": "Moderate",

"uvWarning": 0

}

}

JSON Sample - 15 Minute

{

"metadata": {},

"uvIndex15minute": {

"fcstValid": [],

"fcstValidLocal": [],

"num": [],

"dayOfWeek": [],

"dayInd": [],

"uvIndex": [],

"uvDesc": [],

"uvWarning": [],

"uvIndexRaw": []

}

}

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

JSON Sample - Hourly

{

"metadata": {},

"uvIndex1hour": {

"fcstValid": [],

"fcstValidLocal": [],

"num": [],

"dow": [],

"dayInd": [],

"uvIndex": [],

"uvDesc": [],

"uvWarning": [],

"uvIndexRaw": []

}

}

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

JSON Sample - Daypart

{

"metadata": {},

"uvIndex12hour": {

"fcstValid": [],

"fcstValidLocal": [],

"dayInd": [],

"num": [],

"daypartName": [],

"uvIndex": [],

"uvDesc": [],

"uvWarning": [],

"uvIndexRaw": []

}

}

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},

{//JSON payload},