Weather Maps API

URL

https://api.rainviewer.com/public/weather-maps.json

Purpose and Description

Contains the past 2 hours of weather radar data with 10-minute intervals. Suitable to display in applications, on websites, or in any other mapping software.

API File Example

Here is an example of the weather maps API file. The data inside the example is out of date and cannot be used in real queries. To get actual data, please open the API file directly.

{
  "version": "2.0",
  "generated": 1609402525,
  "host": "https://tilecache.rainviewer.com",
  "radar": {
    "past": [
      {
        "time": 1609401600,
        "path": "/v2/radar/1609401600"
      },
      {
        "time": 1609402200,
        "path": "/v2/radar/1609402200"
      }
    ]
  }
}

Root Object

keyDescriptionExample
versionAPI Version.
Values: String(8)
“2.0.1”
generatedUnix timestamp date (UTC) when this API file was generated. Useful for checking for updates.
Values: Int(8)
1609402525
hostHost and protocol for the images.
Values: String(255)
https://tilecache.rainviewer.com
radarWeather radar maps.
Values: Radar object
 

Radar Object

keyDescriptionExample
pastPast weather radar frames. 2 hours, with 10-minute steps.
Values: Array(Frame Object)
 

Frame Object

keyDescriptionExample
timeMap frame generation date in UNIX timestamp format (UTC). The map frame typically contains the images (radar) from different times, so this is not the time of the data rather than frame generation time.
Values: Int(8)
1609401600
pathBase path for the images of that frame. For information on its usage, refer to the next How to use host and path information section of this page
Values: String(255)
/v2/radar/1609401600

How to use host and path information

You should use the host and path data from the API as a part of the URL. All available URLs and their parameters are described below.

Each url starts with {host}, where:

URLDescription
{path}/{size}/{z}/{x}/{y}/{color}/{options}.pngRadar data: displays one tile with the composite radar reflectivity data, with specified size, color scheme, and additional options.
{path}/{size}/{z}/{lat}/{lon}/{color}/{options}.pngRadar data: same as the link above, but with the center at specified coordinates (EPSG:4326) with desired zoom size. Great for widgets.

Parameters:

Weather Radar Coverage

Additionally, one more product is available: the weather radar coverage mask. This mask shows where weather radar coverage is available (transparent areas) and where it is not (black areas). We don’t update this mask often. The links are the same as for radar products, but without options and color scheme.

URLDescription
/v2/coverage/0/{size}/{z}/{x}/{y}/0/0_0.pngCoverage tile: where radar data is available (transparent areas) and where it is not (black areas).
/v2/coverage/0/{size}/{z}/{lat}/{lon}/0/0_0.pngCoverage data as above but for specified center coordinates (latitude, longitude).

Examples

Basic HTML + JS (Leaflet) example: github.com/rainviewer/rainviewer-api-example

Radar Tiles

DescriptionLink
Standard tile (x/y/z)[RADAR_PATH]/512/2/2/1/2/1_1.png
Coordinate tile (lat/lon)[RADAR_PATH]/256/2/35.71/-70.87/2/1_1.png

Coverage Tiles

For coverage requests, set color scheme and options to “0”. Coverage may be hard to see against white backgrounds due to transparency.

DescriptionLink
Standard tile/v2/coverage/0/512/2/2/1/0/0_0.png
Coordinate tile/v2/coverage/0/512/3/35.71/-70.87/0/0_0.png
Rain Viewer logo Rain Viewer

We just made Rain Viewer better! Try new features →