Map Tiles & Layers
Precip serves raster map tiles (256×256 Web Mercator / EPSG:3857) for precipitation, live radar, nowcast, temperature, wind, soil moisture, snow, and climate normals. Tiles work with Mapbox GL JS, MapLibre GL, Leaflet, OpenLayers, Google Maps, ArcGIS, and QGIS.
Tile URL template
Code
Coordinate order is {z}/{y}/{x} (row before column)
Precip tile URLs use {z}/{y}/{x} order (y before x), matching Esri / TMS-style row-column paths — not the {z}/{x}/{y} order used in many Mapbox or Leaflet defaults. Swapping x and y will place tiles in the wrong part of the map.
- Authentication: Pass
apiKey=YOUR_API_KEYin the query string (easiest for browser maps and GIS clients), or sendAuthorization: Bearer YOUR_API_KEYfrom a backend or tile proxy. For public web apps, proxy tile requests through your own backend so your API key stays private. - Default format: Tiles return
image/webpby default for smaller payloads. Pass?format=pngif your client requires PNG (note: sub-hourly radar/nowcast layersprecip-rate%2F2minandprecip-rate-v2%2F5minreturn WebP only). - Native zoom (
maxzoom): Most precipitation and nowcast layers have a native max zoom of 7 or 8. Configuremaxzoomon your map source so the client overzooms cleanly instead of requesting unnecessary higher-zoom tiles.
Quick examples
Mapbox GL JS / MapLibre GL
Code
Leaflet
Code
Time-enabled layer (specific hour or summed range)
Pass time in Unix milliseconds (not ISO 8601 strings) on /tile/:
Code
For ArcGIS Online, ArcGIS Pro, ArcGIS JS SDK, and QGIS instructions, see ArcGIS & GIS layer access.
Supported layer IDs (serviceName)
Rolling & forecast precipitation totals
Rolling layers always render the latest window and do not take a time parameter.
| Layer ID | Max zoom | Description |
|---|---|---|
last-12, last-24, last-48, last-168, last-720 | 7 | Total precipitation over the last 12h, 24h, 48h, 7 days, or 30 days |
next-12, next-24, next-48, next-168 | 7 | Forecast precipitation over the next 12h, 24h, 48h, or 7 days |
mtd, ytd | 7 | Month-to-date and year-to-date precipitation |
mtd-pct, ytd-pct | 7 | Month-to-date and year-to-date precipitation as % of normal |
recent-rain, precip-next-rain | 7 | Most recent rainfall event total / next forecast rain event |
last-24-snow, last-48-snow, last-168-snow, next-24-snow, next-48-snow | 7 | Rolling observed and forecast snowfall totals |
Live radar & sub-hourly nowcast
Because these IDs contain a slash (/), URL-encode / as %2F in {serviceName} when calling api.precip.ai. Both return WebP only (?format=png returns 501 Not Implemented).
Layer ID (serviceName) | Max zoom | Time-enabled? | Description |
|---|---|---|---|
precip-rate%2F2min | 8 | Yes (time in Unix ms) | Live 2-minute MRMS radar precipitation rate |
precip-rate-v2%2F5min | 7 | Yes (time in Unix ms) | 5-minute precipitation nowcast (next 90 min) |
Time-enabled hourly & daily weather layers
| Layer ID | Max zoom | Description |
|---|---|---|
precip-hourly (alias hourly) | 8 | Hourly precipitation |
precip-daily (alias daily) | 8 | Daily precipitation |
temperature-hourly | 8 | Hourly air temperature |
tmin-daily, tmax-daily | 8 | Daily minimum and maximum temperature |
wind-speed-hourly, wind-speed-gust-hourly, wind-direction-hourly | 8 | Hourly wind speed, gusts, and direction (note hyphens, not underscores) |
relative-humidity-hourly, cloud-cover-hourly, dswrf-hourly | 8 | Hourly relative humidity, cloud cover, and solar radiation |
soil-moisture-hourly, temp-0-10cm-hourly | 8 | Hourly 0–10 cm soil moisture and soil temperature |
snow-depth-daily | 8 | Daily snow depth |
dew-point-hourly, specific-humidity-hourly, pressure-hourly, visibility-hourly | 8 | Hourly atmospheric layers (requires explicit renderingRule) |
Static soil & frost normals
| Layer ID | Max zoom | Description |
|---|---|---|
frost-first-avg-doy, frost-last-avg-doy, frost-days-above-freezing | 8 | Average first/last frost day of year and frost-free days |
clay-mean-0-5-polaris, sand-mean-0-5-polaris, silt-mean-0-5-polaris | 9 | High-resolution POLARIS soil composition layers |
soil-texture-classification-polaris | 9 | POLARIS soil texture classification (requires explicit renderingRule) |
Tile query parameters
| Parameter | Description |
|---|---|
apiKey | API key in the query string (alternative to Authorization: Bearer) |
format | webp (default) or png (png, png24, png32). Sub-hourly nowcast layers support webp only. |
time | Unix timestamp in milliseconds: single step (1711411200000) or range (1711411200000,1711497600000). Up to 192 steps per tile. |
mosaicRule | Optional JSON aggregation over a time range, e.g. {"mosaicOperation":"MT_SUM"} (MT_SUM, MT_MEAN, MT_MIN, MT_MAX, MT_FIRST, MT_LAST). Defaults to sum for precipitation layers and mean for other variables. |
units | imperial or metric (converts values before applying custom renderingRule stops). |
unit | Explicit unit override (e.g. inches, mm, fahrenheit, celsius, mph, mps). |
mask | Region mask: na (North America) or none. |
renderingRule | Optional JSON Esri Colormap rule ({"rasterFunction":"Colormap","rasterFunctionArguments":{"colorMap":[[value,r,g,b,a],...]}}, where r, g, b, a are floats in 0..1) to override the default color ramp. Required on layers marked above without a default colormap. |
Legends & colormaps
Every layer exposes matching legend swatches and raw RGBA colormap stops:
-
Legend swatches & labels (defaults to imperial units):
CodeReturns
layers[].unitandlayers[].legend[]withlabeland base64 PNGimageDataswatches. -
Raw RGBA color stops (for custom map legends or shaders):
CodeReturns
{ "unit": "inches", "stops": [{ "value": 0.01, "r": 38, "g": 38, "b": 115, "a": 0 }, ...] }.
Both endpoints accept units=imperial|metric, unit=…, and renderingRule.
Point sampling (getSamples)
GET /api/v1/map/{serviceName}/ImageServer/getSamples accepts Esri esriGeometryMultipoint JSON (wkid: 4326) with time, start, or end parameters.
- Supported layers: time-series hourly/daily layers (
hourly,precip-hourly,temperature-hourly,wind-speed-hourly,daily, etc.),precip-rate%2F2min, and staticpolarissoil layers. - Not supported on rolling rollups:
last-12,last-24,last-48,last-168,next-*,mtd, andytdreturn404ongetSamples. For point queries on rolling totals or forecasts, use the standard REST endpoints (/api/v1/last-48,/api/v1/daily,/api/v1/hourly) instead.
Rate limits & caching
Every tile request counts as 1 API request against your plan's rate limit. A single web map viewport typically loads 12–25 tiles on initial render, and panning or zooming loads more:
- Personal (10 req/min, 100 req/day) is intended for quick testing, not interactive web maps.
- Growth (300 req/min) or Enterprise is recommended for live interactive maps.
- Always set
maxzoom/maxNativeZoomto match the layer's native max zoom (7or8), and respectCache-Controlresponse headers (historical finalized tiles and static layers return immutable cache headers; rolling layers cache for 1 hour). - Tip for Mapbox / MapLibre: Tiles are 256×256 px, so
tileSize: 256renders 1:1 native resolution. SettingtileSize: 512scales each tile 2× and cuts tile requests per viewport by roughly 4×.
See Rate limits & plans and the Map Services API Reference for full endpoint schemas.