{"result":{"uv":8.8844,"uv_time":"2022-10-12T18:18:18.886Z","uv_max":9.3573,"uv_max_time":"2022-10-12T17:35:56.449Z","ozone":285.7,"ozone_time":"2022-06-02T12:05:13.749Z","safe_exposure_time":{"st1":19,"st2":23,"st3":30,"st4":38,"st5":60,"st6":113},"sun_info":{"sun_times":{"solarNoon":"2022-10-12T17:35:56.449Z","nadir":"2022-10-12T05:35:56.449Z","sunrise":"2022-10-12T11:43:37.526Z","sunset":"2022-10-12T23:28:15.371Z","sunriseEnd":"2022-10-12T11:45:55.477Z","sunsetStart":"2022-10-12T23:25:57.421Z","dawn":"2022-10-12T11:21:23.292Z","dusk":"2022-10-12T23:50:29.605Z","nauticalDawn":"2022-10-12T10:55:39.424Z","nauticalDusk":"2022-10-13T00:16:13.473Z","nightEnd":"2022-10-12T10:29:59.183Z","night":"2022-10-13T00:41:53.714Z","goldenHourEnd":"2022-10-12T12:13:11.709Z","goldenHour":"2022-10-12T22:58:41.188Z"},"sun_position":{"azimuth":0.37898939830176526,"altitude":1.0469926114702273}}}}
curl --location --request GET 'https://zylalabs.com/api/553/uv+index+real-time+and+forecasted+api/388/uv+index+real-time?lat=20.64&lng=-87.08' --header 'Authorization: Bearer YOUR_API_KEY'
{"result":[{"uv":0,"uv_time":"2024-07-07T11:14:24.387Z","sun_position":{"azimuth":-1.9979482638770827,"altitude":-0.011426987157720857}},{"uv":0.3389,"uv_time":"2024-07-07T12:14:24.387Z","sun_position":{"azimuth":-1.9143489203019375,"altitude":0.21554058846390795}},{"uv":1.4717,"uv_time":"2024-07-07T13:14:24.387Z","sun_position":{"azimuth":-1.847156646774205,"altitude":0.4487659395121431}},{"uv":3.8922,"uv_time":"2024-07-07T14:14:24.387Z","sun_position":{"azimuth":-1.7927337294902674,"altitude":0.6860918389195284}},{"uv":7.126,"uv_time":"2024-07-07T15:14:24.387Z","sun_position":{"azimuth":-1.7508148681222828,"altitude":0.9260641118003088}},{"uv":10.0693,"uv_time":"2024-07-07T16:14:24.387Z","sun_position":{"azimuth":-1.729411106267307,"altitude":1.1675313850872888}},{"uv":12.2284,"uv_time":"2024-07-07T17:14:24.387Z","sun_position":{"azimuth":-1.7991156886324384,"altitude":1.4085887791687823}},{"uv":12.5479,"uv_time":"2024-07-07T18:14:24.387Z","sun_position":{"azimuth":1.9471350357388102,"altitude":1.4807635086698603}},{"uv":10.9988,"uv_time":"2024-07-07T19:14:24.387Z","sun_position":{"azimuth":1.7315090807711717,"altitude":1.2418719139896868}},{"uv":8.0845,"uv_time":"2024-07-07T20:14:24.387Z","sun_position":{"azimuth":1.7404888587860985,"altitude":1.0001755612304768}},{"uv":4.7539,"uv_time":"2024-07-07T21:14:24.387Z","sun_position":{"azimuth":1.7776620182484533,"altitude":0.7595745574491909}},{"uv":2.0429,"uv_time":"2024-07-07T22:14:24.387Z","sun_position":{"azimuth":1.8283635168432497,"altitude":0.52123133334524}},{"uv":0.5809,"uv_time":"2024-07-07T23:14:24.387Z","sun_position":{"azimuth":1.8913047202485869,"altitude":0.28646026704742183}},{"uv":0.0581,"uv_time":"2024-07-08T00:14:24.387Z","sun_position":{"azimuth":1.9692038258587232,"altitude":0.05714687985219228}}]}
curl --location --request GET 'https://zylalabs.com/api/553/uv+index+real-time+and+forecasted+api/389/uv+index+forecasted+hourly?lat=20.702179325130942&lng=-87.07169921875001' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the UV Index Real-Time and Forecasted API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
(Save 2 months with annual billing 🎉)
About the API:
The ultraviolet index, or UV index, is an international standard measurement of the strength of the sunburn-producing ultraviolet (UV) radiation at a particular place and time.
The UV index is designed as an open-ended linear scale, directly proportional to the intensity of UV radiation that causes human skin to sunburn
This API will provide you with the UV index for the locations of your preference.
Just pass the latitude and longitude of the location you want to know the UV index, and receive the current index, the maximum UV index and what it would be in UTC time, and sun info, such as rise, sunset, dawn, night, and sun position.
This API is ideal for those who need to create an app that will provide their users with information about the UV index of the place to where they will be traveling, and provide recommendations based on the user's skin type.
Create alarms for your users to remember them to put sunblock or sunscreens based on the current UV index and more.
Besides the number of API calls per month, there are no other limitations.
The "GET UV Index Real-Time" endpoint returns current UV index values, maximum UV index, ozone levels, and sun information (rise, set, dawn, dusk). The "GET UV Index Forecasted Hourly" endpoint provides hourly UV index forecasts along with sun position data for each hour.
Key fields include "uv" (current UV index), "uv_max" (maximum UV index), "ozone" (ozone levels), and "sun_info" (sunrise, sunset times). For hourly forecasts, fields include "uv" and "sun_position" (azimuth and altitude).
The response data is structured in JSON format. The real-time endpoint returns a single object with nested fields, while the forecasted endpoint returns an array of objects, each containing hourly UV index and sun position data.
The real-time endpoint provides current UV index, maximum UV index, ozone levels, and detailed sun information. The forecasted endpoint offers hourly UV index predictions and sun position data for future times.
Users can customize requests by specifying latitude and longitude parameters in the API call to retrieve UV index data for any desired location worldwide.
The API sources its UV index and sun information from meteorological data and satellite observations, ensuring accurate and reliable readings for various locations.
Typical use cases include developing weather apps that inform users about UV exposure, creating alerts for sun protection, and providing travel apps with UV index information for different destinations.
Users can analyze the UV index and sun information to advise on sun safety measures, schedule outdoor activities, and educate users about UV exposure risks based on the current and forecasted data.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund