OpenUV - Global Real-Time UV Index Forecast

FREE
By aershov
Updated 4 months ago
-/10
Popularity Score
-
Latency
-
Success Rate

OpenUV - Global Real-Time UV Index Forecast API Documentation

The OpenUV Global UV Index Forecast API in JSON format provides Ultraviolet Radiation index data in real time. With the API, developers can build wearable apps, bots, and smart home assistants, based on data provided by The Royal Netherlands Meteorological Institute (KNMI), The National Institute of Water and Atmospheric Research (NIWA) of New Zealand, Ozone data from OMI datasets, AURA Satellite, and NASA. It includes JSON responses and API Key.

View API Details
GETReal-time UV Index
GETHourly UV Index Forecast
GETReal-time UV Index

Get real-time UV Index by location. Optional altitude, ozone level and date and time could be provided.

Authorization:

To authorize your client add your API Key into "x-access-token" header for each request.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
x-access-tokenHEADER
REQUIREDOpenUV API Key
Required Parameters
latNUMBER
REQUIREDlatitude, from -90.00 to 90.00
lngNUMBER
REQUIREDlongitude, from -180.00 to 180.00
Code Snippet
unirest.get("https://aershov-openuv-global-real-time-uv-index-v1.p.rapidapi.com/api/v1/uv?lat=latitude%2C%20from%20-90.00%20to%2090.00&lng=longitude%2C%20from%20-180.00%20to%20180.00")
.header("X-RapidAPI-Host", "aershov-openuv-global-real-time-uv-index-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://aershov-openuv-global-real-time-uv-index-v1.p.rapidapi.com/api/v1/uv?lat={lat}&lng={lng}
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://aershov-openuv-global-real-time-uv-index-v1.p.rapidapi.com/api/v1/uv?lat=latitude%2C%20from%20-90.00%20to%2090.00&lng=longitude%2C%20from%20-180.00%20to%20180.00")
.header("X-RapidAPI-Host", "aershov-openuv-global-real-time-uv-index-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication