API reference
Everything api.4shadow.io answers, with examples you can paste. Every request needs an API key; the free
one is ready as soon as you sign up.
Contents
Start here
- Get a key. Sign up and your free key is shown straight away. Copy it then: we show it once, and after that only its last 4 characters.
- Send it in the
api-keyheader with each request tohttps://api.4shadow.io. - Read the answer. Responses are JSON. Times are UTC in ISO 8601, and each response names its units in
units.
curl "https://api.4shadow.io/v2/forecast?lat=-8.556&lon=125.560&vars=t2m,precip,wind_speed&hours=24" \
-H "api-key: $FORESHADOW_API_KEY"That's the forecast for Dili, Timor-Leste: temperature, rain and wind for the next 24 hours. Change lat and lon for anywhere on Earth, or pass q=Paris, France instead.
Your key
Send the key in the api-key header. Where you can't set headers, such as map tiles in an image URL, a api-key query parameter works for GET requests, and an api-key field in the JSON
body for POST. Headers keep the key out of server logs and browser history.
Lock it to where you use it
In the console you can limit a key to domains, IP addresses or apps. Then a request has to match one of them, or it
gets 403 origin_not_allowed:
- Domains match a browser's
Origin(orReferer) header.*.example.commeans its subdomains only; a port, if you give one, must match. - IP addresses match the address your server calls from.
- Apps match an
X-4Shadow-Appheader your mobile or desktop app sends.
A key in a web page can be read by anyone who opens it, so lock browser keys to your domains. Rolling a key in the console gives it a new secret; the old one stops working straight away.
Errors and limits
Errors are JSON with an error field. The gateway answers these before your request reaches the forecast:
| Status | error | What it means |
|---|---|---|
| 403 | An API Key is required to make this request | No key, or not a key we know. |
| 403 | This API Key is not available for use | The key is paused, or its subscription has ended. |
| 403 | origin_not_allowed | The key is locked to origins and this request matches none of them. |
| 403 | plan_does_not_include_route | The key's plan doesn't include this endpoint. Each endpoint below lists its plans. |
| 403 | No route defined for this path | The path or method isn't an endpoint. Check it against this page. |
| 429 | quota_exceeded | The key has used its daily or monthly requests. resets_at says when they come back. |
Past the gateway, the forecast service answers 422 when a parameter is out of range and 400 or 404 when something doesn't exist (a variable, a run). Its message is in detail and names the
parameter.
Limits
Each plan has a daily and a monthly number of requests (see pricing); the monthly count follows
the key's billing cycle. Calls to the MCP server count only tool calls, and alert webhooks count against the plan's
alerts. Over a limit, requests get 429 until it resets. We never bill overage.
{
"error": "quota_exceeded",
"message": "Daily request limit reached for this key.",
"resets_at": "2026-11-15T00:00:00.000Z"
}Forecast
A forecast for any point or place on Earth, and the place search behind it.
Point Forecast
GET/v2/forecast
Plans Every plan
A forecast for any place or latitude/longitude on Earth from the newest complete NOAA GFS 0.25° run: current conditions, a time series out to 16 days, and daily summaries for the location's local calendar days.
Query parameters
| Parameter | Default | |
|---|---|---|
lat, lon | Decimal degrees. Or give q instead | |
q | A place name instead of lat/lon, e.g. Paris, France or Same, Timor-Leste (see v2 Place Search). The best match is used | |
vars | all | Comma-separated variable ids (see v2 Variables & Legends), e.g. t2m,precip,wind_speed |
hours | 384 | How far ahead, up to 384 |
start | now | now starts at the current hour; run starts at the model run's init time |
daily | true | Include local-day summaries |
tz | from coordinates | IANA time zone for daily summaries, e.g. Asia/Dili |
run | latest | Or a run id YYYYMMDDHH from v2 Model Runs |
How to read it
- With
q,location.placesays which place was used andlocation.alternativeslists other places with the same name. Withlat/lon,location.nearest_placenames the closest town or village (within 50 km). currentis interpolated to the present moment;timeseriesis columnar: one array per variable, aligned withtime.- Steps are hourly to +120 h, then 3-hourly to +384 h;
interval_hourstells you which. precip(mm/h) anddswrf(W/m²) are mean rates over the interval ending at each step. Daily sums (precip_sumin mm,dswrf_sumin MJ/m²) are computed for you.hours_coveredbelow 24 marks a partial first or last day.- Sea state (
wave_height,wave_period,wave_dir,swell_height,swell_period,swell_dir,wind_wave_height, dailywave_height_max) is for open sea andnullover land. On a coast the wave model treats as land, it comes from the nearest sea point within 50 km, given inlocation.sea_point; sheltered water there is usually calmer.swell_heightandwind_wave_heightare 0 when there is no swell or wind sea. - All times are UTC (ISO 8601). Values are interpolated from the four surrounding 0.25° grid cells;
model_elevation_mandland_fractiondescribe the model's view of that spot.
Example
GET https://api.4shadow.io/v2/forecast?lat=-8.556&lon=125.56&vars=t2m,precip,wind_speed&hours=48&api-key=<your api key>Or by place name:
GET https://api.4shadow.io/v2/forecast?q=Paris,%20France&hours=24&api-key=<your api key>You can also send the key as an api-key header instead of a query parameter.
const res = await fetch(
"https://api.4shadow.io/v2/forecast?lat=-8.556&lon=125.56&hours=48",
{ headers: { "api-key": process.env.FORESHADOW_API_KEY } },
);
const fc = await res.json();
console.log(fc.current.t2m, fc.daily.precip_sum[0]);Response
{
"model": "gfs",
"run": "2026111200",
"init_time": "2026-11-12T00:00Z",
"location": {
"lat": -8.556, "lon": 125.56,
"nearest_grid_point": { "lat": -8.5, "lon": 125.5 },
"model_elevation_m": 316.0,
"land_fraction": 0.22
},
"timezone": { "name": "Asia/Dili", "utc_offset_seconds": 32400 },
"units": { "t2m": "°C", "precip": "mm/h", "wind_speed": "m/s" },
"current": { "time": "2026-11-12T11:00Z", "t2m": 26.4, "precip": 0.0, "wind_speed": 3.1 },
"timeseries": {
"time": ["2026-11-12T11:00Z", "2026-11-12T12:00Z", "2026-11-12T13:00Z"],
"interval_hours": [1, 1, 1],
"t2m": [26.4, 26.4, 26.3],
"precip": [0.0, 0.0, 0.0],
"wind_speed": [3.1, 2.9, 2.6]
},
"daily": {
"date": ["2026-11-12", "2026-11-13"],
"hours_covered": [15.0, 24.0],
"t2m_max": [28.0, 28.1],
"t2m_min": [26.2, 25.0],
"precip_sum": [1.4, 0.0],
"wind_speed_max": [4.1, 4.4],
"gust_max": [4.9, 5.0],
"rh2m_mean": [73.0, 69.0],
"tcc_mean": [74.0, 48.0],
"dswrf_sum": [23.6, 28.4]
},
"daily_units": { "t2m_max": "°C", "t2m_min": "°C", "precip_sum": "mm", "wind_speed_max": "m/s",
"gust_max": "m/s", "rh2m_mean": "%", "tcc_mean": "%", "dswrf_sum": "MJ/m²" },
"source": {
"provider": "NOAA/NCEP Global Forecast System (GFS), 0.25°",
"license": "Public domain (U.S. Government work)"
}
}(Time series shortened. Daily summaries are always included unless daily=false.)
NOAA's AI Model
GET/v2/aigfs/{endpoint}
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15The Norris · $35
AIGFS is NOAA's operational AI weather model, built on Google DeepMind's GraphCast and run four times a day from NOAA's own analyses. It covers the whole globe on the same 0.25° grid as GFS, in 6-hour steps out to 16 days. Compare it with GFS, a physics model: where the two agree, the forecast is more certain.
Every model endpoint has an AIGFS twin under /v2/aigfs/, taking the same parameters and giving the same answer as its GFS counterpart:
| Endpoint | Like |
|---|---|
/v2/aigfs/forecast?lat&lon or ?q= | v2 Point Forecast |
/v2/aigfs/variables | v2 Variables & Legends |
/v2/aigfs/runs, /v2/aigfs/runs/{run} | v2 Model Runs, v2 Model Run Detail |
/v2/aigfs/fields/{run}/{time} | v2 Map Fields |
/v2/aigfs/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png | v2 Map Tiles |
Variables. Temperature and dew point at 2 m, wind at 10 m and 100 m, sea-level and surface pressure, and precipitation. Computed from them: humidity, wind speed and direction, wind power at 100 m, feels-like temperature, heat index, wet-bulb temperature, dryness (VPD) and fire weather. There is no cloud, radar, radiation, gusts, CAPE or sea state: ask GFS for those.
Steps. Values come every 6 hours (timeseries.interval_hours says so), so daily highs and lows come from four values a day and can miss the peak. Each AIGFS run is published some hours after the GFS run of the same time; /v2/health gives both models' newest run.
Example
GET https://api.4shadow.io/v2/aigfs/forecast?lat=-8.556&lon=125.56&hours=48&vars=t2m,precip&api-key=<your api key>Response
{
"model": "aigfs",
"run": "2026111600",
"init_time": "2026-11-16T00:00Z",
"location": { "lat": -8.556, "lon": 125.56, "nearest_place": { "...": "..." } },
"units": { "t2m": "°C", "precip": "mm/h" },
"current": { "time": "...", "t2m": 28.3, "precip": 0.04 },
"timeseries": {
"time": ["2026-11-16T06:00Z", "2026-11-16T12:00Z", "2026-11-16T18:00Z", "..."],
"interval_hours": [6, 6, 6, "..."],
"t2m": [28.3, 26.2, 25.3, "..."],
"precip": [0.04, 0.15, 0.02, "..."]
},
"daily": { "date": ["..."], "t2m_max": ["..."], "t2m_min": ["..."], "precip_sum": ["..."] }
}CAMS air quality 0.4° (NO2, CO, ozone, SO2, PM and the US AQI)
GET/v2/air/{endpoint}
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15: not includedThe Norris · $35
Air quality from the Copernicus Atmosphere Monitoring Service's global forecast (CAMS: ECMWF's model with atmospheric chemistry, about 40 km): nitrogen dioxide, carbon monoxide, ozone, sulphur dioxide, PM2.5 and PM10 near the ground in µg/m³, and the US EPA's Air Quality Index made from them (each pollutant averaged as the index wants it), hourly to 5 days, two runs a day (00 and 12 UTC, out about ten hours later). Stored on CAMS's own 0.4° grid: /v2/air/runs/{run} gives it.
Every endpoint of this model is under /v2/air/ and takes the same parameters, and gives the same shape of answer, as its GFS counterpart:
| Endpoint | Like |
|---|---|
/v2/air/forecast?lat&lon or ?q= | v2 Point Forecast |
/v2/air/variables | v2 Variables & Legends |
/v2/air/runs, /v2/air/runs/{run} | v2 Model Runs, v2 Model Run Detail |
/v2/air/fields/{run}/{time} | v2 Map Fields |
/v2/air/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png | v2 Map Tiles |
Variables. Air Quality Index (US), Nitrogen dioxide (NO2), Carbon monoxide (CO), Ozone (O3), Sulphur dioxide (SO2), PM2.5, PM10. Daily: the day's highest AQI, mean NO2, CO, PM2.5 and PM10, highest ozone.
Example
GET https://api.4shadow.io/v2/air/forecast?lat=-8.556&lon=125.56&api-key=<your api key>Copernicus Marine global ocean 1/12° (surface currents and tides)
GET/v2/ocean/{endpoint}
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15: not includedThe Norris · $35
Surface currents from Mercator Ocean's global ocean model (GLO12) for the Copernicus Marine Service, with tidal currents (FES2014) and the drift waves cause, and tide heights (FES2014): hourly to about 10 days, updated daily. Stored at 0.25°, each point the mean of the sea around it at 1/12°. Point forecasts also list the high and low waters.
Every endpoint of this model is under /v2/ocean/ and takes the same parameters, and gives the same shape of answer, as its GFS counterpart:
| Endpoint | Like |
|---|---|
/v2/ocean/forecast?lat&lon or ?q= | v2 Point Forecast |
/v2/ocean/variables | v2 Variables & Legends |
/v2/ocean/runs, /v2/ocean/runs/{run} | v2 Model Runs, v2 Model Run Detail |
/v2/ocean/fields/{run}/{time} | v2 Map Fields |
/v2/ocean/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png | v2 Map Tiles |
Variables. Current u-component, Current v-component, Current speed, Current direction, Tide height.
Example
GET https://api.4shadow.io/v2/ocean/forecast?lat=-8.556&lon=125.56&hours=48&api-key=<your api key>ECMWF AIFS 0.25° (AI)
GET/v2/aifs/{endpoint}
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15The Norris · $35
ECMWF's AI model (AIFS Single), trained on ECMWF's reanalysis and started from its analyses, run four times a day: 6-hourly steps to 15 days, so daily highs and lows come from four values a day and can miss the peak. No gusts, CAPE or sea state. ECMWF open data, CC BY 4.0.
Every endpoint of this model is under /v2/aifs/ and takes the same parameters, and gives the same shape of answer, as its GFS counterpart:
| Endpoint | Like |
|---|---|
/v2/aifs/forecast?lat&lon or ?q= | v2 Point Forecast |
/v2/aifs/variables | v2 Variables & Legends |
/v2/aifs/runs, /v2/aifs/runs/{run} | v2 Model Runs, v2 Model Run Detail |
/v2/aifs/fields/{run}/{time} | v2 Map Fields |
/v2/aifs/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png | v2 Map Tiles |
Variables. Air temperature (2 m), Dew point (2 m), Relative humidity (2 m), Wind u-component (10 m), Wind v-component (10 m), Wind speed (10 m), Wind direction (10 m), Wind u-component (100 m), Wind v-component (100 m), Wind speed (100 m), Wind direction (100 m), Wind power density (100 m), Mean sea-level pressure, Surface pressure, Precipitation, Total cloud cover, Low cloud cover, Middle cloud cover, High cloud cover, Solar radiation, Soil moisture (0-7 cm), Soil temperature (0-7 cm), Feels-like temperature, Heat index, Wet-bulb temperature, Vapour pressure deficit, Fire weather index (Fosberg).
Example
GET https://api.4shadow.io/v2/aifs/forecast?lat=-8.556&lon=125.56&hours=48&api-key=<your api key>ECMWF IFS 0.25°
GET/v2/ifs/{endpoint}
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15The Norris · $35
ECMWF's Integrated Forecasting System, the European physics model, from its 00 and 12 UTC runs: 3-hourly steps to 6 days, then 6-hourly to 15 days, with sea state from ECMWF's wave model. ECMWF open data, CC BY 4.0.
Every endpoint of this model is under /v2/ifs/ and takes the same parameters, and gives the same shape of answer, as its GFS counterpart:
| Endpoint | Like |
|---|---|
/v2/ifs/forecast?lat&lon or ?q= | v2 Point Forecast |
/v2/ifs/variables | v2 Variables & Legends |
/v2/ifs/runs, /v2/ifs/runs/{run} | v2 Model Runs, v2 Model Run Detail |
/v2/ifs/fields/{run}/{time} | v2 Map Fields |
/v2/ifs/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png | v2 Map Tiles |
Variables. Air temperature (2 m), Dew point (2 m), Relative humidity (2 m), Wind u-component (10 m), Wind v-component (10 m), Wind speed (10 m), Wind direction (10 m), Wind u-component (100 m), Wind v-component (100 m), Wind speed (100 m), Wind direction (100 m), Wind power density (100 m), Mean sea-level pressure, Surface pressure, Precipitation, Total cloud cover, Low cloud cover, Middle cloud cover, High cloud cover, Solar radiation, Soil moisture (0-7 cm), Soil temperature (0-7 cm), Wind gust, CAPE, Precipitable water, Significant wave height, Wave period, Wave direction, Feels-like temperature, Heat index, Wet-bulb temperature, Vapour pressure deficit, Fire weather index (Fosberg).
Example
GET https://api.4shadow.io/v2/ifs/forecast?lat=-8.556&lon=125.56&hours=48&api-key=<your api key>NOAA GEFS-Aerosols 0.25° (air quality)
GET/v2/aerosols/{endpoint}
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15: not includedThe Norris · $35
Air quality from NOAA's global aerosol model: particles near the ground (PM2.5, PM10) and haze from dust, sea salt, sulphate and smoke, every 3 hours to 5 days, four runs a day. Fires come from satellite fire detections.
Every endpoint of this model is under /v2/aerosols/ and takes the same parameters, and gives the same shape of answer, as its GFS counterpart:
| Endpoint | Like |
|---|---|
/v2/aerosols/forecast?lat&lon or ?q= | v2 Point Forecast |
/v2/aerosols/variables | v2 Variables & Legends |
/v2/aerosols/runs, /v2/aerosols/runs/{run} | v2 Model Runs, v2 Model Run Detail |
/v2/aerosols/fields/{run}/{time} | v2 Map Fields |
/v2/aerosols/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png | v2 Map Tiles |
Variables. PM2.5, PM10, Dust (PM10), Haze (aerosol optical depth), Dust haze, Organic matter haze, Black carbon haze, Smoke haze.
Example
GET https://api.4shadow.io/v2/aerosols/forecast?lat=-8.556&lon=125.56&hours=48&api-key=<your api key>NOAA GMGSI satellite imagery 0.1° (hourly global mosaic)
GET/v2/satellite/{endpoint}
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15: not includedThe Norris · $35
Satellite imagery, observed rather than forecast: NOAA's Global Mosaic of Geostationary Satellite Imagery (GMGSI), the pictures of GOES-East and -West, Meteosat and Himawari blended each hour, from 72.7° N to 72.7° S. Stored at 0.1°, out to where the satellites see the Earth too obliquely; the last 24 hours are kept, the newest about an hour old. Each hour is a run of one step: /v2/satellite/runs lists the hours, /v2/satellite/runs/{run} gives the grid, and a point forecast gives the newest image's values (an earlier hour with run=).
Every endpoint of this model is under /v2/satellite/ and takes the same parameters, and gives the same shape of answer, as its GFS counterpart:
| Endpoint | Like |
|---|---|
/v2/satellite/forecast?lat&lon or ?q= | v2 Point Forecast |
/v2/satellite/variables | v2 Variables & Legends |
/v2/satellite/runs, /v2/satellite/runs/{run} | v2 Model Runs, v2 Model Run Detail |
/v2/satellite/fields/{run}/{time} | v2 Map Fields |
/v2/satellite/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png | v2 Map Tiles |
Variables. Infrared (cloud-top temperature), Water vapour, Visible.
Example
GET https://api.4shadow.io/v2/satellite/forecast?lat=-8.556&lon=125.56&api-key=<your api key>Place Search
GET/v2/places
Plans Every plan
Find places by name, or the towns and villages nearest a point, anywhere in the world. Names match regardless of case, accents and punctuation (Díli = dili), in any language GeoNames records (Lisboa, Москва, 東京).
Query parameters
| Parameter | Default | |
|---|---|---|
q | A place name. Narrow it with the region or country after a comma: Paris, Texas, Same, Timor-Leste, London, Canada | |
lat, lon | Instead of q: the towns and villages nearest this point, closest first (within 50 km) | |
limit | 5 | Up to 20 |
How to read it
resultscome best match first: a place's own name, then alternate names (other languages, old names), then names that only start withq; within each, larger and more important places (capitals, countries) first.matchsays which kind of match it was.kindis a plain-language type: capital city, city, town, village, country, region, sea, island, port, airport and so on.area: truemarks places that cover an area (countries, regions, seas), where one point's forecast won't describe all of it.- To forecast a place directly, pass the same name as
qto v2 Point Forecast. - Place data: GeoNames, CC BY 4.0. Searches run on 4Shadow's own servers; queries aren't sent to third parties.
Example
GET https://api.4shadow.io/v2/places?q=Same,%20Timor-Leste&api-key=<your api key>
GET https://api.4shadow.io/v2/places?lat=-8.556&lon=125.56&limit=3&api-key=<your api key>const params = new URLSearchParams({ q: "Paris" });
const res = await fetch(`https://api.4shadow.io/v2/places?${params}`, {
headers: { "api-key": process.env.FORESHADOW_API_KEY },
});
const { results } = await res.json();
console.log(results[0].display_name, results[0].lat, results[0].lon);Response
{
"query": { "q": "Paris" },
"results": [
{
"display_name": "Paris, Île-de-France, France",
"name": "Paris", "region": "Île-de-France", "country": "France", "country_code": "FR",
"lat": 48.85341, "lon": 2.3488, "kind": "capital city", "area": false,
"population": 2138551, "elevation_m": 42, "timezone": "Europe/Paris",
"match": "exact", "geonames_id": 2988507, "feature_code": "PPLC"
},
{ "display_name": "Paris, Texas, United States", "...": "..." }
],
"attribution": "Place names: GeoNames (geonames.org), CC BY 4.0"
}With lat/lon, each result also has distance_km. A name with no match returns "results": [].
Maps
Model runs, variables with their colour scales, raw fields for WebGL, and PNG tiles.
Variables & Legends
GET/v2/gfs/variables
Plans Every plan
Lists every variable the v2 forecast and tiles provide: id, name, units, description, whether it is an instant value or an interval mean, whether it can be drawn as tiles, and the exact colour legend used for tiles. Also lists the daily summary fields.
Variables: t2m air temperature, d2m dew point, rh2m relative humidity, wind_speed, wind_dir, u10/v10 wind components, gust, mslp sea-level pressure, precip rain rate, tcc cloud cover, cape, pwat precipitable water, vis visibility, dswrf solar radiation, snod snow depth.
Sea state (open sea only, from NOAA's GFS-Wave model; marked "marine": true): wave_height significant wave height, wave_period, wave_dir, wind_wave_height, swell_height, swell_period, swell_dir. Directions are where the waves come from, clockwise from north.
Example
GET https://api.4shadow.io/v2/gfs/variables?api-key=<your api key>Response
{
"model": "gfs",
"variables": [
{
"id": "t2m",
"name": "Air temperature (2 m)",
"units": "°C",
"description": "Air temperature 2 m above ground.",
"semantics": "instant",
"tileable": true,
"legend": { "stops": [ { "value": -40, "color": "#f0e6ffff" }, { "value": 0, "color": "#4fb3e8ff" }, { "value": 40, "color": "#8e0f3fff" } ] }
}
],
"daily": [
{ "id": "precip_sum", "source": "precip", "aggregation": "sum", "units": "mm" }
]
}(Lists shortened.)
Model Runs
GET/v2/gfs/runs
Plans Every plan
The model runs currently available, newest first, with their time range. A new GFS run is published about every 6 hours, once NOAA has released all of it; the previous run stays available until it is replaced, so requests never see a half-loaded forecast.
Example
GET https://api.4shadow.io/v2/gfs/runs?api-key=<your api key>Response
{
"model": "gfs",
"latest": "2026111200",
"runs": [
{ "run": "2026111200", "init_time": "2026-11-12T00:00Z", "steps": 209,
"first_valid": "2026-11-12T00:00Z", "last_valid": "2026-11-28T00:00Z" }
]
}Model Run Detail
GET/v2/gfs/runs/{run}
Plans Every plan
Every forecast step of one run (latest or a run id): forecast hours, valid times and the variables stored. Use it to build a time slider for map tiles.
Example
GET https://api.4shadow.io/v2/gfs/runs/latest?api-key=<your api key>Response
{
"model": "gfs",
"run": "2026111200",
"init_time": "2026-11-12T00:00Z",
"forecast_hours": [0, 1, 2, "…", 120, 123, "…", 384],
"valid_times": ["2026-11-12T00:00Z", "2026-11-12T01:00Z", "…"],
"variables": ["cape", "d2m", "dswrf", "…"],
"source": { "provider": "NOAA/NCEP Global Forecast System (GFS), 0.25°", "license": "Public domain (U.S. Government work)" }
}Map Fields
GET/v2/gfs/fields/{run}/{time}
Plans The Uncommitted · free: not includedThe Benevolent · $5The Solo · $15The Norris · $35
The numbers behind the map tiles: one forecast step's values on the model grid, for drawing maps in the browser (WebGL colour layers, animated wind, isobars, values under the cursor) or for analysis. v2 Map Tiles are finished pictures; a field lets your map colour, animate and sample the data itself.
/v2/gfs/fields/{run}/{time}?vars=u10,v10
| Default | ||
|---|---|---|
run | latest, or a run id from v2 Model Runs. Pinned runs never change and are cached as immutable; latest is cached for 5 minutes | |
time | Forecast hour fNNN (e.g. f012) or valid time YYYYMMDDHH in UTC; one of the run's steps | |
vars | required | Up to 4 stored variables, comma-separated, e.g. u10,v10 (wind), t2m, precip, mslp. Computed ones such as wind_speed aren't fields: request what they are computed from |
stride | 1 | Take every Nth grid cell: 1 = 0.25°, 2 = 0.5°, 4 = 1° (up to 16) |
bbox | whole globe | west,south,east,north in degrees. west > east crosses the antimeridian |
Format. The body is 4SF1, a small binary that a browser reads with a DataView: the ASCII magic 4SF1, a little-endian uint32 header length, a JSON header (grid, units, scale and offset per variable), then one int16 array per variable, rows north to south. value = raw × scale + offset; -32768 means no data. The open-source JavaScript SDK @similie/4shadow decodes it for you (client.field()), and forecast/fields.py in the 4Shadow repository has a Python decoder.
Size. A global field at 0.25° is about 2 MB per variable; at 0.5° (stride=2) about 0.5 MB. Crop to the visible area with bbox when zoomed in.
Example
GET https://api.4shadow.io/v2/gfs/fields/latest/f006?vars=u10,v10&stride=2&api-key=<your api key>
GET https://api.4shadow.io/v2/gfs/fields/2026111300/2026111318?vars=t2m&bbox=100,-20,160,10&api-key=<your api key>import { ForeshadowClient } from "@similie/4shadow";
const fs = new ForeshadowClient({ apiKey: "<your api key>" });
const run = await fs.run();
const field = await fs.field({ vars: ["u10", "v10"], run: run.run, time: run.forecast_hours[6], stride: 2 });
field.wind(-8.556, 125.56); // { u, v, speed, direction }Response
application/octet-stream in the 4SF1 format above. The header looks like:
{
"format": "4SF1", "model": "gfs", "run": "2026111300", "init_time": "2026-11-13T00:00Z",
"valid_time": "2026-11-13T06:00Z", "forecast_hour": 6, "interval_hours": 1,
"grid": { "lat0": 90.0, "dlat": 0.5, "nlat": 361, "lon0": -180.0, "dlon": 0.5, "nlon": 720, "wraps": true },
"dtype": "int16", "byte_order": "little", "missing": -32768,
"variables": [
{ "id": "u10", "name": "Wind u-component (10 m)", "units": "m/s", "semantics": "instant", "scale": 0.01, "offset": 0.0 }
]
}400 for an unknown variable or too large a request, 404 if the run or time doesn't exist.
Map Tiles
GET/v2/gfs/tiles/{run}/{var}/{time}/{z}/{x}/{y}.png
Plans The Uncommitted · free: not includedThe Benevolent · $5The Solo · $15The Norris · $35
256×256 PNG map tiles in the standard XYZ ("slippy map") scheme, for any variable marked tileable in v2 Variables & Legends. Works with Leaflet, MapLibre, OpenLayers and Google Maps.
/v2/gfs/tiles/{run}/{variable}/{time}/{z}/{x}/{y}.png
| Segment | |
|---|---|
run | latest, or a run id from v2 Model Runs. Pinned-run URLs never change and are cached as immutable; latest is cached for 5 minutes. |
variable | e.g. t2m, precip, wind_speed, tcc, cape |
time | Forecast hour fNNN (e.g. f012) or valid time YYYYMMDDHH in UTC. Must be one of the run's steps (hourly to f120, then every 3 h). |
z/x/y | Zoom 0–12 |
Colour scales are fixed per variable, so tiles line up across zoom levels and forecast times, and the legend from v2 Variables & Legends is exact. Transparent pixels mean there is nothing to show (for example, no rain).
Example
// Leaflet: rain rate 6 hours into the newest run
L.tileLayer(
"https://api.4shadow.io/v2/gfs/tiles/latest/precip/f006/{z}/{x}/{y}.png?api-key=<your api key>",
{ opacity: 0.7, maxNativeZoom: 12 },
).addTo(map);For an animation, read the run's forecast_hours from v2 Model Run Detail and pin the run id so every frame comes from the same forecast.
Response
image/png, 256×256 RGBA. 404 if the run, variable or time does not exist.
Early warnings
Alerts on areas and thresholds, checked after every model run, delivered to your webhook.
List Alerts
GET/v2/alerts
Plans Every plan
Your alerts, newest first, and limit: how many your plan allows (-1 for no limit). The fields are those of v2 Early Warnings: Create an Alert, without the webhook secret. evaluation says which forecast run the alert was last checked against; pending is true while a change waits to be checked, and error holds the reason if the forecast service couldn't check it.
Send your API key in the api-key header.
Example
curl https://api.4shadow.io/v2/alerts -H "api-key: <your api key>"Response
{ "alerts": [ { "id": "5dea7999-…", "name": "Heavy rain over Díli", "active": true, "…": "…" } ], "limit": 10 }Create an Alert
POST/v2/alerts
Plans Every plan
Early warnings watch the forecast for you. An alert is an area and the conditions you care about: 50 mm of rain in 24 hours, gusts over 20 m/s, waves over 3 m on a quarter of the coast. Each new GFS run (four a day) is checked against it. When the conditions are forecast within lead_days, the alert has an event: when it starts and ends and how severe it gets. Events show on your 4Shadow map, are listed by v2 Early Warnings: Alerts and Events, and are sent to your webhook when they're forecast, when they change and when they're called off.
Send your API key in the api-key header. The alerts API doesn't take it in the URL or the body. How many alerts you can have depends on your plan.
| Field | Default | |
|---|---|---|
name | required | Up to 120 characters |
area | required | A GeoJSON geometry: Point, Polygon or MultiPolygon (longitude, latitude). Up to 20,000 grid cells of 0.25° |
radius_km | 0 | With a Point: check every grid cell within this distance (up to 500 km) |
conditions | required | 1 to 5 conditions {variable, operator, threshold}. operator is >, >=, < or <=. Variables are those of v2 Variables, in their units (t2m °C, gust m/s, wave_height m, …). Directions can't be thresholds |
accumulate_hours | In a condition on a rate such as precip (mm/h): compare the total over this many hours instead, e.g. {"variable": "precip", "operator": ">=", "threshold": 50, "accumulate_hours": 24} is 50 mm in 24 hours | |
match | all | all: every condition at once; any: one is enough |
area_mode | any | any: anywhere in the area; mean: the area's average; coverage: on at least coverage_percent of the area |
coverage_percent | 1 to 100, with area_mode: "coverage" | |
lead_days | 3 | How far ahead to look, up to 16 days |
min_duration_hours | 0 | Ignore events shorter than this |
webhook_url | An https URL to notify (optional) | |
metadata | {} | Your own keys and values (strings, numbers or booleans; up to 50 keys, 4 KB), sent back with every notification |
description | Up to 2,000 characters | |
active | true | false saves the alert paused |
The alert is checked against the latest run when you create it, so problems such as an unknown variable come back at once, and any events are there straight away.
Webhooks. Notifications are JSON POSTs that follow Standard Webhooks, signed with the alert's secret (whsec_…). The secret is returned once, when the alert is created; v2 Early Warnings: Preview, Test and Secrets makes a new one. To verify a notification, compute the HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body} with the base64-decoded part of the secret after whsec_. Compare it with the base64 after v1, in the webhook-signature header, and reject old timestamps. Any Standard Webhooks library does this for you. Answer with a 2xx within 10 seconds. Otherwise the notification is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. A retry has the same webhook-id, so you can drop duplicates.
type | When |
|---|---|
alert.event.created | A new event is forecast |
alert.event.updated | Its timing shifts by 3 hours or more, its peak changes by 10% or more, its coverage by 20 points, or it stops early; previous has the old start, end and peak |
alert.event.cancelled | It's no longer forecast (cancel_reason: "no_longer_forecast"), or you changed the alert's area or conditions ("alert_changed") |
alert.test | You asked for a test |
Each event has a revision that goes up with every change; a higher revision replaces a lower one.
Example
curl -X POST https://api.4shadow.io/v2/alerts \
-H "api-key: <your api key>" -H "content-type: application/json" \
-d '{
"name": "Heavy rain over Díli",
"area": {"type": "Point", "coordinates": [125.57, -8.56]},
"radius_km": 25,
"conditions": [{"variable": "precip", "operator": ">=", "threshold": 50, "accumulate_hours": 24}],
"lead_days": 5,
"webhook_url": "https://example.org/hooks/4shadow",
"metadata": {"station": "dili-01"}
}'A notification:
POST /hooks/4shadow
webhook-id: msg_0af4a816c3a0466b9ff454d3be4f8097
webhook-timestamp: 1794614687
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=
content-type: application/json
{
"type": "alert.event.created",
"timestamp": "2026-11-14T06:04:47Z",
"data": {
"alert": {"id": "5dea7999-…", "name": "Heavy rain over Díli", "metadata": {"station": "dili-01"}},
"event": {
"id": "0af4a816-…", "status": "upcoming",
"start": "2026-11-15T09:00:00Z", "end": "2026-11-16T03:00:00Z", "duration_hours": 18,
"peak": {"time": "2026-11-15T18:00:00Z", "variable": "precip", "value": 71.4, "units": "mm", "lat": -8.5, "lon": 125.5, "coverage_percent": 100},
"revision": 1, …
}
}
}Response
201 with the alert. webhook.secret is only in this response; afterwards there's a secret_hint.
{
"id": "5dea7999-239c-4ded-b948-94680946a966",
"name": "Heavy rain over Díli", "description": null, "model": "gfs",
"area": {"type": "Point", "coordinates": [125.57, -8.56]}, "radius_km": 25,
"conditions": [{"variable": "precip", "operator": ">=", "threshold": 50, "accumulate_hours": 24}],
"match": "all", "area_mode": "any", "coverage_percent": null, "lead_days": 5, "min_duration_hours": 0,
"webhook": {"url": "https://example.org/hooks/4shadow", "secret": "whsec_…", "secret_hint": "whsec_…m+kx"},
"metadata": {"station": "dili-01"}, "active": true,
"evaluation": {"run": "2026111400", "evaluated_at": "2026-11-14T06:04:47Z", "pending": false, "error": null},
"created_at": "2026-11-14T06:04:47Z", "updated_at": "2026-11-14T06:04:47Z"
}Errors are {"error": "...", "detail": ...}: 401 without a valid key, 403 when your plan has no alerts or you have as many as it allows, 422 for an invalid alert (detail lists the problems).
Alerts and Events
GET/v2/alerts/*
Plans Every plan
Read alerts, their events and their webhook deliveries. Send your API key in the api-key header.
| Path | |
|---|---|
/v2/alerts/{id} | One alert |
/v2/alerts/events | Events of all your alerts |
/v2/alerts/{id}/events | Events of one alert |
/v2/alerts/{id}/deliveries | The alert's webhook deliveries in the last 30 days: status, attempts, the response code and any error |
Events take these parameters:
| Default | ||
|---|---|---|
status | active | upcoming (not started), ongoing, active (upcoming or ongoing), ended, cancelled or all |
format | JSON | geojson: a FeatureCollection for a map, each feature the alert's area with the event in its properties |
limit | 100 | Up to 500 |
An event has a start, an end and a peak: the worst value, where and when it happens, and the share of the area affected. conditions has the peak of each condition. first_run and last_run are the forecast runs that first and last forecast it. revision counts its changes.
Example
curl "https://api.4shadow.io/v2/alerts/events?status=active" -H "api-key: <your api key>"
curl "https://api.4shadow.io/v2/alerts/events?format=geojson" -H "api-key: <your api key>"
curl https://api.4shadow.io/v2/alerts/5dea7999-239c-4ded-b948-94680946a966/deliveries -H "api-key: <your api key>"Response
{
"events": [{
"id": "0af4a816-c3a0-466b-9ff4-54d3be4f8097", "alert_id": "5dea7999-…", "alert_name": "Heavy rain over Díli",
"status": "upcoming", "start": "2026-11-15T09:00:00Z", "end": "2026-11-16T03:00:00Z", "duration_hours": 18,
"peak": {"time": "2026-11-15T18:00:00Z", "variable": "precip", "value": 71.4, "units": "mm", "lat": -8.5, "lon": 125.5, "coverage_percent": 100},
"max_coverage_percent": 100,
"conditions": [{"variable": "precip", "units": "mm", "peak": 71.4, "peak_time": "2026-11-15T18:00:00Z"}],
"first_run": "2026111400", "last_run": "2026111406", "revision": 2, "cancel_reason": null,
"created_at": "2026-11-14T06:04:47Z", "updated_at": "2026-11-14T12:03:10Z"
}]
}404 for an alert that isn't yours or doesn't exist.
Preview, Test and Secrets
POST/v2/alerts/*
Plans Every plan
Send your API key in the api-key header.
| Path | |
|---|---|
/v2/alerts/preview | What an alert would report now, without saving it: send the same body as v2 Early Warnings: Create an Alert (only the area and conditions are needed). The answer has the events, the area that was checked (cells, area_km2, bbox) and a timeline of the area's values at every forecast step, for drawing it before you save. Add run to check an earlier run |
/v2/alerts/{id}/test | Sends an alert.test notification to the alert's webhook now, and reports how your endpoint answered |
/v2/alerts/{id}/secret | Makes a new webhook secret, returned once in webhook.secret. The old secret stops working at once |
Example
curl -X POST https://api.4shadow.io/v2/alerts/preview \
-H "api-key: <your api key>" -H "content-type: application/json" \
-d '{"area": {"type": "Point", "coordinates": [125.57, -8.56]}, "conditions": [{"variable": "gust", "operator": ">", "threshold": 15}]}'
curl -X POST https://api.4shadow.io/v2/alerts/5dea7999-239c-4ded-b948-94680946a966/test -H "api-key: <your api key>"Response
/test:
{ "delivered": true, "duration_ms": 182,
"delivery": {"id": "…", "webhook_id": "msg_…", "type": "alert.test", "status": "delivered", "attempts": 1, "response_status": 200, "error": null, "…": "…"} }/secret returns the alert with its new webhook.secret. /preview returns run, window, area, conditions, events, warnings and timeline; a 422 explains a definition the forecast can't check, e.g. an unknown variable.
Update an Alert
PATCH/v2/alerts/*
Plans Every plan
PATCH /v2/alerts/{id} with any fields of v2 Early Warnings: Create an Alert; the others keep their values. Send your API key in the api-key header.
- Changing the area, conditions or other settings checks the alert again at once. Its old events are cancelled and your webhook is told (
alert.event.cancelled,cancel_reason: "alert_changed"), then the new ones follow. "active": falsepauses the alert: its events are cancelled quietly (cancel_reason: "alert_paused") and nothing is sent until you set"active": true."webhook_url": nullremoves the webhook. A new URL keeps the secret; adding a webhook to an alert that had none returns its new secret once, inwebhook.secret.- Changing only
name,descriptionormetadataleaves the events alone.
Example
curl -X PATCH https://api.4shadow.io/v2/alerts/5dea7999-239c-4ded-b948-94680946a966 \
-H "api-key: <your api key>" -H "content-type: application/json" \
-d '{"conditions": [{"variable": "precip", "operator": ">=", "threshold": 80, "accumulate_hours": 24}]}'Response
The updated alert, as in v2 Early Warnings: Create an Alert (without the secret). 404 for an alert that isn't yours, 422 for invalid fields.
Delete an Alert
DELETE/v2/alerts/*
Plans Every plan
DELETE /v2/alerts/{id} deletes the alert with its events and webhook log. Nothing is sent to the webhook. Send your API key in the api-key header.
Example
curl -X DELETE https://api.4shadow.io/v2/alerts/5dea7999-239c-4ded-b948-94680946a966 -H "api-key: <your api key>"Response
{ "deleted": "5dea7999-239c-4ded-b948-94680946a966" }AI assistants
An MCP server, so assistants such as Claude can read the forecast with your key.
MCP Server (stream probe)
GET/v2/mcp
Plans Every plan
Answers HTTP 405: the 4Shadow MCP server is stateless and has no server-to-client stream. MCP clients check for one after connecting; send all MCP messages with POST. See v2 MCP Server (AI assistants).
MCP Server (AI assistants)
POST/v2/mcp
Plans Every plan
A Model Context Protocol server, so AI assistants (Klavi Experts, Claude, ChatGPT, Copilot and other MCP clients) can look up forecasts for any point on Earth while they answer.
Connecting
| Setting | Value |
|---|---|
| URL | https://api.4shadow.io/v2/mcp |
| Transport | Streamable HTTP (stateless, JSON responses) |
| Authentication | Header api-key: <your api key> |
Tools (all read-only)
| Tool | What it returns |
|---|---|
get_forecast | Current conditions and a day-by-day table for up to 16 days: min/max temperature, rain total, wind, gusts, humidity, cloud cover and solar energy per local day; at sea and on coasts, waves and swell |
get_hourly_forecast | An hour-by-hour table for up to 384 hours, for the variables you choose |
find_place | Places matching a name (or nearest to coordinates), with region, country, kind of place and population |
list_variables | The variables get_hourly_forecast can show |
The forecast tools take a location: a place name (Paris, Same, Timor-Leste) or decimal latitude, longitude. Each answer says which place it used and names other places with the same name, so the assistant can check it has the right one. Times are local to the location. Data comes from the newest NOAA GFS 0.25° run, the same as v2 Point Forecast.
Usage: each tool call counts as one MCP request against your plan. Connecting, listing tools and other protocol messages are not counted.
Example
Klavi Experts: Admin → MCP connections → Add: URL https://api.4shadow.io/v2/mcp, transport Streamable HTTP, authentication Header, header name api-key, value: your API key.
Claude Code
claude mcp add --transport http 4shadow https://api.4shadow.io/v2/mcp --header "api-key: <your api key>"Raw request (the first message of a session)
curl -X POST https://api.4shadow.io/v2/mcp \
-H 'api-key: <your api key>' -H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'Response
JSON-RPC 2.0 responses. A tool result is Markdown text, for example:
## Forecast for Dili, Timor-Leste
"Dili" matched Dili (capital city, population 150,000) at -8.5586, 125.5736. ...
Time zone Asia/Dili (UTC+09:00). GFS run 2026-11-13 06:00 UTC (5 h old), forecast to 2026-11-29 06:00 UTC. ...
### Now (Fri 13 Nov 20:38 local)
temperature 27.5 °C; dew point 17.7 °C; humidity 57 %; wind 2.2 m/s from NE (54°); ...
### Daily (local days)
| Date | Min °C | Max °C | Rain mm | Wind max m/s | Gust max m/s | RH % | Cloud % | Solar MJ/m² |
|---|---|---|---|---|---|---|---|---|
| Fri 13 Nov (9 h) | 24.9 | 27.8 | 0.0 | 2.9 | 3.7 | 67 | 38 | 3.2 |
...Service
Whether the service is up and which run it serves.
Service Health
GET/v2/health
Plans Every plan
The newest run per model and its age in hours. stale is true when the newest run is more than 12 hours old. Returns HTTP 503 when no forecast is loaded.
Example
GET https://api.4shadow.io/v2/health?api-key=<your api key>Response
{ "status": "ok", "version": "2.0.0.dev0", "models": { "gfs": { "latest_run": "2026111200", "age_hours": 5.2, "stale": false } } }v1 (legacy)
The first API. It keeps working with the same keys; new work should use v2.
Current Point Forecast
GET/v1/point
Plans Every plan
Legacy (v1). Kept for existing integrations and now served by the v2 forecast engine. New integrations should use the v2 endpoints.
Retrieves the current forecast for any lat/lon pair. Returns the current hour or the next hour if we are at 30 minutes past the hour in UTC
Example
GET https://api.4shadow.io/v1/point?lat=<latitude>&lon=<longitude>&api-key=<your api key>
Response
[
{
"value": 0.1822,
"datetime": "2025-06-22T04:00:00+00:00",
"metadata": {
"parameterName": "u-component of wind",
"parameterUnits": "m s-1",
"shortName": "10u",
"typeOfLevel": "heightAboveGround",
"level": 10,
"minimum": -19.777808837890625,
"maximum": 28.422191162109375,
"dataDate": 20250621,
"dataTime": 1800,
"name": "10 metre U wind component",
"stepType": "instant",
"startStep": 10,
"endStep": 10,
"key": "10-metre-u-wind-component",
"forecastStart": 10,
"forecastEnd": 147
}
},
...
]Multi-Parameter Point Forecast
POST/v1/point
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15The Norris · $35
Retired. This endpoint now returns HTTP 410. Use v2 Point Forecast (GET /v2/forecast), which covers any location for up to 16 days.
Returns the point forecast based on the lat/lon pair for the start hour offset, for as single time or "start_hour_offset". You can use any parameter choice with layer details in the /parameters list. Note, if you have tight timeouts on your request, those parameters that are not already cached can exceed request timeouts. It is important not to attempt to request too many parameters in this request. We have a /forecast-stream endpoint that keeps alive a request for larger queries. Once the data is cached with a TTL of 1 hour, it will respond quickly on subsequent requests. Note, the "start_hour_offset" must be between -120 and 384, default 0.
Example
fetch("https://api.4shadow.io/v1/point", {
body: JSON.stringfy({
"lat": 45.41430358844782,
"lon": -122.74737747904265 ,
"api-key": "<Your API key>",
"model": "gfs",
"param_keys": [
{
"param_key": "total-cloud-cover",
"level": 0,
"typeOfLevel": "atmosphere",
"stepType": "avg"
},
{
"param_key": "2-metre-relative-humidity",
"typeOfLevel":"heightAboveGround",
"level": 2
},
{
"param_key": "2-metre-temperature",
"typeOfLevel":"heightAboveGround",
"level": 2
},
{"param_key": "wind-speed-gust"},
{
"param_key": "total-precipitation",
"level": 0,
"typeOfLevel": "surface",
"stepType": "accum"
}
]
})
})Response
[
{
"value": 68.78212840417892,
"metadata": {
"parameterName": "Relative humidity",
"parameterUnits": "%",
"shortName": "2r",
"typeOfLevel": "heightAboveGround",
"level": 2,
"minimum": 2.2,
"maximum": 100,
"dataDate": 20250616,
"dataTime": 0,
"forecastTime": 34,
"name": "2 metre relative humidity",
"stepType": "instant",
"startStep": 34,
"endStep": 34,
"key": "2-metre-relative-humidity"
}
},
{
"value": 280.8191768675805,
"metadata": {
"parameterName": "Temperature",
"parameterUnits": "K",
"shortName": "2t",
"typeOfLevel": "heightAboveGround",
"level": 2,
"minimum": 207.5363525390625,
"maximum": 322.33635253906255,
"dataDate": 20250616,
"dataTime": 0,
"forecastTime": 34,
"name": "2 metre temperature",
"stepType": "instant",
"startStep": 34,
"endStep": 34,
"key": "2-metre-temperature"
}
},
{
"value": 0,
"metadata": {
"parameterName": "Total cloud cover",
"parameterUnits": "%",
"shortName": "tcc",
"typeOfLevel": "atmosphere",
"level": 0,
"minimum": 0,
"maximum": 100,
"dataDate": 20250616,
"dataTime": 0,
"forecastTime": 34,
"name": "Total Cloud Cover",
"stepType": "avg",
"startStep": 30,
"endStep": 34,
"key": "total-cloud-cover"
}
},
{
"value": 1.234554436286739,
"metadata": {
"parameterName": "Wind speed (gust)",
"parameterUnits": "m s-1",
"shortName": "gust",
"typeOfLevel": "surface",
"level": 0,
"minimum": 0.000004577636718750001,
"maximum": 34.90000457763672,
"dataDate": 20250616,
"dataTime": 0,
"forecastTime": 34,
"name": "Wind speed (gust)",
"stepType": "instant",
"startStep": 34,
"endStep": 34,
"key": "wind-speed-gust"
}
},
{
"value": 0,
"metadata": {
"parameterName": "Total precipitation",
"parameterUnits": "kg m-2",
"shortName": "tp",
"typeOfLevel": "surface",
"level": 0,
"minimum": 0,
"maximum": 164.375,
"dataDate": 20250616,
"dataTime": 0,
"forecastTime": 34,
"name": "Total Precipitation",
"stepType": "accum",
"startStep": 30,
"endStep": 34,
"key": "total-precipitation"
}
}
]5 Day Forecast
GET/v1/forecast
Plans Every plan
Legacy (v1). Kept for existing integrations and now served by the v2 forecast engine. New integrations should use the v2 endpoints.
Returns a 5 day forecast in 3 hour increments from zero offset or current/next-hour time depending if we are at the 30 minute UTC minute offset. Requires the lat/lon pair in the query parameters
Example
GET https://api.4shadow.io/v1/forecast?lat=<latitude>&lon=<longitude>&api-key=<your api key>
Response
[
{
"values": [
{
"value": 0.1822,
"datetime": "2025-06-22T03:00:00+00:00",
"offset": 0,
"day": 22,
"hour": 3
},
...
],
"metadata": {
"parameterName": "u-component of wind",
"parameterUnits": "m s-1",
"shortName": "10u",
"typeOfLevel": "heightAboveGround",
"level": 10,
"minimum": -19.777808837890625,
"maximum": 28.422191162109375,
"dataDate": 20250621,
"dataTime": 1800,
"name": "10 metre U wind component",
"stepType": "instant",
"startStep": 10,
"endStep": 10,
"key": "10-metre-u-wind-component",
"forecastStart": 10,
"forecastEnd": 147
}
},
...
]Multi-Parameter Forecasts
POST/v1/forecast
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15The Norris · $35
Retired. This endpoint now returns HTTP 410. Use v2 Point Forecast (GET /v2/forecast), which covers any location for up to 16 days.
Returns the point forecast based on the lat/lon pair for the start hour offset, for a number of days with a step_offset. You can use any parameter choice with layer details in the /parameters list. Note, if you have tight timeouts on your request, those parameters that are not already cached can exceed request timeouts. It is important not to attempt to request too many parameters, data intervals in this request. We have a /forecast-stream endpoint that keeps alive a request for larger queries. Once the data is cached with a TTL of 1 hour, it will respond quickly on subsequent requests.
Example
fetch("https://api.4shadow.io/v1/forecast", {body: JSON.stringfy(
{
"model": "gfs",
"param_keys": [
{
"param_key": "total-cloud-cover",
"level": 0,
"typeOfLevel": "atmosphere",
"stepType": "avg"
},
{
"param_key": "2-metre-relative-humidity",
"typeOfLevel":"heightAboveGround",
"level": 2
},
{
"param_key": "2-metre-temperature",
"typeOfLevel":"heightAboveGround",
"level": 2
},
{"param_key": "wind-speed-gust"},
{
"param_key": "total-precipitation",
"level": 0,
"typeOfLevel": "surface",
"stepType": "accum"
}],
"lat": 45.41430358844782,
"lon": -122.74737747904265,
"start_hour_offset": 2,
"total_days": 5,
"step_hours": 6
}
)});Response
[
{
"values": [
{
"datetime": "2025-03-15T06:00:00+00:00",
"value": 99.99999999999999,
"offset": 0,
"day": 21,
"hour": 7
},
...
],
"metadata": {
"parameterName": "Total cloud cover",
"parameterUnits": "%",
"shortName": "tcc",
"typeOfLevel": "atmosphere",
"level": 0,
"minimum": 0,
"maximum": 100,
"dataDate": 20250315,
"dataTime": 0,
"forecastTime": 24,
"name": "Total Cloud Cover",
"stepType": "avg",
"key": "total-cloud-cover"
}
},
...
]Stream Multi-Point Forecast
POST/v1/forecast-stream
Plans The Uncommitted · free: not includedThe Benevolent · $5: not includedThe Solo · $15The Norris · $35
Retired. This endpoint now returns HTTP 410. Use v2 Point Forecast (GET /v2/forecast), which covers any location for up to 16 days.
Returns the point forecast based on the lat/lon pair for the start hour offset, for a number of days with a step_offset. You can use any parameter choice with layer details in the /parameters list. Note, if you have tight timeouts on your request, those parameters that are not already cached can exceed request timeouts. It is important not to attempt to request too many parameters, data intervals in this request. This endpoint is similar to POST /forecast (or Multi-Parameter Forecasts), with the exception that it will keep a request alive during interpolation to instantiate caching for subsequent requests. Once the data is cached with a TTL of 1 hour, it will respond quickly on subsequent requests.
Example
fetch("https://api.4shadow.io/v1/forecast-stream", {body: JSON.stringfy(
{
"model": "gfs",
"param_keys": [
{
"param_key": "total-cloud-cover",
"level": 0,
"typeOfLevel": "atmosphere",
"stepType": "avg"
},
{
"param_key": "2-metre-relative-humidity",
"typeOfLevel":"heightAboveGround",
"level": 2
},
{
"param_key": "2-metre-temperature",
"typeOfLevel":"heightAboveGround",
"level": 2
},
{"param_key": "wind-speed-gust"},
{
"param_key": "total-precipitation",
"level": 0,
"typeOfLevel": "surface",
"stepType": "accum"
}],
"lat": 45.41430358844782,
"lon": -122.74737747904265,
"start_hour_offset": 2,
"total_days": 5,
"step_hours": 6
}
)});Response
[
{
"values": [
{
"datetime": "2025-03-15T06:00:00+00:00",
"value": 99.99999999999999,
"offset": 0,
"day": 21,
"hour": 7
},
...
],
"units": "%",
"metadata": {
"parameterName": "Total cloud cover",
"parameterUnits": "%",
"shortName": "tcc",
"typeOfLevel": "atmosphere",
"level": 0,
"minimum": 0,
"maximum": 100,
"dataDate": 20250315,
"dataTime": 0,
"forecastTime": 24,
"name": "Total Cloud Cover",
"stepType": "avg",
"key": "total-cloud-cover"
}
},
...
]Parameters
GET/v1/parameters
Plans Every plan
Legacy (v1). Kept for existing integrations and now served by the v2 forecast engine. New integrations should use the v2 endpoints.
The parameters endpoint return metadata about all supported models and their parameters (init offsets, levels, colors, etc.). it can be used in your applications to provide programtic descriptions for the available services.
Example
GET "https://api.4shadow.io/v1/parameters?api-key=<your API key>"
Response
{
"models": [
{
"model": "gfs",
"params": [ ... ],
},
{
"model": "gfswave",
"params": [ ... ],
}]
}Tile Mapping
GET/v1/tiles/{model}/{parameter}/{hour}/{z}/{x}/{y}.png
Plans The Uncommitted · free: not includedThe Benevolent · $5The Solo · $15The Norris · $35
Legacy (v1). Kept for existing integrations and now served by the v2 forecast engine. New integrations should use the v2 endpoints.
While all native parameters can be mapped, we have a set of pre-cached surface-level maps available for rapid rending with offset values between 0-6. This means from time now (or next hour at the 30 minute mark) to six hours from time zero, you can take advantage of rapid mapping for your application layer. All other parameters will need to be interpolated before rendering, so expect a delay when instantiating a request for less-used layers and offsets. Once cached, the interpolated values have a TTL of 1 hour.
Example
Route Breakdown
/tiles/<model>/<param-key>/<hour-offset>/{z}/{x}/{y}.png # png is the only option currently supportedQuery Params
- "api-key" -- your api key (required if not in headers)
- "typeOfLevel" -- the level type (optional)
- "stepType" -- step type (optional)
- "level" -- the level above ground (optional)
GET "https://api.4shadow.io/v1/tiles/gfs/total-precipitation/0/{z}/{x}/{y}.png?stepType=accum&typeOfLevel=surface&level=0&api-key=<your API key>"Response
Responses:
- 200 OK: PNG image binary via StreamingResponse @ 256x256.
- 404 Not Found: if model unknown, tile coords invalid, or no data.
Variables
What you can ask for in vars, live from the service. Rates marked mean are averages over the
interval ending at each step; the rest are values at that moment. The colour scale is the one map tiles and fields use.
Surface
| Id | Name | Units | Notes | Colour scale |
|---|---|---|---|---|
t2m | Air temperature (2 m) | °C | Air temperature 2 m above the ground, where people feel it: the temperature in a weather report. | |
d2m | Dew point (2 m) | °C | The temperature at which the air would be saturated and dew would form. The closer it is to the air temperature, the more humid; above about 20 °C the air feels muggy. | |
rh2m | Relative humidity (2 m) | % | How much water vapour the air holds, as a share of the most it could hold at its temperature. Near 100% fog, dew or rain is likely. | |
q2m | Specific humidity (2 m) | g/kg | Mass of water vapour per mass of air, 2 m above ground. | |
mslp | Mean sea-level pressure | hPa | Air pressure, adjusted to sea level so places at different heights compare. Low pressure (below about 1000 hPa) brings cloud, rain and wind; high pressure brings settled weather. | |
sp | Surface pressure | hPa | Air pressure at the model surface (not reduced to sea level). | |
vis | Visibility | m | How far one can see near the ground. Under 1000 m is fog; under 5000 m mist or haze. |
Wind
| Id | Name | Units | Notes | Colour scale |
|---|---|---|---|---|
wind_speed | Wind speed (10 m) | m/s | Mean wind speed 10 m above the ground, the standard height for wind reports. About 10 m/s is a fresh breeze, 17 m/s a gale and 33 m/s hurricane force. | |
wind_dir | Wind direction (10 m) | ° | Direction the 10 m wind blows from, clockwise from north. | |
gust | Wind gust | m/s | The strongest few-second burst of wind expected near the ground: what breaks branches and lifts roofs. Often half as strong again as the mean wind, or more. | |
u10 | Wind u-component (10 m) | m/s | Eastward wind 10 m above ground. | |
v10 | Wind v-component (10 m) | m/s | Northward wind 10 m above ground. | |
wind_speed_100m | Wind speed (100 m) | m/s | Wind speed 100 m above ground, about the hub height of a large wind turbine. | |
wind_dir_100m | Wind direction (100 m) | ° | Direction the 100 m wind blows from, clockwise from north. | |
u100 | Wind u-component (100 m) | m/s | Eastward wind 100 m above ground. | |
v100 | Wind v-component (100 m) | m/s | Northward wind 100 m above ground. | |
wind_power_100m | Wind power density (100 m) | W/m² | Power in the wind crossing each square metre at 100 m (½ρv³). A turbine can capture at most 59% of it (the Betz limit). |
Rain, cloud and sun
| Id | Name | Units | Notes | Colour scale |
|---|---|---|---|---|
precip | Precipitation | mm/hmean | Rain, snow and other precipitation as a rate, averaged over the forecast step ending at this time. Under 0.5 mm/h is light, 0.5-4 mm/h moderate and over 4 mm/h heavy. | |
refc | Radar reflectivity (simulated) | dBZ | The strongest echo weather radar would see in the column, from the model's rain, snow and hail: about 20 dBZ is light rain, 40 heavy rain and 50 or more a strong thunderstorm. -20 where there is none. | |
frozen_precip | Frozen precipitation | % | Share of the precipitation falling as snow, sleet or ice; empty where none is falling. | |
freezing_rain | Freezing rain | 0/1 | 1 where the model expects freezing rain (rain that freezes on the ground, roads and power lines), else 0. | |
freezing_level | Freezing level | m | Height above sea level of the lowest level where the air is at 0 °C. Falling snow usually turns to rain within a few hundred metres below it. | |
tcc | Total cloud cover | % | Share of the sky covered by cloud at any height, as seen from the ground. | |
lcc | Low cloud cover | % | Cloud cover in the model's low layer, roughly the lowest 3-4 km. | |
mcc | Middle cloud cover | % | Cloud cover in the model's middle layer, roughly 3-4 km to 8 km. | |
hcc | High cloud cover | % | Cloud cover in the model's high layer, roughly above 8 km. | |
cape | CAPE | J/kg | Energy available to rising air: the fuel for thunderstorms. Above about 1000 J/kg storms can be strong if something sets them off, above about 2500 J/kg severe; near zero the air is stable. | |
pwat | Precipitable water | mm | All the water vapour above a point, as the depth of water it would make if it all fell. Above about 50 mm, as in the tropics, very heavy rain is possible. | |
dswrf | Solar radiation | W/m²mean | Sunlight reaching the ground, direct and diffuse, averaged over the forecast step ending at this time: what solar panels and crops receive. About 1000 W/m² is full midday sun. | |
snod | Snow depth | m | Depth of snow lying on the ground. |
Heat, fire and comfort
| Id | Name | Units | Notes | Colour scale |
|---|---|---|---|---|
feels_like | Feels-like temperature | °C | How warm or cold it feels: the heat index from about 27 °C, the wind chill at 10 °C and below in a wind, otherwise the air temperature. | |
heat_index | Heat index | °C | How hot it feels in the shade when humidity slows cooling by sweat (US National Weather Service formula). Caution from 27 °C, extreme caution from 32 °C, danger from 39 °C, extreme danger from 52 °C. | |
wet_bulb | Wet-bulb temperature | °C | The temperature a wet surface cools to by evaporation: the limit of cooling by sweat. Around 31 °C is dangerous even at rest for many people; 35 °C is the theoretical limit of survival. Estimated from temperature and humidity (Stull 2011), to within about 1 °C. | |
vpd | Vapour pressure deficit | kPa | How far the air is from saturation: how hard it pulls water from plants, soil and dead fuels. Plants are stressed above about 1.5 kPa, and fire danger rises with it. | |
fire_weather | Fire weather index (Fosberg) | 0-100 | How much the weather alone favours wildfire spread, from temperature, humidity and wind (Fosberg index, 0 to 100). Higher is worse; values above about 50 are commonly treated as critical. It says nothing about fuels or about fires already burning. |
Soil
| Id | Name | Units | Notes | Colour scale |
|---|---|---|---|---|
soil_moisture | Soil moisture (0-10 cm) | m³/m³ | Water in the top 10 cm of soil as a fraction of its volume: about 0.05 is very dry and 0.4-0.5 saturated for most soils. Land only (empty on water and ice sheets). | |
soil_moisture_10_40 | Soil moisture (10-40 cm) | m³/m³ | Water in the soil 10 to 40 cm down, where most crop roots are, as a fraction of its volume. Land only (empty on water and ice sheets). | |
soil_temp | Soil temperature (0-10 cm) | °C | Temperature of the top 10 cm of soil; on ice sheets, of the ice. Land only. |
Ocean waves
| Id | Name | Units | Notes | Colour scale |
|---|---|---|---|---|
wave_height | Significant wave height | m | Significant height of wind waves and swell combined: about the mean height of the highest third of the waves. Individual waves can reach about twice this. Open sea only. | |
wave_period | Wave period | s | Time between the crests of the dominant waves. 12 s or more is powerful swell from far away; under 8 s choppy local wind waves. Open sea only. | |
wave_dir | Wave direction | ° | Direction the dominant waves come from, clockwise from north. Open sea only. | |
wind_wave_height | Wind-wave height | m | Significant height of the waves raised by the local wind (the wind sea); 0 when there is none. Open sea only. | |
swell_height | Swell height | m | Significant height of the main swell: waves raised by distant winds; 0 when there is none. Open sea only. | |
swell_period | Swell period | s | Period of the main swell; empty when there is no swell. Open sea only. | |
swell_dir | Swell direction | ° | Direction the main swell comes from, clockwise from north; empty when there is no swell. Open sea only. |
Run it yourself
The forecast service and the JavaScript SDK are open source. Host the service on your own hardware, or use ours with a key.
- 4Shadow-api Python · The forecast service: pulls and processes NOAA GFS and AIGFS four times a day, serves point forecasts, map tiles and fields.
- 4Shadow-js TypeScript · The JavaScript SDK and the live map: forecasts, places, WebGL weather layers, alerts and signed webhooks.