Універсальний API карт погоди

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

Purpose and Description

Contains the past (2 hours) and forecast (30 minutes) weather radar data and the past infrared satellite data (2 hours). Suitable to display in the applications, on the websites, or in any other mapping software. Also, it can be used as a source for the weather API.

Database File Example

Here is an example of the weather maps API file with two frames for each data section. The data inside the example outdated 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"
      }
    ],
    "nowcast": [
      {
        "time": 1609402800,
        "path": "/v2/radar/nowcast_6b3c5a659cf4"
      },
      {
        "time": 1609403400,
        "path": "/v2/radar/nowcast_dd3474d83b20"
      }
    ]
  },
  "satellite": {
    "infrared": [
      {
        "time": 1609401600,
        "path": "/v2/satellite/0680143a9470"
      },
      {
        "time": 1609402200,
        "path": "/v2/satellite/ba88bf38ac55"
      }
    ]
  }
}

Root Object

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

Radar Object

keyDescriptionValues_ example_
pastPast weather radar frames. 2 hours, with 10 minutes steps.Array(Frame Object) 
nowcastFuture weather radar frames. 30 minutes or 60 minutes for Gold+ and Platinum API Patrons.Array(Frame Object) 

Satellite Object

keyDescriptionValues_ example_
infraredPast 2 hours of the infrared satellite data (channel 13) from the available satellitesArray(Frame Object) 

Frame Object

keyDescriptionValues_ example_
timeMap frame generation data in UNIX timestamp format (UTC). Map frame typically contains the images (radar, satellite) from different times, so this is not the time of the data rather than frame generation timeInt(8)1609401600
pathBase path for the images of that frame. How to use it, you can find in the next How to use host and path information section of this pageString(255)/v2/satellite/0680143a9470

Підтримай нас!

Якщо вам подобається наш API і ви хочете підтримати його як можна довше, будь ласка, підтримайте нас на веб-сайті Patreon. Це також надасть вам більше можливостей, таких як доступ до бази даних метеорологічного метеорадарів, 60 хвилин прогнозу радарних даних, чи власної колірної схеми.

How to use host and path information

Like the legacy API, you should use 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: the same as link above, but with center at specified coordinate (EPSG:4326) with desired zoom size. Great for widgets
{path}/{big_size}/{color}/{options}.pngComposite image with radar reflectivity for a whole world. Slow generation, up to 10 seconds per image loads. Cannot be smoothed. IMPORTANT: color scheme and the snow mask for satellite data should always be “0”.
  • {path} - path from any of Frame Object of this API.
  • {x}, {y}, {z} – x, y and zoom level of tile you want to download. Read more about tiles
  • {lat}, {lon} - Latitude and longitude of specific coordinates accordingly. Decimal format. Must contain a dot in the number. Example: -32.7892, 108.67821.
  • {size} – image size, can be 256 or 512.
  • {big_size} – can be 2000, 4000, 8000, 16000 or 24000 (24000x12000 px or ~2km per pixel). For square images use 4096, 8196 and 16384 accordingly.
  • {color} - color scheme number from the provided list.
  • {options} – list of option separated by _ symbol. For example: ‘1_0’, which means smoothed (1) image without snow color scheme (0). Now two options are available: {smooth}_{snow}
    • {smooth} - blur (1) or not (0) radar data. Large composite images are always not smoothed due to performance issues.
    • {snow} - display (1) or not (0) snow in separate colors on the tiles.

Weather Radar Coverage

Additionally, there is the one more product available: weather radar coverage mask. This mask shows where is weather radar coverage available (transparent regions) and where is not (black retions). We don’t update this mask often. Links are pretty the same as for radar and satellite 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 is not (black areas)
/v2/coverage/0/{size}/{z}/{lat}/{lon}/0/0_0.pngCoverage data as above but for specified center coordinate (latitude, longitude)
/v2/coverage/0/{big_size}/0/0_0.pngComposite coverage tile for a whole world at once. Slow generation.

Examples

Look to the separate examples page.

Get RainViewer for Free
RainViewer RainViewer