RainViewer

RainViewer

Weather

Weather radar data, worldwide. Tile server and single radar images. API is free. RainViewer gets radar data from different sites across the Internet for free therefore we share all this data for everyone for free as well. Use whatever you want. We do not guarantee the availability of radar data. We do not conclude contracts with owners of this data, that’s because owners can kindly ask us to remove their data from the RainViewer, change the format or stop sharing this data at all. We’re trying to keep radar data as much as possible, but sometimes they stop just serving the images. You can change any image received by this API without any restrictions (for example, apply your color scheme for the pictures).

Visit API

📚 Documentation & Examples

Everything you need to integrate with RainViewer

🚀 Quick Start Examples

RainViewer Javascript Examplejavascript
// RainViewer API Example
const response = await fetch('https://www.rainviewer.com/api.html', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

RainViewer Public API Documentation

RainViewer is a weather platform that provides real-time and historical radar data, forecasts, and alerts. They have a publicly accessible API that developers can integrate into their applications for weather-related information. In this article, we will explore RainViewer's Public API Documentation and provide examples in JavaScript.

API Access Key

Before using their API, you need to sign up for a free account on their website and generate your API key. You can do it here: https://www.rainviewer.com/data-api.html#account.

JavaScript Example

In this example, we will use the RainViewer API to retrieve data about precipitation.

  1. First, create an HTML file and include the following code snippet in the <head> section:
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

This code adds the jQuery library to your HTML file that will help to make API requests.

  1. Then, create a JavaScript file and include the following code snippet:
const apiKey = "<YOUR_API_KEY>";
const baseUrl = "https://api.rainviewer.com/public/weather-maps";

function getRadarData() {
  const requestUrl = `${baseUrl}/precipitation/nowcast?product=radar&apikey=${apiKey}`;
  $.get(requestUrl, function (data) {
    console.log(data);
  });
}

getRadarData();

In this code, we declare apiKey and baseUrl variables that will be used to construct the API request URL. Then, we define the getRadarData function that constructs the request URL for real-time precipitation data and makes an AJAX request using the $.get method. Finally, we call the getRadarData function.

  1. Now, open the HTML file in your browser and check the console for the output.

Conclusion

RainViewer Public API provides real-time and historical weather information that you can integrate into your applications easily. In this post, we explored how to retrieve real-time precipitation data using the JavaScript programming language. You can find more information about their API features and endpoints on their documentation page: https://www.rainviewer.com/api.html.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 28Jun 30Jul 2Jul 4Jul 6Jul 8Jul 10Jul 1304008001440Minutes
Online
Offline

Related APIs in Weather