API Docs


/api/location
/api/typicalweather
/api/countries
/api/metrics
/api/anomalies
/api/compare
/api/timeseries
/api/anom
/api/degreedays
/api/dailycomp
/api/events
/api/climatetrends
/api/climatecomps
/api/breaking
/api/recentextremes
/api/extremes
/api/besttime
/api/bestplace
/api/seasonal
/api/fcastevalbygroup
/api/fcastevalbylocation
/api/dailycountbyloc
/api/dailycountbyyear
/api/dailyweather
/api/dailyfcasteval
/api/climatetwins
/api/climatezones


Get Token

Use Weathersight inside Claude

Connect Claude to Weathersight and ask about climate normals, anomalies, extremes, and long-term trends in plain language.

Connector URL
  1. The URL above is copied to your clipboard.
  2. Claude opens on Settings → Connectors → Add custom connector.
  3. Paste the URL, click Add, then Connect and sign in.

Signing in creates your Weathersight API token if you don't already have one. API docs


Percentiles and Z-Scores

.ptile and .z in /dailyweather, /dailycountbyloc and /dailycountbyyear rank each day against the same location's history:

  • Baseline years: 1991–2020, never including the day's own year. Where a station is missing years, later years (2021, 2022, …) fill in until the baseline has 30 years. base_start and base_end give the years used.
  • Daily metrics (max_t, min_t, obs.temp, obs.dewp, obs.wind, obs.gust, max_wind, obs.rain, obs.snow): the day is ranked among all days within 3 days of the same date in those years, about 210 days.
  • Hourly metrics (obs.wbulb, obs.wbgt, obs.heatindex, obs.rainh): the day's worst hour is ranked among all hours of that week in those years, so a typical day's peak already ranks high. Use 99, or a z of 3, for rare days.
  • Percentiles run from 1 to 99. 99 means at or beyond the top of the baseline, not necessarily a record; 1 likewise at the bottom.
  • z is (value − baseline mean) / baseline standard deviation. Rain and snow have percentiles only.
  • Locations with fewer than 5 baseline years have no .ptile or .z.

Other APIs set their own baseline through their parameters, for example baseline_year_start/baseline_year_end in /dailycomp and baseline_period in /compare.


/location

Returns meta information for a location given a name, locid, or lat/lon.
When to use: Obtain the canonical locid needed by all location-specific API calls. Typically the first call in any workflow.
Performance: Fast — precomputed lookup.
Prerequisites: None — this is the entry point.
Investigate: Call first whenever the user names a city or region; cache the locid for all subsequent calls in the session. Use 'City, State Country' format (e.g. 'Austin TX USA').
Augment: Resolve city names from the article to locids early; reuse them throughout augmentation to avoid repeated name lookups.


Request

Parameter Desc Presence Default
token Token Required
name Common name of metro or metro area. for ex: New York, Beijing, Mumbai AirportOptional
locid Unique Location Identifier Optional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional

Response

Parameter Desc Presence Default
name Standard location name Yes
locid Unique Location IdentifierYes
friendly Friendly name for locationYes
lat Latitude Yes
long Longitude Yes
timezone Timezone Yes
country Unique Country Identifier No
icao ICAO code No
elevation Elevation(m) No
wmo WMO id No

/typicalweather

Returns statistical distributions of weather attributes (temperature, precipitation, wind, etc.) for a location and time period.
When to use: Establish the climatological baseline — what is 'normal' for this location and period. Use before discussing anomalies.
Date format: YYYY[MM[DD]]: YYYYMMDD for a specific week, YYYYMM for a month, YYYY for a seasonal or annual overview. Note: YYYYMMDD does not give info about daily obs. If a date is specified it corresponds to the week. Use /events for daily history.
Performance: Computed on demand; moderate speed. Avoid date spans wider than one year.
Prerequisites: Use /location to obtain a locid first.
Investigate: Good for grounding anomaly claims — e.g. 'Is 35°C in July unusual for Madrid?' Check distributions before asserting extremeness.
Augment: Use to provide climatological context before describing observed anomalies in an article.


Request

Parameter Desc Presence Default
token Token Required
ymd_start Start of period (YYYY[MMDD]) Required
ymd_end End of period (YYYY[MMDD]) Required
name Common name of metro or metro area. for ex: New York, Beijing, Mumbai AirportOptional
locid Unique Location Identifier Optional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
hour_start Hour Start (00 to 24) Optional 24
hour_end Hour End (00 to 24) Optional 24
lookback Years looked back[1] (1 to 40) Optional 30

Response

Parameter Desc Presence Default
duration Duration in days Yes
observationsDistribution of various daily observations: Mapping of metric-name: Dist Yes
conditions Distribution of various weather conditions Mapping of metric-name: Dist Yes
probs Same as conditions expressed as number of occurences in a 100 day period. Mapping of metric-name: Dist Yes
pcps Distribution of sum of precipiation. Mapping of metric-name: Dist Yes
means Distribution of means across periods. Mapping of metric-name: Dist Yes
>> Dist: N: int , X: int , mean: float , stddev: float , min: float , max: float , p1: float , p5: float , p10: float , p25: float , p50: float , p75: float , p90: float , p95: float , p99: float , max_key: str , min_key: strYes

/countries

Returns countries with their canonical country IDs used in all other API calls.
When to use: Resolve country names to canonical IDs, or obtain the full list of supported countries. This list rarely changes.
Performance: Fast — static data; safe to cache across calls.
Prerequisites: None.
Investigate: Call once if country-level filtering is needed; cache the result for the session.
Augment: Fetch country IDs before making country-filtered calls to /anomalies or /breaking.


Request

Parameter Desc Presence Default
token Token Required
ctryid Country IdOptional

Response

Parameter Desc Presence Default
countries Applicable countries found. List[country]Yes
country.ctryid Country Id Yes
country.name Country Name Yes
country.regionsList of region ids Yes

/metrics

Returns the catalogue of all supported weather metric identifiers with units and categories.
When to use: Resolve metric IDs to human-friendly names, units, and categories. Call once and cache per session.
Performance: Fast — static data; safe to cache for the lifetime of a session.
Prerequisites: None.
Investigate: Call once at session start; use metric.id as a lookup key throughout the conversation.
Augment: Translate metric IDs into readable labels for article text and chart axes.


Request

Parameter Desc Presence Default
token Token Required

Response

Parameter Desc Presence Default
metrics Supported metrics List[metric] Yes
metric.id Metric Id Yes
metric.nameMetric Friendly Name Yes
metric.cat Metric category [temp | dew| precip| storm| wind| air] Yes
metric.typeOne of Count | Sum | Dist
Count.{count, N, X} , Sum.{sum, N, X}. See Dist above.
Yes
metric.distIf '1' available as distribution Dist in some contexts. ex. A distrib of obs.is_rain.count returned by /typicalweather.
If '0', the metric is the mean,min,max,median of a metric appearing in an outlier or anomaly.
Yes

/anomalies

Returns precomputed anomalous observations for locations in a given time period and scope.
When to use: Survey anomalous weather at regional or global scale quickly without specifying individual cities.
Date format: YYYY[MM[DD]]: YYYY for annual anomalies (scope=year), YYYYMM for monthly (scope=month), YYYYMMDD for weekly or daily (scope=week/day).
Performance: Fast — retrieves precomputed data.
Prerequisites: None; global or country-filtered. Use /countries for country IDs.
Investigate: Good early call to identify which locations experienced anomalies before drilling into specifics with /anom or /dailycomp.
Augment: Use for a first-pass global scan to identify story-worthy anomalies before fetching per-location detail.


Request

Parameter Desc Presence Default
token Token Required
ymd Time Period YYYY[MMDD] Required
anomaly_typeAnomaly Type [HIGH | LOW] Optional
scope Scope Type [week | month | year] Optional
period_type Period Type [MONTH | WEEK | YEAR | DAY | FULL_DAY | FUTURE_DAY] Optional DAY
name Common name of metro or metro area. for ex: New York, Beijing, Mumbai AirportOptional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
z Minimum avg std-devs departure from mean Optional 0
ctryid Country IDs (comma sep) returned by /api/countries Optional
metrics One of metrics returned by /api/metrics. Overrides 'CAT' Optional
category Metrics Category[Not Available] as defined by /api/metrics Optional

Response

Parameter Desc Presence Default
anomalies Results List[anomaly] Yes
anomaly.locid Unique Location Id Yes
anomaly.lat Latitude Yes
anomaly.long Longitude Yes
anomaly.obs_start Start of observation period YYYY[MMDD] Yes
anomaly.obs_end End of observeation period YYYY[MMDD] Yes
anomaly.obs_dur Number of observations seen N[h | d] ex 24h in a day or 30d in a month Yes
anomaly.base_start Start of baseline period YYYY[MMDD] Yes
anomaly.base_end End of baseline period YYYY[MMDD] Yes
anomaly.base_dur Number of obs seen in baseline period N[h | d] : ex 24h in a day or 30d in a monthYes
anomaly.obs_period Observation Period (in years) Yes
anomaly.base_periodBaseline Period (in years) Yes
anomaly.outliers List of metrics and their comparison data List[outlier] Yes
outlier.obs_metric Name of metric as defined in /api/metric Yes
outlier.percentile Percentile of metric breached. ex: p1 (new p1), p99 (new p99) , max (new maximum) Yes
outlier.obs_N Number of valid observations for this metric Yes
outlier.obs_X Number of missing observations for this metric Yes
outlier.base_N Number of valid baseline observations Yes
outlier.base_X Number of missing baseline observations Yes
outlier.obs_val Observed value Yes
outlier.base_val Baseline value Yes
outlier.base_mean Mean of baseline Yes
outlier.base_stddevStd deviation of baseline Yes
outlier.min Min value of baseline Yes
outlier.max Max value of baseline Yes
outlier.max_key Max key of baseline Yes
outlier.min_key Min key of baseline Yes
outlier.obs_min_keyMin key of observation if min is set Yes
outlier.obs_max_keyMax key of observation if max is set Yes

/compare

Compares a location's observed weather period against the corresponding periods in a historical baseline distribution.
When to use: Quantify how extreme a specific period was across all metrics at once — e.g. how anomalous was March 2025 at New York vs the 1991–2020 baseline.
Date format: YYYY[MM[DD]]: YYYYMMDD for a specific day or short window (period_type DAY/WEEK), YYYYMM for a month (period_type MONTH), YYYY for an annual comparison (period_type YEAR).
Performance: Computed on demand; fast for short periods.
Prerequisites: Use /location to obtain a locid first.
Investigate: Best for 'how unusual was [period] at [location]?' — returns percentile and z-score across all metrics simultaneously. Set baseline_offset=1 for the standard 1991–2020 baseline.
Augment: Provides the precise statistical framing ('the hottest March in 30 years') before describing the anomaly in prose.

See Percentiles and Z-Scores for the baseline behind percentiles and z-scores.


Request

Parameter Desc Presence Default
token Token Required
ymd_start Start of period (YYYY[MMDD]) Required
ymd_end End of period (YYYY[MMDD]) Required
name Common name of metro or metro area. for ex: New York, Beijing, Mumbai AirportOptional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
period_type Period Type [ MONTH | YEAR | WEEK | DAY | FULL_DAY | FUTURE_DAY] Optional DAY
baseline_periodBaseline period in years Optional 30
baseline_offsetBaseline offset in years Optional 1
observed_periodObserved period Optional 1

Response

Parameter Desc Presence Default
comparisons Results List[comparison] Yes
comparison.locid Unique Location Id Yes
comparison.lat Latitude Yes
comparison.long Longitude Yes
comparison.obs_start Start of observation period YYYY[MMDD] Yes
comparison.obs_end End of observeation period YYYY[MMDD] Yes
comparison.obs_dur Number of observations seen N[h | d] ex 24h in a day or 30d in a month Yes
comparison.base_start Start of baseline period YYYY[MMDD] Yes
comparison.base_end End of baseline period YYYY[MMDD] Yes
comparison.base_dur Number of obs seen in baseline period N[h | d] : ex 24h in a day or 30d in a monthYes
comparison.obs_period Observation Period (in years) Yes
comparison.base_periodBaseline Period (in years) Yes
comparison.outliers List of metrics and their comparison data List[outlier] Yes
outlier.obs_metric Name of metric as defined in /api/metric Yes
outlier.percentile Percentile of metric breached. ex: p1 (new p1), p99 (new p99) , max (new maximum) Yes
outlier.obs_N Number of valid observations for this metric Yes
outlier.obs_X Number of missing observations for this metric Yes
outlier.base_N Number of valid baseline observations Yes
outlier.base_X Number of missing baseline observations Yes
outlier.obs_val Observed value Yes
outlier.base_val Baseline value Yes
outlier.base_mean Mean of baseline Yes
outlier.base_stddev Std deviation of baseline Yes
outlier.min Min value of baseline Yes
outlier.max Max value of baseline Yes
outlier.max_key Max key of baseline Yes
outlier.min_key Min key of baseline Yes
outlier.obs_min_key Min key of observation if min is set Yes
outlier.obs_max_key Max key of observation if max is set Yes

/timeseries

Returns aggregated metric values as a yearly or monthly timeseries for a location.
When to use: Detect long-term trends and compute statistical significance (r-squared, p-value). Best suited for multi-decade spans.
Date format: mm_dd_start/mm_dd_end as MMDD (day-of-year window, not a calendar year); year_start/year_end as YYYY. Note: Use mm_dd_start/mm_dd_end as MM when months are specified and MMDD when week-level granularity is needed. When day-level info is needed use /events or /dailycomp.
Performance: Computed on demand; slower for large date ranges or many metrics.
Prerequisites: Use /location to obtain a locid first.
Investigate: Use for trend analysis ('Is max temperature at location X increasing over decades?'). Combine with r-squared post-processing for significance.
Augment: Provides decadal trend context alongside current anomalies ('temperatures have risen 1.5°C over 40 years').


Request

Parameter Desc Presence Default
token Token Required
metrics Comma separated list of tuple describing aggregation function:metric_id.attribute
ex: sum:obs.is_rain.count, avg:max_t.p99
agg_func = {sum,avg,min,max}. See /api/metrics for metric and attribtutes
Required
name Common name of metro or metro area. for ex: New York, Beijing, Mumbai Airport Optional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
year_start Year start start YYYY Optional 1975
year_end Year end YYYY Optional 2025
month_day_startMonth day start MM[DD] Optional
month_day_end Month day start MM[DD] Optional
hour_start Hour Start (00 to 24) Optional 24
hour_end Hour End (00 to 24) Optional 24
groupby Aggregating key: Year | Month | Week | Hour Optional Year
src_type Data source type: Obs (station observations) | ERA5 (reanalysis gridded data) Optional Obs

Response

Parameter Desc Presence Default
locid Unique Location identifier Yes
lat Latitude of location Yes
lon Longitude of location Yes
xvals List of x-values Yes
yvals Dict of metric : list of y-valuesYes

/anom

Returns observations with 1991–2020 baseline comparisons at daily, weekly, or monthly granularity for a location and period.
When to use: Graph or tabulate recent anomalies at a location for a specific period — e.g. 'how did last month compare to normal?'
Date format: YYYYMMDD for ymd; use groupby (day/week/month) to control granularity. For 'last week' use YYYYMMDD of 7 days ago. For 'last month' use YYYYMM of prior month.
Performance: Computed on demand; moderate speed.
Prerequisites: Use /location to obtain a locid first.
Investigate: Use after /anomalies or /breaking. Identifies a city of interest; provides per-day/week detail for drill-down. Combine groupby=DAY/FULL_DAY with a recent date range for 'recent days with departure from normal' queries.
Augment: Provides the per-period anomaly series for prose ('temperatures were above normal for 12 of the past 14 days').


Request

Parameter Desc Presence Default
token Token Required
ymd_start Start of period (YYYY[MMDD]) Required
ymd_end End of period (YYYY[MMDD]) Required
name Common name of metro or metro area. for ex: New York, Beijing, Mumbai AirportOptional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
period_type Period Type [ MONTH | YEAR | WEEK | DAY | FULL_DAY | FUTURE_DAY] Optional FULL_DAY
observed_periodObserved period Optional 1

Response

Parameter Desc Presence Default
loc Location information Yes
ts List of datestamps (YYYYMMDD). Its length is equal to length of lists appearing in vals, N, vals_ts, baseline. Yes
vals Values (float) of the metrics corresponding to ts. It is dict with metric id (See /metrics) as the key and a list of corresponding values of the metric as the value. If a value is missing or unknown, null appears. Yes
N Number of data points available per metric, corresponding to ts. It is dict with metric id (See /metrics) as the key and a list of corresponding int as the value. Yes
vals_ts Timestamps at which max or min of metric was recorded, corresponding to ts. It is dict with metric id (See /metrics) as the key and a list of corresponding values of the metric as the value. If a value is missing or unknown, null appears. Yes
baseline Distributions of the metrics corresponding to baseline period, corresponding to ts. It is dict with metric id (See /metrics) as the key and a list of corresponding Dist objects (See Dist above) corresponding to the distributions of the metrics the value. If a value is missing or unknown, null appears.Yes

/degreedays

Returns cumulative degree-day indicators (heating/cooling/growing) for a location and period using ERA5 reanalysis data.
When to use: Estimate energy demand anomalies or agricultural stress in a recent or upcoming period.
Date format: YYYYMMDD for ymd_start and ymd_end. Maximum interval is 14 days per call.
Performance: Computed on demand using ERA5; moderate speed. Keep intervals to ≤14 days.
Prerequisites: Requires lat/lon directly — no locid needed.
Investigate: Use when the query involves power grid strain or energy demand. For forecast context, use future ymd dates.
Augment: Adds quantitative energy-demand context to heatwave or cold snap stories.


Request

Parameter Desc Presence Default
token Token Required
latlon Latitude,Longitude ex: 40.78,-73.97 Required
ymd_start Start of period (YYYYMMDD) Optional
ymd_end End of period (YYYYMMDD) Optional
is_forecastForecast requested? (0|1) Optional 1
indicators Comma separated list of indicator names. ['hdd'|'cdd'|'wbcdd'|'gdd]Optional hdd,cdd,wbcdd
base_temp_CBase temperature in °C for all indicators Optional 18.3
unit Degree days as measured in F|C Optional C

Response

Parameter Desc Presence Default
meta Meta information of location Yes
indicators Dict[str, List[List[(float, Dict['N': float, 'mean': float, 'std': float])]. The key is the indicator name. The value is a matrix with first row and col describing the start and end labels of the days and other cells are a pair of the indicator value and the baseline; described by its mean(mean), std deviation (std) and the number of years used for its computation (N). The cumulative value of period starting on day value[row][0] and ending on value[0][col] is found in value[row+1][col+1]. The maximum period length is 14 days.Yes

/dailycomp

Returns per-day observed values with percentiles and z-scores vs a sliding N-day window over a historical baseline.
When to use: Graph heatwaves, cold spells, and other streaks by showing daily departures from normal. Also compare two separate periods or locations using z-scores or percentiles for normalized severity.
Date format: YYYYMMDD for ymd_start and ymd_end. Keep ranges ≤30 days for fast response; up to 90 days is feasible.
Performance: Computed on demand; slower for long date ranges.
Prerequisites: Use /location to obtain a locid first.
Investigate: Best for detailed day-by-day anomaly investigation once approximate dates and location are known. Use separate calls for two periods to compare heatwave severity via z-score. Do NOT use for ranking top-N events across years — call /events with criteria for that and post-process the response.
Augment: Provides the daily series needed to describe the arc of a heatwave or cold snap in a news narrative.

See Percentiles and Z-Scores for the baseline behind percentiles and z-scores.


Request

Parameter Desc Presence Default
token Token Required
ymd_start Observation start date (YYYYMMDD), max 5-year spanRequired
ymd_end Observation end date (YYYYMMDD) Required
name Location name, e.g. New York Optional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
category Category: Temp | Prcp | Wind | Humidity Optional Temp
baseline_year_startBaseline year start YYYY Optional 1991
baseline_year_end Baseline year end YYYY Optional 2020
window Sliding window days (3-7) Optional 7

Response

Parameter Desc Presence Default
locid Unique Location Id Yes
lat Latitude Yes
lon Longitude Yes
dates Ordered list of observation date strings e.g. ['2025-06-01', '2025-06-02', ...] Yes
num_years Number of baseline years e.g. 30 for 1991-2020 Yes
avg_coverage Dict of metric_key -> average baseline coverage fraction across dates e.g. {'max_t': 0.94}. Values near 1.0 indicate dense baseline data. Yes
metrics Dict of metric_key -> per-day arrays dict[metric -> metric_data]. All arrays are parallel to 'dates' (one value per date). Yes
metrics.{key}.values Observed values (scaled to display units), None where missing e.g. [38.2, 37.5, None, ...] Yes
metrics.{key}.pcts Percentile of each observed value within the baseline window (0-100). e.g. 98.5 means the obs exceeded 98.5% of baseline days. None if obs missing. Yes
metrics.{key}.sigmas Z-score of each observed value vs baseline mean/stddev. e.g. 2.3 means 2.3 standard deviations above baseline mean. None if obs missing. Yes
metrics.{key}.p1 … p99 Baseline window percentiles for each date: p1, p5, p10, p25, p50, p75, p90, p95, p99. Computed from a ±window/2 day sliding window across baseline years.Yes
metrics.{key}.bmin / bmaxBaseline window minimum and maximum for each date. Yes
metrics.{key}.mean Baseline window mean for each date. Yes
metrics.{key}.stddev Baseline window standard deviation for each date. Yes
metrics.{key}.coverage Baseline data coverage fraction for each date: actual_pts / (window * num_years). e.g. 0.90 means 90% of expected baseline values were present. Yes

/events

Finds days matching one or more compound weather conditions (e.g. hot + humid, rainy + windy) for a location. Returns up to 5000 most-recent matching events plus the total count.
When to use: Count occurrences of compound weather events across years, study extreme or unusual day combinations, or identify streaks of such events.
Date format: year_start/year_end as YYYY; month_day_start/month_day_end as MMDD for seasonal filtering within each year.
Performance: Computed on demand; returns up to 5000 most-recent matches.
Prerequisites: Use /location to obtain a locid first.
Investigate: Use when the query involves compound conditions — 'how many days had both extreme heat and thunderstorms?' Combine numeric and condition metrics with AND/OR logic.
Augment: Provides event frequency counts for framing rarity in a story ('only 3 such days in the past 20 years').
Notes: Numeric metrics, with unit and valid absolute range: dewp (-30 to 35 °C), gust (0 to 300 km/hr), max_t (-90 to 55 °C), max_wind (0 to 250 km/hr), min_t (-90 to 40 °C), rain (0 to 600 mm), snow (0 to 100 mm), temp (-90 to 50 °C), wind (0 to 200 km/hr). Condition metrics: is_fog, is_hail, is_rain, is_snow, is_thunderstorm. No other metrics are supported. Do not specify lower or upper bound when dealing with absolutes unless it is required. Unspecified bounds default to the metric's full range, and absolute bounds outside that range make the request invalid.


Request

Parameter Desc Presence Default
token Token Required
criteria JSON array of criteria objects. Each criterion is either a numeric criterion {"metric":"NAME","bound_type":"A|S|P","lower_bound":VALUE,"upper_bound":VALUE,"must_have":true|false} where bound_type A=absolute (default bounds per metric), S=sigma (-4 to 4), P=percentile (0-100); or a condition criterion {"metric":"CONDITION","state":"1|0","must_have":true|false} with CONDITION one of the is_* metrics. NAME and CONDITION are listed in the description. Defaults: numeric metrics use their natural absolute range; S defaults to [-4,4]; P defaults to [0,100]. At least one must_have=true criterion required.Required
name Location name, e.g. New York Optional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
year_start Year start (YYYY) Optional 2024
year_end Year end (YYYY, inclusive) Optional 2026
month_day_startMonth-day start filter MMDD e.g. 0601 (June 1). Omit for full year. Optional
month_day_end Month-day end filter MMDD e.g. 0831 (Aug 31). Omit for full year. Optional
baseline Baseline period used to resolve sigma/percentile bounds, format YYYY_YYYY Optional 1991_2020

Response

Parameter Desc Presence Default
locid Location identifier Yes
name Location display name Yes
total_events Total number of matching events (before 5000 cap) Yes
events List of event rows, most recent first, capped at 5000 Yes
datestamp Date of event (YYYYMMDD) Yes
max_t Max temperature °C (always present, null if unavailable) Yes
max_t_completeTrue if max_t is from direct observation (not derived), always present Yes
min_t Min temperature °C (always present, null if unavailable) Yes
min_t_completeTrue if min_t is from direct observation (not derived), always present Yes
rain Rainfall mm (always present, null if unavailable) Yes
rain_complete True if rainfall measurement covers the full day, always present Yes
snow Snowfall mm (always present, null if unavailable) Yes
temp Mean temperature °C (always present, null if unavailable) Yes
dewp Mean dewpoint °C (always present, null if unavailable) Yes
wind Mean wind speed km/hr (always present, null if unavailable) Yes
max_wind Max wind speed km/hr (always present, null if unavailable) Yes
gust Max gust km/hr (always present, null if unavailable) Yes
conditions Comma-separated active weather conditions (always present, null if none) Yes
criteria_met Dict of metric -> 1/0 for each must_have=false criterion: 1 = criterion satisfied for this row, 0 = not satisfied. Always present; empty dict if no optional criteria were supplied.Yes
error Error message when the request could not be served No

/climatetrends

Returns monthly timeseries of selected climate trend metrics for one or more locations, suitable for long-term trend analysis.
When to use: Retrieve long-term monthly timeseries for statistical trend analysis across any number of locations including globally. Use num_years and avg_N to filter sparse records.
Date format: years as YYYY- range (e.g. '1975-' for 1975 to present); months as MM or MM-MM range (e.g. '06' for June, '06-08' for June–August, 'All' for annual).
Performance: Bulk query — can be slow for global or many-location queries. Filter with locids, lat_lon/radius_km, or countries to improve speed.
Prerequisites: Use /location to obtain locids first for point queries.
Investigate: Use for global or regional trend analysis. Metric name format: 'agg_func:metric_id.attribute' (e.g. 'avg:max_t.p50'). Check num_years to confirm data completeness before citing a trend.
Augment: Backs trend claims with long-term data across many locations (e.g. 'temperatures rising across Southeast Asia').
Notes: Example metrics: avg:max_t.p50, avg:obs.temp.mean, sum:obs.is_rain.count. See /api/metrics for full list.


Request

Parameter Desc Presence Default
token Token Required
metrics Comma-separated metric(s) in format agg_func:metric_id.attribute. Example: avg:max_t.p50. Available: avg:max_t.mean, avg:max_t.p10, avg:max_t.p5, avg:max_t.p90, avg:max_t.p95, avg:max_wind.p95, avg:min_t.mean, avg:min_t.p10, avg:min_t.p5, avg:min_t.p90, avg:min_t.p95, avg:obs.dewp.mean, avg:obs.dewp.p5, avg:obs.dewp.p95, avg:obs.dpd.mean, avg:obs.dpd.p95, avg:obs.rain.p95, avg:obs.rainh.p95, avg:obs.snow.p95, avg:obs.temp.mean, avg:obs.temp.p5, avg:obs.temp.p50, avg:obs.temp.p95, avg:obs.wbulb.mean, avg:obs.wbulb.p95, avg:obs.wind.mean, avg:obs.wind.p5, avg:obs.wind.p50, avg:obs.wind.p95, sum:obs.is_fog.count, sum:obs.is_hail.count, sum:obs.is_rain.count, sum:obs.is_smoke.count, sum:obs.is_snow.count, sum:obs.is_thunderstorm.count, sum:obs.rain.sum, sum:obs.snow.sumRequired
src_type Data source: Obs (station observations) | ERA5 (reanalysis). ERA5 provides global coverage including ocean areas. Optional Obs
years Year range string. Known values: '1975-' (data from 1975 onward). Optional 1975-
months Single month ('06') or hyphenated range ('03-05' for March-May, '06-08' for June-August) or 'All' for annual trends. Example: '06' or '03-05'. Optional
locids Comma-separated list of location IDs (as returned by /api/location). Example: '037720_99999,432950_99999'. Use locids for point queries. Optional
lat_lon Latitude,Longitude of area centre (e.g. '51.5,-0.1'). Used with radius_km for area search. Ignored when locids is set. Optional
radius_km Search radius in km around lat_lon. Default 100. Optional 100
countries Comma-separated ISO country codes to filter results (e.g. 'GB,FR'). Optional
num_years Minimum number of years with non-null data. Use to filter sparse records. Optional 0
avg_N Minimum average number of days per period for years with data. Optional 0

Response

Parameter Desc Presence Default
results Results List[trend] Yes
trend.locid Unique Location Id Yes
trend.geohash Geohash of location (precision 7) Yes
trend.lat Latitude Yes
trend.lon Longitude Yes
trend.elev Elevation in metres above MSL Yes
trend.area Geohash area prefix (precision 3) Yes
trend.country ISO country code Yes
trend.src_type Data source used: Obs or ERA5 Yes
trend.metric Metric name e.g. 'avg:max_t:p50'. See /api/metrics. Yes
trend.years Year range of data e.g. '1983-2024' Yes
trend.month Month or season filter used e.g. '06', '06-08', '00' (All/annual) Yes
trend.num_years Count of years with non-null data. Use to filter sparse records. Yes
trend.avg_N Average number of daily observations per period for years with data. Yes
trend.mvals Timeseries values dict Yes
trend.mvals.xvals List of years as ints e.g. [1983, 1984, ...] Yes
trend.mvals.yvals_by_metricDict of metric -> list of float values, one per year in xvals. Null where data is absent. e.g. {'avg:max_t:p50': [28.1, 27.9, ...]}Yes

/climatecomps

Returns monthly distributions of selected metrics for locations compared against a baseline period.
When to use: Compute normalized and absolute deviations from a baseline, inter-annual and intra-annual variations within months and seasons. Check base_N and obs_N to assess data completeness.
Date format: obs_years as YYYY or YYYY-YYYY range; months as MM or MM-MM (e.g. '06', '06-08', 'All' for annual).
Performance: Bulk query — can be slow for global or large-area queries. Filter with locids, lat_lon/radius_km, or countries.
Prerequisites: Use /location to obtain locids first for point queries.
Investigate: Use to compare a recent season or year against the long-term baseline across many locations simultaneously. Combine with /climatetrends for trend context.
Augment: Identifies which locations had the most anomalous season compared to their historical distribution.
Notes: Metric format: 'max_t' = distribution of daily Maximum Temperature over the period; 'max_t.means' = distribution of annual means of max_t (1 value per year); 'rain_sum' (accumulations) and 'obs.is_thunderstorm' (counts) follow the same pattern.


Request

Parameter Desc Presence Default
token Token Required
metrics Metric to compare. Available: max_t, max_t.means, max_wind, max_wind.means, min_t, min_t.means, obs.dewp, obs.dewp.means, obs.dpd, obs.dpd.means, obs.gust, obs.heatindex, obs.heatindex.means, obs.is_dust, obs.is_fog, obs.is_frozen_rain, obs.is_hail, obs.is_haze, obs.is_ice_pellets, obs.is_rain, obs.is_smoke, obs.is_snow, obs.is_squall, obs.is_thunderstorm, obs.rain, obs.rainh, obs.snow, obs.snowh, obs.temp, obs.temp.means, obs.wbulb, obs.wbulb.means, obs.wind, obs.wind.means, rain_sum, snow_sumRequired
src_type Data source: Obs (station observations) | ERA5 (reanalysis). Optional Obs
obs_years Observation year or range (e.g. '2024' or '2020-2024'). Values can range from 2024 to current year, or a single hyphenated range e.g. 1981-2010. Optional
base_years Baseline period. Available: 1991-2020. Optional 1991-2020
months Single month ('06') or hyphenated range ('MM-MM'). Seasons: '12-02' (Dec-Feb), '12-03' (Dec-Mar), '10-11' (Oct-Nov), '03-05' (Mar-May), '06-08' (Jun-Aug), '06-09' (Jun-Sep). Use 'All' for annual. Example: '06' or '06-09'. Optional
locids Comma-separated location IDs (as returned by /api/location). Example: '037720_99999,432950_99999'. Optional
lat_lon Latitude,Longitude of area centre (e.g. '51.5,-0.1'). Used with radius_km for area search. Ignored when locids is set. Optional
radius_km Search radius in km around lat_lon. Default 100. Optional 100
countries Comma-separated ISO country codes to filter (e.g. 'GB,FR'). Optional

Response

Parameter Desc Presence Default
results Results List[comp] Yes
comp.locid Unique Location Id Yes
comp.geohash Geohash of location (precision 7) Yes
comp.lat Latitude Yes
comp.lon Longitude Yes
comp.elev Elevation in metres above MSL Yes
comp.area Geohash area prefix (precision 3) Yes
comp.country ISO country code Yes
comp.src_type Data source used: Obs or ERA5 Yes
comp.metric Metric name e.g. 'max_t' (distribution), 'max_t.means' (annual means), 'rain_sum' (accumulation). See /api/metrics. Yes
comp.obs_years Observed year(s) e.g. '2024' or '1981-2010' Yes
comp.base_years Baseline period e.g. '1991-2020' Yes
comp.month Month or season filter used e.g. '06', '06-08', '00' (All/annual) Yes
comp.obs_N Number of observations in the observed period. Yes
comp.base_N Number of observations in the baseline period. Yes
comp.obs Quantile distribution of the observed period dict. For distribution metrics (e.g. max_t): full distribution of daily values (e.g. p50 is the 16th highest of 31 days for a month). For means/counts/accumulations (e.g. max_t.means, rain_sum): single value per obs_years — all quantiles are equal.Yes
comp.base Quantile distribution of the baseline dict. For distribution metrics: spans base_years * period_days values (e.g. 31*30 values for May 1991-2020). For means/accumulations: one value per year in base_years (e.g. 30 values). Yes
comp.obs.{q} / comp.base.{q}Quantile keys present in both obs and base dicts: min, p1, p5, p10, p25, p50, p75, p90, p95, p99, max. Yes

/breaking

Returns anomalous weather conditions (breaking news) across the world or specified countries in the very recent past (observations) or immediate future (forecast).
When to use: First call when looking for current or upcoming notable weather events globally or by country.
Date format: No date params — always returns the most recent ~3 days of observations (breaking_type=obs) or next 7 days of forecast (breaking_type=forecast).
Performance: Fast — retrieves precomputed anomaly snapshots.
Prerequisites: Use /countries to get country IDs for filtering.
Investigate: Start here for any 'what's happening right now?' or 'what's forecast this week?' query; follow up with /anom or /dailycomp for per-location detail.
Augment: Primary source for identifying breaking weather news stories globally; use ctryid to narrow scope by country.


Request

Parameter Desc Presence Default
token Token Required
metric_categoryFilter by metric category. Values: A (All), T (Temperature), P (Precipitation), H (Humidity/Dew Point), W (Wind).Optional A
breaking_type Type of anomaly source. Values: obs (recent observations, ~last 3 days), forecast (upcoming 0-7 days). Optional obs
ctryid Comma-separated country codes to filter (as returned by /api/countries). Leave empty for global results. Optional

Response

Parameter Desc Presence Default
anomalies Results List[anomaly] Yes
anomaly.locid Unique Location Id Yes
anomaly.name Location name Yes
anomaly.city City name Yes
anomaly.country Country name Yes
anomaly.lat Latitude Yes
anomaly.lon Longitude Yes
anomaly.geohash Geohash of location Yes
anomaly.elevationElevation in metres above MSL Yes
anomaly.obs_startStart of observation period YYYYMMDD e.g. '20250401' Yes
anomaly.obs_end End of observation period YYYYMMDD Yes
anomaly.obs_dur Duration in days: 1=day, 7=week, 30=month, 365=year Yes
anomaly.pt Period type: DAYH (hourly-derived day) | FULL_DAY | FUTURE_DAY Yes
anomaly.anomaliesAnomalous metrics for this location List[outlier] Yes
outlier.obsm Metric name of the observation e.g. 'max_t.max'. See /api/metrics. Yes
outlier.comps Baseline comparisons for this metric List[comp] Yes
comp.obsm_f Friendly observed metric name e.g. 'Daily High Temp' Yes
comp.oq Observed quantile compared: min | max | mean Yes
comp.bq Baseline quantile breached: min | p1 | p50 | max Yes
comp.scope Comparison scope: week | month | year Yes
comp.val Observed value Yes
comp.bval Baseline value at the breached quantile Yes
comp.min Baseline minimum Yes
comp.max Baseline maximum Yes
comp.med Baseline median (p50) Yes
comp.mean Baseline mean Yes
comp.std Baseline standard deviation Yes
comp.min_dt Date of baseline minimum YYYYMMDD Yes
comp.max_dt Date of baseline maximum YYYYMMDD Yes
comp.intensity Z-score (standard deviations from mean). Positive = above average, negative = below. Yes
comp.intensity_f Friendly intensity label e.g. 'Extreme High', 'Moderate Low' Yes
comp.rp Estimated return period in years. 0 if not applicable. Yes
comp.summary Plain-text description of the anomaly e.g. 'Hottest day on record for this location in May'Yes
comp.period Baseline history length in years e.g. 30 Yes
comp.base_N Number of valid baseline observations Yes
comp.N Number of valid observations in obs period Yes
comp.ut Unit of val/bval/min/max e.g. 'C', 'mm', 'km/hr' Yes
comp.start Start of baseline period YYYYMMDD Yes
comp.end End of baseline period YYYYMMDD Yes

/recentextremes

Returns recent weather records (all-time or period-of-record extremes) for the world or specified countries.
When to use: Find which locations have broken or nearly broken records in a recent date window. Set history_years ≥ 15 to ensure a meaningful period of record.
Date format: YYYYMMDD for ymd_start and ymd_end. Keep windows ≤ 3 months per call for reasonable performance.
Performance: Computed on demand; slower for large date ranges. Start with scope='monthly' or 'yearly'; fall back to 'weekly' for near-records.
Prerequisites: Use /countries for country IDs; use /location for locids.
Investigate: Use after /breaking identifies a record-breaking event to get precise extreme-value context. For US locations use period_type='DAY'; for non-US use 'FULL_DAY'. Hourly-derived metrics (wet bulb, wind gusts) for non-US require period_type='DAY'.
Augment: Provides the 'record' framing for a story — 'hottest day ever recorded at this station.' Note: FULL_DAY and DAY expose different metric sets.


Request

Parameter Desc Presence Default
token Token Required
period_type Period type. Values: DAY (US daily obs), FULL_DAY (non-US daily obs), FUTURE_DAY (forecast). Optional FULL_DAY
ymd_start Start date YYYYMMDD. Defaults to 15 days ago. Optional
ymd_end End date YYYYMMDD. Defaults to today. Optional
history_yearsMinimum years of history required to qualify as a record. Use >= 15 for meaningful records. Optional 5
ctryid Comma-separated country codes to filter (as returned by /api/countries). Optional
metrics Applicable metrics. For period_type DAY: ('temp.max','temp.min', 'temp.mean', 'rain.mean', 'snow.mean', 'dewp.mean', 'wbulb.max', 'heatindex.max', 'wbgt.max', 'dpd.max','gust.max','wind.max','rainh.max')
For period_type FULL_DAY/FUTURE_DAY: ('max_t.mean','min_t.mean','temp.mean','rain.mean','snow.mean','dewp.mean','max_wind'.mean)
Optional max_t.mean
scope Record scope. Values: month (monthly records), week (weekly records), year (annual records). Optional month

Response

Parameter Desc Presence Default
results Results List[extreme] Yes
extreme.locid Unique Location Id Yes
extreme.name Location name Yes
extreme.country_code ISO country code e.g. 'US' Yes
extreme.lat Latitude Yes
extreme.lon Longitude Yes
extreme.elev Elevation in metres above MSL Yes
extreme.period_type Period type of the record: DAY | FULL_DAY | FUTURE_DAY Yes
extreme.metric Metric name e.g. 'max_t.mean'. See /api/metrics. Yes
extreme.ymd Date of the record YYYYMMDD e.g. '20250615' Yes
extreme.anomaly_type Direction of record: HIGH (new maximum) | LOW (new minimum)Yes
extreme.scope Record scope: weekly | monthly | yearly Yes
extreme.value Observed value that set the record e.g. '42.1' Yes
extreme.history_yearsYears of history used to establish the record e.g. 30 Yes

/extremes

Returns extreme value analysis (return periods) for a specified location and metric.
When to use: Quantify the statistical rarity of a record or near-record value. Typically called after other APIs establish that an observation is anomalous.
Performance: Computed on demand; moderate speed.
Prerequisites: Use /location to obtain a locid first. Prefer level='area' over 'city' for better recall and longer period of record.
Investigate: Use after /recentextremes or /anom establishes a high value; provides the return-period framing ('a once-in-50-year event').
Augment: Provides the statistical rarity framing needed for record-event stories. Try both src_types 'Obs' and 'ERA5' for non-US locations to account for discontinuous station records.


Request

Parameter Desc Presence Default
token Token Required
name Common name of metro or metro area. for ex: New York, Beijing, Mumbai Airport Optional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
src_type Data source: Obs (station observations) | ERA5 (reanalysis). ERA5 recommended for precipitation outside US. Optional Obs
level Aggregation level: city (single station) | area (nearby stations pooled). Use 'area' to improve period of record. Optional area
metric_categoryMetric category. Values: AVG_TEMP, DEWPH, DPD, MAX_TEMP, MIN_TEMP, PRCP, RAINH, SNOW, SNOWH, WBULB, WIND. Example: MAX_TEMP for maximum temperature extremes. Optional MAX_TEMP
exceedance_typeExceedance direction: High (probability of exceeding value) | Low (probability of being below value). Optional High
model_type Statistical model: '' (empirical/default) | MLE (maximum likelihood estimate). Optional
window_size Rolling window in days. Temperature metrics (MAX_TEMP, MIN_TEMP, AVG_TEMP, DEWPH, WBULB, DPD): 1, 2, 3. Precipitation metrics (PRCP, SNOW, RAINH, SNOWH): 1, 2, 3, 4, 7.Optional 1
month Two-digit month filter (e.g. '06' for June). Leave empty for all months. Optional
season Season filter as 'MM-MM' (e.g. '06-08' for Jun-Aug, '12-02' for Dec-Feb). Overridden by 'month' if both are set. Optional

Response

Parameter Desc Presence Default
locid Location identifier used for the analysis Yes
period Period of record inferred from available data e.g. '1973-2024' Yes
months_covered Months included in analysis e.g. 'Jan-Dec' (full year) or 'Jun' Yes
window_size Rolling window size used (days) Yes
N Total number of observations in the period Yes
coverage_pct Data coverage as percentage of expected observations e.g. 30 years -> expected ~10950; coverage_pct = N/10950 * 100Yes
results Return period values List[result] Yes
result.metric Metric key used e.g. 'MAX_TEMP_1' (MAX_TEMP window=1). Yes
result.value Threshold value at this return period in native units e.g. 38.2 (°C) or 120.5 (mm) Yes
result.return_periodReturn period in years e.g. 2, 5, 10, 50, 100. Results are sorted in increasing order of return period. Yes

/besttime

Given a location, ranks the weeks or months whose historical climatology best matches a set of weather criteria (most optional criteria met first; all MUST criteria satisfied by every result).
When to use: Answer 'when is the best time to visit X for weather like Y?' Choose when_type=week or month over the 1996-2025 baseline.
Date format: when_type: week|month|day. Historical basis only for week/month.
Performance: Sub-second per location.
Prerequisites: Use /location to obtain a locid first.
Investigate: Rank a location's calendar by weather suitability. For a specific upcoming day's forecast, use /api/anom with period_type=FUTURE_DAY.
Augment: Find the typical best window for an activity at a place.
Notes: Every criterion metric name is literal and fully qualified: the 'avg:' prefix, then the metric base (observation metrics keep their 'obs.' segment), then the attribute — e.g. avg:max_t.p50, avg:obs.rain.sum, avg:obs.is_rain.count. Dropping 'avg:' or 'obs.' is an error; the criteria parameter below lists every valid name. For daily forecasts use /api/anom (period_type=FUTURE_DAY). Weekly/monthly forecasts are planned.


Request

Parameter Desc Presence Default
token Token Required
criteria JSON array of criteria, passed as a string. Example: [{"metric":"avg:max_t.p50","lb":18,"ub":28,"must_have":true},{"metric":"avg:obs.rain.sum","ub":40,"must_have":true},{"metric":"avg:obs.is_rain.count","ub":6,"must_have":false}] Each element has: metric (required, one of the exact names listed below), lb and ub (optional numeric lower/upper bounds, unscaled natural units; set at least one), and must_have (true = hard filter every result must satisfy, false = optional, only used to rank results). At least one criterion with must_have=true is required. Metric names are literal and case-sensitive. Each is the prefix 'avg:' + the metric base + '.' + the attribute — for example avg:obs.rain.sum and avg:max_t.p50. Never drop the 'avg:' prefix and never drop the 'obs.' segment: 'obs.rain.sum', 'rain.sum' and 'avg:rain.sum' are all rejected. 'avg' means the mean across the baseline years for that week/month bucket. lb/ub are unscaled natural units (°C, mm, km/h, oktas, days). Percentile metrics — p1 = low tail, p50 = median, p99 = high tail: avg:max_t.p1, avg:max_t.p50, avg:max_t.p99, avg:min_t.p1, avg:min_t.p50, avg:min_t.p99, avg:obs.dewp.p1, avg:obs.dewp.p50, avg:obs.dewp.p99, avg:obs.dewph.p1, avg:obs.dewph.p50, avg:obs.dewph.p99, avg:obs.wbulb.p1, avg:obs.wbulb.p50, avg:obs.wbulb.p99, avg:obs.wbgt.p1, avg:obs.wbgt.p50, avg:obs.wbgt.p99, avg:obs.temp.p1, avg:obs.temp.p50, avg:obs.temp.p99, avg:obs.heatindex.p1, avg:obs.heatindex.p50, avg:obs.heatindex.p99 (°C); avg:obs.wind.p1, avg:obs.wind.p50, avg:obs.wind.p99 (km/h); avg:obs.cloudcover.p1, avg:obs.cloudcover.p50, avg:obs.cloudcover.p99 (oktas). Tail-percentile metrics: avg:obs.gust.p99 (km/h); avg:obs.rain.p95, avg:obs.rain.p99, avg:obs.snow.p95, avg:obs.snow.p99 (mm). Accumulation over the bucket: avg:obs.rain.sum, avg:obs.snow.sum (mm). Day-counts within the bucket: avg:obs.is_snow.count, avg:obs.is_rain.count, avg:obs.is_hail.count, avg:obs.is_thunderstorm.count, avg:obs.is_fog.count, avg:obs.is_smoke.count (days). Use exactly one of the names above as the criterion 'metric'; anything else returns an error listing the valid names.Required
name Location name, e.g. New York Optional
latlon Latitude,Longitude ex: 40.78,-73.97 Optional
locid Unique Location Identifier Optional
when_type week | month | day Optional week
when_basis historical | forecast Optional historical
baseline Baseline year range YYYY-YYYY Optional 1996-2025
max_resultsMax results Optional 25

Response

Parameter Desc Presence Default
location Location metadata (locid, name, city_name, lat, lon, elevation, country)Yes
baseline Echoed baseline for historical results Yes
when_type week | month | day Yes
results Ranked list, most criteria met first Yes
time MMDD-MMDD (week), MM (month), or YYYYMMDD (day) Yes
criteria_met List of {metric,value} for satisfied optional criteria Yes
criteria_met_countNumber of optional criteria met Yes
record Full metric record for the bucket Yes

/bestplace

Given a single week, month, or day, ranks locations whose weather best matches a set of criteria (most optional criteria met first; all MUST criteria satisfied by every result). Filter by lat/lon+radius or countries.
When to use: Answer 'where has the best weather for week/month/day X?'
Date format: scope=day + time=YYYYMMDD (forecast); scope=week + time=MMDD; scope=month + time=MM. Defaults: week of today+14, month today+1, day today+1.
Performance: Filter by area/countries to keep fast.
Prerequisites: None; supply lat/lon+radius_km or a country list.
Investigate: Rank places for a given time window. scope=day uses forecasts.
Augment: Find the best destinations for a target week/month.
Notes: Every criterion metric name is literal and fully qualified: the 'avg:' prefix, then the metric base (observation metrics keep their 'obs.' segment), then the attribute — e.g. avg:max_t.p50, avg:obs.rain.sum, avg:obs.is_rain.count. Dropping 'avg:' or 'obs.' is an error; the criteria parameter below lists every valid name. scope=day queries forecasts; week/month query the 1996-2025 historical baseline.


Request

Parameter Desc Presence Default
token Token Required
criteria JSON array of criteria, passed as a string. Example: [{"metric":"avg:max_t.p50","lb":18,"ub":28,"must_have":true},{"metric":"avg:obs.rain.sum","ub":40,"must_have":true},{"metric":"avg:obs.is_rain.count","ub":6,"must_have":false}] Each element has: metric (required, one of the exact names listed below), lb and ub (optional numeric lower/upper bounds, unscaled natural units; set at least one), and must_have (true = hard filter every result must satisfy, false = optional, only used to rank results). At least one criterion with must_have=true is required. Metric names are literal and case-sensitive. Each is the prefix 'avg:' + the metric base + '.' + the attribute — for example avg:obs.rain.sum and avg:max_t.p50. Never drop the 'avg:' prefix and never drop the 'obs.' segment: 'obs.rain.sum', 'rain.sum' and 'avg:rain.sum' are all rejected. 'avg' means the mean across the baseline years for that week/month bucket. lb/ub are unscaled natural units (°C, mm, km/h, oktas, days). Percentile metrics — p1 = low tail, p50 = median, p99 = high tail: avg:max_t.p1, avg:max_t.p50, avg:max_t.p99, avg:min_t.p1, avg:min_t.p50, avg:min_t.p99, avg:obs.dewp.p1, avg:obs.dewp.p50, avg:obs.dewp.p99, avg:obs.dewph.p1, avg:obs.dewph.p50, avg:obs.dewph.p99, avg:obs.wbulb.p1, avg:obs.wbulb.p50, avg:obs.wbulb.p99, avg:obs.wbgt.p1, avg:obs.wbgt.p50, avg:obs.wbgt.p99, avg:obs.temp.p1, avg:obs.temp.p50, avg:obs.temp.p99, avg:obs.heatindex.p1, avg:obs.heatindex.p50, avg:obs.heatindex.p99 (°C); avg:obs.wind.p1, avg:obs.wind.p50, avg:obs.wind.p99 (km/h); avg:obs.cloudcover.p1, avg:obs.cloudcover.p50, avg:obs.cloudcover.p99 (oktas). Tail-percentile metrics: avg:obs.gust.p99 (km/h); avg:obs.rain.p95, avg:obs.rain.p99, avg:obs.snow.p95, avg:obs.snow.p99 (mm). Accumulation over the bucket: avg:obs.rain.sum, avg:obs.snow.sum (mm). Day-counts within the bucket: avg:obs.is_snow.count, avg:obs.is_rain.count, avg:obs.is_hail.count, avg:obs.is_thunderstorm.count, avg:obs.is_fog.count, avg:obs.is_smoke.count (days). Use exactly one of the names above as the criterion 'metric'; anything else returns an error listing the valid names.Required
scope day | week | month Optional week
time YYYYMMDD (day), MMDD (week), or MM (month) Optional
baseline Baseline year range YYYY-YYYY Optional 1996-2025
max_resultsMax results Optional 100
latlon Latitude,Longitude for area search ex: 40.78,-73.97 Optional
radius_km Radius km for area search Optional 100
ctryid Comma-separated ISO country codes (mutually exclusive with latlon) Optional

Response

Parameter Desc Presence Default
scope day | week | month Yes
time Resolved time bucket Yes
baseline Echoed baseline for historical results Yes
results Ranked list, most criteria met first Yes
locid Location identifier Yes
location Location metadata (lat, lon, elevation, country, name, city_name)Yes
criteria_met List of {metric,value} for satisfied optional criteria Yes
criteria_met_countNumber of optional criteria met Yes
record Full metric record Yes

/seasonal

Seasonal (monthly) forecast anomalies for the next six months, with the local climatology they are measured against. Each result gives, per metric: the ERA5 baseline mean (means), its interannual standard deviation (std), the predicted anomaly (anom, in degrees C / mm / km/h) and how unusual that is, both as standard deviations (norm) and as a percentile rank among the last 30 years (perc).
When to use: Answer 'will next month be hotter/wetter than normal here?' or 'where is the coming season predicted to be most unusual?'
Date format: ym_start and ym_end are YYYYMM, inclusive. For a single month set both to the same value. Defaults to next month through next month + 5.
Performance: Filter by locid, ctryid or latlon+radius_km to keep fast; a whole-world month slice is about 4000 rows and fits in one page.
Prerequisites: None; supply locid, name, latlon+radius_km, ctryid, or nothing at all for a global query.
Investigate: Rank places by how abnormal the coming months look. Use sort=perc:obs.rain.sum for rainfall and sort=norm:max_t.mean for heat.
Augment: Back claims about the coming season with the predicted anomaly and how it compares with the local 30-year normal.
Notes: Monthly resolution only — for daily forecasts use typicalweather. The forecast is ECMWF SEAS5; its anomalies are relative to SEAS5's own 1991-2020 model climatology, so means + anom approximates rather than equals the predicted absolute.


Request

Parameter Desc Presence Default
token Token Required
src_type Forecast model to read: SEAS5 (ECMWF seasonal). SEAS5 is currently the only value, so this can be omitted. Optional SEAS5
ym_start First target month as YYYYMM, e.g. 202611. For a single month set ym_start and ym_end to the same value. Defaults to next month. Optional
ym_end Last target month as YYYYMM, inclusive. Must be at least ym_start. Defaults to ym_start plus 5 months. Optional
locid Location id from /api/location, e.g. 724940_23234 Optional
name Place name, e.g. 'San Francisco'. Ignored if locid is set Optional
latlon Centre of an area search as 'lat,lon' ex: 37.62,-122.4 Optional
radius_km Radius km for latlon, 1 to 2000 Optional 100
ctryid Comma-separated ISO country codes (mutually exclusive with latlon) Optional
criteria JSON array of criteria, passed as a string. Optional for this API: omit it to get every location for the requested months. Example: [{"metric":"norm:max_t.mean","lb":1.5,"must_have":true},{"metric":"perc:obs.rain.sum","ub":15,"must_have":true}] Each element has: metric (required, one of the exact names listed below), lb and ub (optional numeric lower/upper bounds), and must_have (true = hard filter every result must satisfy, false = optional, only used to rank). Metric names are literal and case-sensitive: a prefix plus the metric base plus '.' plus the attribute, e.g. norm:max_t.mean, perc:obs.rain.sum. Never drop the prefix and never drop the 'obs.' segment. The seven metrics are: max_t.mean, min_t.mean, obs.temp.mean, obs.dewp.mean (C); obs.wind.mean (km/h); obs.rain.sum, obs.snow.sum (mm). Filterable prefixes: 'norm:' = anomaly divided by that place's interannual standard deviation (|1| unusual, |2| strongly unusual, |3|+ rare); 'perc:' = percentile rank of the prediction among the last 30 years, 0 to 100 (90 = hotter/wetter than 90% of them, 50 = typical); 'anom:' = the absolute anomaly in natural units, which is not comparable between places. Prefer 'perc:' for obs.rain.sum and obs.snow.sum, whose year-to-year distributions are skewed, and note 'norm:' is absent where interannual variability is near zero. The 'avg:' and 'std:' attributes are returned for display but cannot be filtered on. Full list: anom:max_t.mean, anom:min_t.mean, anom:obs.temp.mean, anom:obs.dewp.mean, anom:obs.wind.mean, anom:obs.rain.sum, anom:obs.snow.sum, norm:max_t.mean, norm:min_t.mean, norm:obs.temp.mean, norm:obs.dewp.mean, norm:obs.wind.mean, norm:obs.rain.sum, norm:obs.snow.sum, perc:max_t.mean, perc:min_t.mean, perc:obs.temp.mean, perc:obs.dewp.mean, perc:obs.wind.mean, perc:obs.rain.sum, perc:obs.snow.sumOptional
metrics Comma-separated metrics to return: max_t.mean, min_t.mean, obs.temp.mean, obs.dewp.mean, obs.wind.mean, obs.rain.sum, obs.snow.sum. The metric named by sort is always returned as well, whether or not it is listed here. Defaults to all seven. Optional
fields 'full' for everything, 'compact' for locid/lat/lon/ym plus anom, norm and perc of the requested metrics only Optional full
sort One of: 'criteria' (most optional criteria met first), 'locid' (id order, resumable with cursor), or an attribute name to rank by how far from normal it is: 'norm:METRIC' or 'perc:METRIC', e.g. norm:obs.rain.sum. Those are the same names used in criteria, and they order most-abnormal-first in either direction — use criteria to pick a direction (e.g. lb 0 for hotter than normal only). Defaults to criteria when criteria are given, otherwise locid. Optional
limit Results per page, 1 to 4000. 4000 covers every location in one page Optional 100
cursor next_cursor from a previous response. Only valid with sort=locid; sending it with a ranked sort is an error Optional
offset Offset into a ranked result (any sort except locid). offset plus limit must be at most 4000. Use cursor, not offset, with sort=locid Optional 0
baseline Baseline year range YYYY-YYYY Optional 1996-2025

Response

Parameter Desc Presence Default
ym_start First target month returned, YYYYMM Yes
ym_end Last target month returned, YYYYMM Yes
baseline Baseline year range behind means and std Yes
metrics Metrics present on each result Yes
count Number of results in this page Yes
truncated True when more matched than the ranking ceiling Yes
results Ranked list of results Yes
locid Location identifier Yes
location Location metadata (lat, lon, elevation, country, name, city_name)Yes
ym Target month, YYYYMM Yes
run_ymd Date this forecast was indexed, YYYYMMDD Yes
basis_type Source of the climatology (ERA5) Yes
means Baseline mean per metric Yes
std Interannual standard deviation per metric Yes
anom Predicted anomaly per metric, natural units Yes
norm Anomaly divided by the standard deviation, per metric Yes
perc Percentile rank of the prediction, 0-100, per metric Yes
criteria_met List of {metric,value} for satisfied optional criteria Yes
criteria_met_countNumber of optional criteria met Yes
note Explanation when truncated No
error Error message when the request could not be served No
next_cursor Cursor for the next page (sort=locid only) No

/fcastevalbygroup

Scores how well each forecast model actually performed at each of many locations, by comparing what the models predicted against what was then observed. Returns one score matrix per location, models by evaluation metrics, for a single weather metric at a single lead time, plus the winning model per location.
When to use: Answer 'which forecast model is most accurate here?' at scale — to map the best model by region, to check whether a specific model is worth using over the default blend, or to compare physical and AI models across the world.
Date format: ymd_start and ymd_end are YYYYMMDD and inclusive. Inclusive day range as YYYYMMDD. Defaults to the 14 days ending yesterday; today is never included because it has not been verified yet. At most 180 days, which is also how much history the index retains.
Performance: Filter by ctryid, latlon+radius_km or a small sample_pct to keep it fast; a global 5 percent sample over 14 days is a few hundred locations.
Prerequisites: None. Supply locid, name, latlon+radius_km, ctryid, or nothing at all with a sample_pct for an unbiased global sample.
Investigate: Use this to find where a model is strong or weak. Ask for one metric and one lead_time at a time; compare models by reading across each row of evals, and use winners for the answer at a glance.
Augment: Back a claim about forecast reliability with the measured error of the named model at that place over the recent past.
Notes: Forecasts come from Open-Meteo. Lead time is the number of days ahead the forecast was issued, so lead_time 1 is yesterday's forecast for today; only the indexed lead times are available. The WN2 model is an ensemble mean, which is smoother than the deterministic models and so tends to score slightly better on mae and rmse and slightly worse on extremes. A score is null, never zero, when its sample was too small to measure: fewer than 5 verified days for mae, rmse, mse, bias and ets, or fewer than 10 for acc.


Request

Parameter Desc Presence Default
token Token Required
ctryid Comma-separated ISO country codes from /api/countries, e.g. US,CA. Omit for a global query. This endpoint compares many locations and has no single-location argument; for one place use fcastevalbylocation Optional
sample_pct Percent of the world's locations to sample, from 0.1 to 100. Sampling is by stable hash bucket, so every location has an equal chance of being selected and the sample is unbiased by geography. The granularity is one bucket, which is 2.5 percent, and a request is rounded up to whole buckets; the response reports the sample_pct_effective actually served and the buckets drawn. Defaults to 5 percent for a global query, and to 100 when ctryid is given, because sampling exists to bound a world-sized scan and naming countries is already a restriction. Optional
seed Any string. The sample of locations is drawn deterministically from it, so the same seed always returns the same locations. Every response reports the seed it used, including when one was not supplied, so any result can be reproduced exactly by sending that seed back. Optional
models Forecast models, given as comma-separated keys: auto (Open-Meteo's own per-location blend — what a caller gets by default), IFS (ECMWF IFS 0.25 degree, physical NWP), GFS (NCEP GFS), AIFS (ECMWF AIFS, machine-learned, deterministic), WN2 (Google WeatherNext 2, ensemble mean). Defaults to all of them. Optional
metric Metric names are literal and case-sensitive. Never drop the 'obs.' segment and never drop the '.mean' suffix. The eight metrics are: max_t.mean, min_t.mean, obs.temp.mean, obs.dewp.mean (C); obs.rain.mean, obs.snow.mean (mm); obs.wind.mean, obs.gust.mean (km/hr). They are daily quantities: max_t.mean and min_t.mean are the day's high and low, obs.temp.mean the day's mean temperature, obs.dewp.mean the day's mean dew point, obs.rain.mean and obs.snow.mean the day's total precipitation and snowfall, obs.wind.mean the day's mean wind speed and obs.gust.mean the day's maximum gust. Exactly one metric per request. Full list: max_t.mean, min_t.mean, obs.temp.mean, obs.dewp.mean, obs.rain.mean, obs.snow.mean, obs.wind.mean, obs.gust.mean Optional obs.temp.mean
lead_time Forecast lead time in days. A lead time is how many days ahead the forecast was issued, so lead time 1 is yesterday's forecast for today and lead time 10 is a forecast made ten days before the day it describes. Only these lead times are indexed: 1, 2, 3, 5, 7, 10. Asking for any other lead time is an error, not an empty result. One value only here; use fcastevalbylocation to compare lead times. Optional 1
ymd_start Inclusive day range as YYYYMMDD. Defaults to the 14 days ending yesterday; today is never included because it has not been verified yet. At most 180 days, which is also how much history the index retains. Optional
ymd_end Last day evaluated, YYYYMMDD, inclusive Optional
eval_metricsEvaluation metrics, comma-separated, any of: 'mae' mean absolute error in the metric's own unit, lower is better; 'rmse' root mean squared error, same unit, lower is better, more sensitive to large misses than mae; 'mse' the same squared, lower is better; 'bias' mean signed error, positive means the model forecasts too high, zero is best; 'acc' anomaly correlation coefficient from -1 to 1, higher is better, which measures whether the model got the departure from the local seasonal normal right rather than just the absolute value, so a model that always forecasts the local average scores near zero however small its mae; 'ets' equitable threat score from -1/3 to 1, higher is better, the standard precipitation score, which is only valid for the accumulation metrics obs.rain.mean and obs.snow.mean and uses the threshold argument. Defaults to mae,rmse,acc. IMPORTANT for obs.rain.mean and obs.snow.mean: mae, rmse, mse and bias are measured on WET DAYS ONLY, meaning days where the observed total was at or above the threshold, because a daily rain total is zero on most days and an all-days average mostly measures days both sides correctly called dry. So for rain, mae answers 'when it actually rained, how far off was the amount' and n counts wet days, not days. ets still scores every day, wet and dry, because the dry days are what make it meaningful. For every other metric all scores use every day. A cell whose sample was too small is returned as null, never as zero.Optional mae,rmse,acc
threshold Precipitation threshold in mm per day for the 'ets' eval metric, ignored otherwise. A day counts as a wet-day event when the total is at or above this. Useful rungs are 0.2, 1.0, 5.0, 10.0, 25.0. Optional 1.0
limit Maximum locations returned, 1 to 4000 Optional 500

Response

Parameter Desc Presence Default
metric The weather metric evaluated Yes
unit Natural unit of that metric; mae, rmse and bias are in it Yes
lead_time Forecast lead time in days Yes
ymd_start First day evaluated, YYYYMMDD Yes
ymd_end Last day evaluated, YYYYMMDD Yes
days Number of days in the range Yes
models Ordered list of model keys — the ROWS of every matrix Yes
eval_metrics Ordered list of score names — the COLUMNS Yes
sample_pct Sample percent requested or defaulted Yes
sample_pct_effectiveSample percent actually served Yes
seed The seed the sample was drawn from, generated when none was supplied. Send it back as the seed argument to get exactly these locations again Yes
buckets Sample buckets drawn, for transparency; empty when the whole population was used. Not a request argument -- reproduce a sample with seed Yes
count Number of locations returned Yes
scanned Number of evaluation records read Yes
truncated True when the scan hit its ceiling and stopped early Yes
results One entry per location Yes
locid Location identifier Yes
location Location metadata (name, country, lat, lon, elevation) Yes
evals The score matrix for that location. It has exactly one row per entry of the top-level models list, in that order, and within each row exactly one value per entry of the top-level eval_metrics list, in that order. So evals[i][j] is the score of models[i] under eval_metrics[j]. The shape never varies between locations. A value is null, never zero, when that model had no verified days at that location or too few to measure the score; read the matching entry of n to tell those apart. A location with no records at all is omitted from results entirely rather than returned as a matrix of nulls, so an empty results list with count 0 means nothing matched -- see note for whyYes
n Sample behind each row of evals, same order as models. Days, except for obs.rain.mean and obs.snow.mean where it counts WET days, since their mae, rmse, mse and bias are measured on wet days only. A zero means no verified sample, so that whole row is null Yes
n_days Days behind ets, shaped exactly like n. Identical to n except for obs.rain.mean and obs.snow.mean, where n counts only wet days while ets still scores every day -- so a null ets is explained by this number, not by n Yes
error_basis 'wet_days' when mae, rmse, mse and bias were measured only on days whose observed total reached the threshold (obs.rain.mean, obs.snow.mean), 'all_days' otherwise. ets always scores every day Yes
winners The best model per eval metric, as a mapping from the eval metric name to a model key. Lowest wins for mae, rmse, mse and absolute bias; highest wins for acc and ets. Ties break by the order of the models list. An eval metric whose column was entirely null is absent from this mapping rather than being given an arbitrary winner Yes
note Explanation when truncated No
error Error message when the request could not be served No

/fcastevalbylocation

Scores how well each forecast model performed at ONE location, across several forecast lead times and across a sliding time window. Shows both how fast accuracy decays as the forecast reaches further ahead, and how accuracy at a given lead time has varied over recent weeks.
When to use: Answer 'how far ahead can I trust the forecast here?' or 'has the forecast been unusually poor here lately?' Use fcastevalbygroup instead to compare many locations at one lead time.
Date format: ymd_start and ymd_end are YYYYMMDD and inclusive. Inclusive day range as YYYYMMDD. Defaults to the 14 days ending yesterday; today is never included because it has not been verified yet. At most 180 days, which is also how much history the index retains.
Performance: Fast: one location. The cost grows with the number of lead times and the length of the range.
Prerequisites: A location: locid from /api/location, or name, or latlon.
Investigate: Ask for several lead_times at once (e.g. 1,3,5,7) to get the skill-decay curve in one call. Set window to get a moving average and see the trend over time rather than one number.
Augment: Quantify how reliable a forecast for this place actually is at the lead time being written about.
Notes: Forecasts come from Open-Meteo. Lead time is the number of days ahead the forecast was issued; only the indexed lead times are available. A score is null, never zero, when its sample was too small to measure: fewer than 5 verified days for mae, rmse, mse, bias and ets, or fewer than 10 for acc.


Request

Parameter Desc Presence Default
token Token Required
locid Location id from /api/location, e.g. 725030_14732 Optional
name Place name, e.g. 'San Francisco'. Ignored if locid is set Optional
latlon 'lat,lon' ex: 37.62,-122.4. Used if locid and name are absent Optional
models Forecast models, given as comma-separated keys: auto (Open-Meteo's own per-location blend — what a caller gets by default), IFS (ECMWF IFS 0.25 degree, physical NWP), GFS (NCEP GFS), AIFS (ECMWF AIFS, machine-learned, deterministic), WN2 (Google WeatherNext 2, ensemble mean). Defaults to all of them. Optional
metric Metric names are literal and case-sensitive. Never drop the 'obs.' segment and never drop the '.mean' suffix. The eight metrics are: max_t.mean, min_t.mean, obs.temp.mean, obs.dewp.mean (C); obs.rain.mean, obs.snow.mean (mm); obs.wind.mean, obs.gust.mean (km/hr). They are daily quantities: max_t.mean and min_t.mean are the day's high and low, obs.temp.mean the day's mean temperature, obs.dewp.mean the day's mean dew point, obs.rain.mean and obs.snow.mean the day's total precipitation and snowfall, obs.wind.mean the day's mean wind speed and obs.gust.mean the day's maximum gust. Exactly one metric per request. Full list: max_t.mean, min_t.mean, obs.temp.mean, obs.dewp.mean, obs.rain.mean, obs.snow.mean, obs.wind.mean, obs.gust.mean Optional obs.temp.mean
lead_times Comma-separated forecast lead times in days. A lead time is how many days ahead the forecast was issued, so lead time 1 is yesterday's forecast for today and lead time 10 is a forecast made ten days before the day it describes. Only these lead times are indexed: 1, 2, 3, 5, 7, 10. Asking for any other lead time is an error, not an empty result. They become the outermost axis of the evals structure, in ascending order. Optional 1
ymd_start Inclusive day range as YYYYMMDD. Defaults to the 14 days ending yesterday; today is never included because it has not been verified yet. At most 180 days, which is also how much history the index retains. Optional
ymd_end Last day evaluated, YYYYMMDD, inclusive Optional
window Sliding window in days for the moving average. A 14 day range with a 7 day window yields 8 windows. Defaults to the whole range, which yields exactly one window Optional
eval_metricsEvaluation metrics, comma-separated, any of: 'mae' mean absolute error in the metric's own unit, lower is better; 'rmse' root mean squared error, same unit, lower is better, more sensitive to large misses than mae; 'mse' the same squared, lower is better; 'bias' mean signed error, positive means the model forecasts too high, zero is best; 'acc' anomaly correlation coefficient from -1 to 1, higher is better, which measures whether the model got the departure from the local seasonal normal right rather than just the absolute value, so a model that always forecasts the local average scores near zero however small its mae; 'ets' equitable threat score from -1/3 to 1, higher is better, the standard precipitation score, which is only valid for the accumulation metrics obs.rain.mean and obs.snow.mean and uses the threshold argument. Defaults to mae,rmse,acc. IMPORTANT for obs.rain.mean and obs.snow.mean: mae, rmse, mse and bias are measured on WET DAYS ONLY, meaning days where the observed total was at or above the threshold, because a daily rain total is zero on most days and an all-days average mostly measures days both sides correctly called dry. So for rain, mae answers 'when it actually rained, how far off was the amount' and n counts wet days, not days. ets still scores every day, wet and dry, because the dry days are what make it meaningful. For every other metric all scores use every day. A cell whose sample was too small is returned as null, never as zero.Optional mae,rmse,acc
threshold Precipitation threshold in mm per day for the 'ets' eval metric, ignored otherwise. A day counts as a wet-day event when the total is at or above this. Useful rungs are 0.2, 1.0, 5.0, 10.0, 25.0. Optional 1.0

Response

Parameter Desc Presence Default
locid Location identifier Yes
location Location metadata (name, country, lat, lon, elevation) Yes
metric The weather metric evaluated Yes
unit Natural unit of that metric Yes
ymd_start First day evaluated, YYYYMMDD Yes
ymd_end Last day evaluated, YYYYMMDD Yes
days Number of days in the range Yes
window Sliding window length in days Yes
num_windows Number of windows: days minus window plus one Yes
windows The windows, oldest first, each with ymd_start and ymd_end Yes
lead_times Ordered lead times — the FIRST axis of evals Yes
models Ordered model keys — the SECOND axis of evals Yes
eval_metricsOrdered score names — the THIRD axis of evals Yes
scanned Number of evaluation records read Yes
count Number of non-null scores in evals; 0 when nothing matched, in which case evals and n are empty lists Yes
truncated True when the scan hit its ceiling and stopped early Yes
evals A four-level nested list indexed in this order: lead time, then model, then eval metric, then window. So evals[a][b][c][d] is the score of models[b] under eval_metrics[c] for lead_times[a], computed over windows[d]. The lengths of the four levels are exactly the lengths of lead_times, models, eval_metrics and windows, in that order, and never vary. The innermost list is the moving-average series, oldest window first; with the default window it has exactly one element. A value is null when that window had too few verified days. When NOTHING matched the request at all, evals is an empty list rather than a structure full of nulls, and count is 0 -- see note for whyYes
n Sample per cell, nested exactly like evals. Days, except for obs.rain.mean and obs.snow.mean where it counts WET days. A zero means no verified sample and the matching evals value is null. Unlike fcastevalbygroup this structure is always fully shaped: a lead time with no records at all is still present, filled with nulls Yes
n_days Days behind ets, shaped exactly like n. Identical to n except for obs.rain.mean and obs.snow.mean, where n counts only wet days while ets still scores every day -- so a null ets is explained by this number, not by n Yes
error_basis 'wet_days' when mae, rmse, mse and bias were measured only on days whose observed total reached the threshold (obs.rain.mean, obs.snow.mean), 'all_days' otherwise. ets always scores every day Yes
error Error message when the request could not be served No

/dailycountbyloc

How often a compound daily weather condition happens, per location: for every location in an area, the average number of days per year that met all the criteria, with the count, the days that had data, and the percentage.
When to use: Map where a condition is common or rare, e.g. 'where are summer days between 20 and 30 C most frequent' or 'where did heatwave nights occur in the last five summers'.
Date format: Either ymd_start and ymd_end (YYYYMMDD, at most 31 days) or year_start, year_end with optional mm_dd_start and mm_dd_end for a season across years (at most 5 years). Defaults to the last 30 days.
Performance: Full counts need a geo scope (ctryid, latlon, or a bbox of at most continent size) or a date range of at most 30 days. Anything wider is sampled automatically to about 200 locations (see sample), because an open-ended multi-year count takes over a minute; pass sample=0 to be refused instead. With a geo scope, year windows up to 5 years run fast.
Prerequisites: None; without a geo scope, windows over 30 days are sampled.
Investigate: Use min_count_pct to keep only locations where the condition is frequent, or min_count 0 with max_count to find where it is rare or never happens.
Augment: Support statements about how common a condition is across a region with avg_count and count_pct.
Request format: HTTP GET, query parameters; criteria is URL-encoded JSON. Example: /api/dailycountbyloc?token=TOKEN&ctryid=IN&year_start=2021&year_end=2025&mm_dd_start=0601&mm_dd_end=0831&criteria=[{"metric":"max_t","lb":35}]
Response format: JSON. results is a list of objects, one per location, highest avg_count first: locid, lat, lon, city_name, country, avg_count, count, days_with_data, count_pct. sample is null unless the result was sampled (then auto is true when the server sampled on its own).
Notes: avg_count is matched days divided by years in the window; count_pct divides by the days that actually had data, so station gaps do not read as absence.

See Percentiles and Z-Scores for the baseline behind percentiles and z-scores.


Request

Parameter Desc Presence Default
token Token Required
criteria JSON array of criteria, all of which must hold, e.g. [{"metric":"max_t","lb":35},{"metric":"obs.dewp.ptile","lb":95}]. Each element: metric (exact name), lb and/or ub (inclusive bounds). At most 8 criteria. Absolute values use the metric name, in natural units: max_t (°C), min_t (°C), obs.temp (°C), obs.dewp (°C), obs.wind (km/h), obs.gust (km/h), max_wind (km/h), obs.rain (mm), obs.snow (mm), obs.wbulb (°C), obs.wbgt (°C), obs.heatindex (°C), obs.rainh (mm). Append .z for the anomaly in standard deviations (-10 to 10) or .ptile for the percentile (1 to 99; 99 means at or beyond the top of the baseline, not a record) among the days within 3 days of the same date in 1991-2020, excluding the day's own year (years after 2020 top it up to 30 years; base_start and base_end give the years used). Both forms: max_t, min_t, obs.temp, obs.dewp, obs.wind, obs.gust, max_wind, obs.wbulb, obs.wbgt, obs.heatindex. Percentile only: obs.rain, obs.snow, obs.rainh. Condition flags take lb 1 (happened) or ub 0 (did not): obs.is_rain, obs.is_snow, obs.is_thunderstorm, obs.is_fog, obs.is_hail. For obs.wbulb, obs.wbgt, obs.heatindex, obs.rainh, .ptile and .z instead rank the day's worst hour among all hours of that week in the same baseline years, not the day among days, so a typical day's peak already ranks high: use 99 or z of 3 for rare days. Locations with under 5 baseline years carry no .z or .ptile. Defaults to max_t between 20 and 30 C when omitted.Optional
ctryid Comma-separated ISO country codes, e.g. US,MX Optional
latlon Centre of an area as 'lat,lon', e.g. 12.97,77.59. Approximate: the area searched is the circle's bounding box rounded out to geohash cells Optional
radius_km Radius in km for latlon, up to 2000 Optional 100
bbox Box as 'lat1,lon1,lat2,lon2': two opposite corners, lon1 the western edge and lon2 the eastern (lon1 greater than lon2 crosses the antimeridian). Approximate, like latlon. Give at most one of ctryid, latlon, bbox; none means global Optional
ymd_start First day YYYYMMDD of a date range of at most 31 days. Use either ymd_start/ymd_end or year_start/year_end/mm_dd_start/mm_dd_end Optional
ymd_end Last day YYYYMMDD of the date range, inclusive Optional
year_start First year of a years x month-day window, YYYY Optional
year_end Last year of the window, YYYY, inclusive Optional
mm_dd_start Window start MMDD (or MM). When later than mm_dd_end the window crosses the year end, e.g. 1201 to 0228, and each season belongs to the year it starts in Optional
mm_dd_end Window end MMDD (or MM), inclusive Optional
min_count Lowest avg_count (days per year) to return, inclusive Optional
max_count Highest avg_count to return, inclusive Optional
min_count_pctLowest count_pct (0-100) to return, inclusive Optional
max_count_pctHighest count_pct (0-100) to return, inclusive Optional
sample Show about this many locations (1 to 2000) for a map view: whole geohash3 cells (about 150 km) are kept or dropped by a fixed hash, so the same cells appear on every request and zooming in only adds points. The share kept is sample divided by the locations in the area, so a wider area keeps a smaller share. Omit for every location. A sampled request may use any time window, even without a geo scope. dailycountbyloc only: a request too wide to count in full (no geo scope and more than 30 days) is sampled to 200 automatically; pass sample=0 to get an error instead Optional
limit Most locations to return, 1 to 10000, highest avg_count first Optional 2000

Response

Parameter Desc Presence Default
criteria_desc The criteria in brief English Yes
time The resolved time window Yes
total_days_per_yearCalendar days in the window per year Yes
num_years Years in the window (1 for a date range) Yes
total_days_found Calendar days across the whole window Yes
count Number of locations returned Yes
truncated True when more locations matched than limit Yes
results Locations, highest avg_count first Yes
locid Location identifier Yes
lat Latitude Yes
lon Longitude Yes
city_name City name Yes
country ISO country code Yes
avg_count Matched days per year Yes
days_with_data Days in the window with the criteria's data Yes
count_pct Matched days as a percentage of days_with_data Yes
sample When sampled: target, p, cells_in_scope, cells_kept, locations_in_scope, locations_kept, and auto true when the server sampled on its own; null otherwiseNo
note Explanation when empty, truncated or sampled No
error Error message when the request could not be served No

/dailycountbyyear

For one location, the number of days per year that met all the criteria within a month-day window, for every year with data, plus a trend line (days per decade) with R squared and p-value.
When to use: Answer 'is this condition becoming more frequent here?', e.g. hot summer days or frost nights per year over decades.
Date format: The window is mm_dd_start and mm_dd_end (MMDD), or the month-days of ymd_start and ymd_end; years are not a filter, every year with data is returned. A window crossing the year end (1201 to 0228) belongs to the year it starts in. Defaults to the month-days of the last 30 days.
Performance: Fast: filtered to one location in the index.
Prerequisites: locid from /api/location (ICAO and WMO ids also resolve).
Investigate: Compare the trend across nearby locations, or across absolute and percentile criteria for the same condition.
Augment: Back 'more frequent than it used to be' claims with slope_per_decade and its p_value.
Request format: HTTP GET, query parameters; criteria is URL-encoded JSON. Example: /api/dailycountbyyear?token=TOKEN&locid=725030_14732&mm_dd_start=1201&mm_dd_end=0228&criteria=[{"metric":"min_t","ub":-10}]
Response format: JSON. years, counts, days_with_data and in_trend are parallel lists of equal length: index i describes the season starting in years[i]. trend is an object (slope_per_decade, r_squared, p_value, n) or null with under 3 usable years.
Notes: Years with under 80% of the window covered are listed (in_trend false) but excluded from the trend.

See Percentiles and Z-Scores for the baseline behind percentiles and z-scores.


Request

Parameter Desc Presence Default
token Token Required
locid Location id from /api/location, e.g. 724940_23234 Required
criteria JSON array of criteria, all of which must hold, e.g. [{"metric":"max_t","lb":35},{"metric":"obs.dewp.ptile","lb":95}]. Each element: metric (exact name), lb and/or ub (inclusive bounds). At most 8 criteria. Absolute values use the metric name, in natural units: max_t (°C), min_t (°C), obs.temp (°C), obs.dewp (°C), obs.wind (km/h), obs.gust (km/h), max_wind (km/h), obs.rain (mm), obs.snow (mm), obs.wbulb (°C), obs.wbgt (°C), obs.heatindex (°C), obs.rainh (mm). Append .z for the anomaly in standard deviations (-10 to 10) or .ptile for the percentile (1 to 99; 99 means at or beyond the top of the baseline, not a record) among the days within 3 days of the same date in 1991-2020, excluding the day's own year (years after 2020 top it up to 30 years; base_start and base_end give the years used). Both forms: max_t, min_t, obs.temp, obs.dewp, obs.wind, obs.gust, max_wind, obs.wbulb, obs.wbgt, obs.heatindex. Percentile only: obs.rain, obs.snow, obs.rainh. Condition flags take lb 1 (happened) or ub 0 (did not): obs.is_rain, obs.is_snow, obs.is_thunderstorm, obs.is_fog, obs.is_hail. For obs.wbulb, obs.wbgt, obs.heatindex, obs.rainh, .ptile and .z instead rank the day's worst hour among all hours of that week in the same baseline years, not the day among days, so a typical day's peak already ranks high: use 99 or z of 3 for rare days. Locations with under 5 baseline years carry no .z or .ptile. Defaults to max_t between 20 and 30 C when omitted.Optional
mm_dd_startWindow start MMDD (or MM) Optional
mm_dd_end Window end MMDD (or MM), inclusive Optional
ymd_start Alternative to mm_dd_start: a day whose MMDD starts the window Optional
ymd_end Alternative to mm_dd_end: a day whose MMDD ends the window Optional

Response

Parameter Desc Presence Default
locid Location identifier Yes
location Location metadata (name, country, lat, lon, elevation) Yes
criteria_desc The criteria in brief English Yes
mm_dd_start Window start, MMDD Yes
mm_dd_end Window end, MMDD Yes
total_days_per_yearCalendar days in the window per year Yes
years Years, contiguous from first to last with data Yes
counts Matched days per year, aligned with years Yes
days_with_data Days with data per year, aligned with years Yes
in_trend Whether each year enters the trend fit Yes
trend slope_per_decade, r_squared, p_value and n; null with under 3 yearsYes
note Explanation when years were excluded or nothing found No
error Error message when the request could not be served No

/dailyweather

One day's weather across an area: every location matching the criteria on that date, with one or more metrics' values, anomalies (z) and percentiles. Observed days, or Weathersight's forecast for the next 7 days. The result is columnar: columns names each position, and every entry of rows is a list aligned with columns (null where absent).
When to use: Map a single day, e.g. 'where was it over 40 C yesterday' or 'where is tomorrow forecast to be unusually humid'.
Date format: date is YYYYMMDD. Observations exist up to yesterday; forecasts from tomorrow to 7 days ahead, and are kept for 31 days.
Performance: Fast: at most one row per location.
Prerequisites: None.
Investigate: Pair with dailycountbyloc to show whether today's extremes are common there.
Augment: Report the hottest or wettest places on the article's date.
Request format: HTTP GET, query parameters. Example: /api/dailyweather?token=TOKEN&date=20261019&metric=max_t,min_t&ctryid=IN&sample=200
Response format: JSON, columnar. columns names each position once; rows is a list of lists, one per location, each aligned with columns, null where absent. columns are locid, city_name, country, lat, lon, final, then per requested metric m: m, m.z (absent for rain and snow) and m.ptile. units maps each metric to its unit. Rows are sorted by the first metric, highest first.
Notes: For src=fcast, lead is days from the forecast's issue to the date. It defaults to date minus today plus 1, clamped to 1 to 7: the newest forecast from yesterday's run (today plus 7 exists only once today's run has landed). Rows with final false are yesterday's preliminary values, before the official daily record merged.

See Percentiles and Z-Scores for the baseline behind percentiles and z-scores.


Request

Parameter Desc Presence Default
token Token Required
date Day YYYYMMDD Required
src obs (observed) or fcast (Weathersight's forecast) Optional obs
lead fcast only: forecast lead in days, 1 to 7 (days from the forecast's issue to date). Defaults to date minus today plus 1, clamped to 1 to 7: the newest forecast from yesterday's run Optional
metric Comma-separated metrics to report, up to 8, e.g. max_t,min_t. Rows are sorted by the first, highest first; a location appears when at least one is present. Valid: max_t, max_wind, min_t, obs.dewp, obs.gust, obs.heatindex, obs.rain, obs.rainh, obs.snow, obs.temp, obs.wbgt, obs.wbulb, obs.wind Optional max_t
criteria JSON array of criteria, all of which must hold, e.g. [{"metric":"max_t","lb":35},{"metric":"obs.dewp.ptile","lb":95}]. Each element: metric (exact name), lb and/or ub (inclusive bounds). At most 8 criteria. Absolute values use the metric name, in natural units: max_t (°C), min_t (°C), obs.temp (°C), obs.dewp (°C), obs.wind (km/h), obs.gust (km/h), max_wind (km/h), obs.rain (mm), obs.snow (mm), obs.wbulb (°C), obs.wbgt (°C), obs.heatindex (°C), obs.rainh (mm). Append .z for the anomaly in standard deviations (-10 to 10) or .ptile for the percentile (1 to 99; 99 means at or beyond the top of the baseline, not a record) among the days within 3 days of the same date in 1991-2020, excluding the day's own year (years after 2020 top it up to 30 years; base_start and base_end give the years used). Both forms: max_t, min_t, obs.temp, obs.dewp, obs.wind, obs.gust, max_wind, obs.wbulb, obs.wbgt, obs.heatindex. Percentile only: obs.rain, obs.snow, obs.rainh. Condition flags take lb 1 (happened) or ub 0 (did not): obs.is_rain, obs.is_snow, obs.is_thunderstorm, obs.is_fog, obs.is_hail. For obs.wbulb, obs.wbgt, obs.heatindex, obs.rainh, .ptile and .z instead rank the day's worst hour among all hours of that week in the same baseline years, not the day among days, so a typical day's peak already ranks high: use 99 or z of 3 for rare days. Locations with under 5 baseline years carry no .z or .ptile. Optional here: omit it to list every location with the metric.Optional
ctryid Comma-separated ISO country codes, e.g. US,MX Optional
latlon Centre of an area as 'lat,lon', e.g. 12.97,77.59. Approximate: the area searched is the circle's bounding box rounded out to geohash cells Optional
radius_km Radius in km for latlon, up to 2000 Optional 100
bbox Box as 'lat1,lon1,lat2,lon2': two opposite corners, lon1 the western edge and lon2 the eastern (lon1 greater than lon2 crosses the antimeridian). Approximate, like latlon. Give at most one of ctryid, latlon, bbox; none means global Optional
sample Show about this many locations (1 to 2000) for a map view: whole geohash3 cells (about 150 km) are kept or dropped by a fixed hash, so the same cells appear on every request and zooming in only adds points. The share kept is sample divided by the locations in the area, so a wider area keeps a smaller share. Omit for every location. A sampled request may use any time window, even without a geo scope. dailycountbyloc only: a request too wide to count in full (no geo scope and more than 30 days) is sampled to 200 automatically; pass sample=0 to get an error instead Optional
limit Most rows to return, 1 to 5000, highest value first Optional 2000

Response

Parameter Desc Presence Default
date The day, YYYYMMDD Yes
src obs or fcast Yes
metrics The metrics reported, in request order Yes
units Unit of each metric Yes
criteria_descThe criteria in brief English Yes
count Number of rows returned Yes
truncated True when more matched than limit Yes
columns Names of each row position: locid, city_name, country, lat, lon, final, then per metric its value (named as the metric, e.g. max_t), its anomaly (max_t.z, absent for rain and snow) and its percentile (max_t.ptile). final is false until the official daily record is merged (obs only)Yes
rows One list per location, aligned with columns Yes
lead Forecast lead used, src=fcast only No
sample When sampled: target, p, cells_in_scope, cells_kept, locations_in_scope, locations_kept, and auto true when the server sampled on its own; null otherwise No
note Explanation when empty, partial or sampled No
error Error message when the request could not be served No

/dailyfcasteval

How good Weathersight's own forecast was at one location, at one or more lead times: a daily series of the observed value, the forecast made lead days earlier, and RMSE, MSE, ACC and ETS over a trailing window ending on each day.
When to use: Answer 'how reliable has the 3-day forecast been here lately?' or 'how fast does skill decay from 1 to 7 days ahead?'. This scores the forecast Weathersight serves (after model choice and bias correction); fcastevalbylocation scores the raw vendor models.
Date format: start_date and end_date are YYYYMMDD, at most 31 days apart (forecast retention). Defaults to the 31 days ending yesterday.
Performance: Fast: two small lookups for one location, whatever the number of lead_times.
Prerequisites: locid from /api/location (ICAO and WMO ids also resolve).
Investigate: Ask for lead_times=1,3,7 at once to see how skill decays.
Augment: Quote recent forecast error at the article's location.
Request format: HTTP GET, query parameters. Example: /api/dailyfcasteval?token=TOKEN&locid=725030_14732&metric=max_t&lead_times=1,3,7&start_date=20261001&end_date=20261020&time_window=5
Response format: JSON. lead_times is the ascending list of leads served (the FIRST axis of every per-lead series); xvals is the list of dates (the SECOND axis). yvals.obs is ONE list aligned with xvals (observations do not depend on lead). yvals.forecast, yvals.rmse, yvals.mse, yvals.acc and yvals.ets are each a list of lists: yvals.rmse[i][j] is the RMSE for lead_times[i] over the window ending on xvals[j]. Every inner list has one entry per xvals date, null where there is no value.
Notes: ETS is reported for rain, snow and hourly rain only, and rain has no ACC (it carries no z-score). Scores need at least 3 days with both a forecast and an observation in the window.


Request

Parameter Desc Presence Default
token Token Required
locid Location id from /api/location, e.g. 724940_23234 Required
metric Metric to score: max_t, max_wind, min_t, obs.dewp, obs.gust, obs.heatindex, obs.rain, obs.rainh, obs.snow, obs.temp, obs.wbgt, obs.wbulb, obs.wind Optional max_t
lead_times Comma-separated forecast leads in days, each 1 to 7, e.g. 1,3,7. De-duplicated and returned in ascending order as the first axis of the per-lead seriesOptional 1
start_date First day YYYYMMDD Optional
end_date Last day YYYYMMDD, inclusive; defaults to yesterday Optional
time_windowTrailing window in days (1 to 31) each day's scores are computed over Optional 5

Response

Parameter Desc Presence Default
location Location metadata Yes
metric The metric scored Yes
lead_times Ascending lead times served: the FIRST axis of every per-lead series Yes
time_windowTrailing window in days Yes
xvals Dates YYYYMMDD: the SECOND axis of every series Yes
yvals obs: one list aligned with xvals. forecast, rmse, mse, acc, ets: one list per lead_times entry, each aligned with xvals. null where absentYes
note Explanation when forecasts or observations are missing No
error Error message when the request could not be served No

/climatetwins

Finds the places whose climate is most like a given location's. Each location has a climate fingerprint built from ERA5 reanalysis monthly climatology for 1996-2025: for each month, typical daily highs and lows, hot-day and cold-night extremes, dew point, rain and snow, plus elevation. Southern-hemisphere seasons are shifted six months so summers line up. rmse measures overall closeness (lower is closer) and is labelled match: strong (under 0.25, months typically within about 1.5 C and rain within about 15%), moderate (under 0.40), weak (under 0.60) or none. acc measures how well the seasonal patterns move together (1 = identical shape).
When to use: Answer 'which cities have a climate like X?', 'where in the southern hemisphere is like X?' or 'is Y's climate similar to X's?'.
Prerequisites: locid from /api/location (ICAO and WMO ids also resolve).
Investigate: Use metric=rmse for overall similarity; metric=acc for places whose seasons rise and fall the same way. Defaults exclude the location's own country and anything within 1000 km.
Augment: Support a 'climate like X' comparison with the twin's rmse, match label and its hottest/coolest month figures.
Notes: Twins are at least 100 km apart from each other (the better-ranked station is kept), so one city never fills several places. Location fields: locid, name, city_name, country, country_name, lat, lon, elevation, hemisphere, zone, nearest_zone, koppen, koppen_name, hottest_month, hottest_max_t, hottest_dewp, coolest_month, coolest_min_t, hot_day_p99, cold_night_p1, prcp_year, wettest_month, driest_month, snow_year, rain_regime. Months are calendar months 1-12, temperatures degrees C, precipitation mm.


Request

Parameter Desc Presence Default
token Token Required
locid Location id from /api/location, e.g. 432950_99999 Required
k Number of twins, 1-50 Optional 5
metric rmse (overall climate), acc (seasonal pattern) or hybrid (rmse penalised where the seasonal patterns disagree)Optional rmse
hemisphere any, same or other (relative to the location) Optional any
other_countryExclude the location's own country Optional true
min_km Exclude twins closer than this many km; 0 to allow neighbours Optional 1000
countries Comma list of country codes to restrict twins to Optional
zone Comma list of zone numbers to restrict twins to Optional
min_match Drop twins below this match label: strong, moderate, weak or none Optional none
overfetch Nearest-neighbour candidates fetched before min_km trimming and hybrid re-scoring, k-500 Optional 50
rmse_cap For metric=acc: drop candidates whose rmse is at or above this Optional 0.6
acc_weight For metric=hybrid: rmse x (1 + acc_weight x (1 - acc)) Optional 0.5

Response

Parameter Desc Presence Default
query The location asked about (location fields) Yes
params The parameters applied, with defaults filled in Yes
twins Ranked twins: rank, location fields, km, rmse, acc, match (and score for metric=hybrid)Yes
count Number of twins returned Yes
n_candidatesLocations that passed the filters Yes
build_id Index build, YYYYMMDDHHMMSS Yes
fingerprint Fingerprint contract version Yes
note Why fewer than k twins came back No
error Error message when the request could not be served No

/climatezones

Lists every location with its climate zone, for maps. Zones group places with similar climate fingerprints (see climatetwins). They come from hierarchical (Ward) clustering refined with k-means into 39 zones, each labelled by its most common Koppen class. Each location also returns its nearest neighbouring zone and up to three example twins from other countries in its zone, after the hemisphere and distance filters.
When to use: Build a climate-zone map: color each location by zone, label it with a twin, and call climatetwins on click for the full ranked list.
Performance: The full catalogue is about 4000 locations; pass twins=0 for metadata only, or zone / countries to fetch a subset. Responses are cached until the index is rebuilt.
Notes: Twins here are chosen by zone membership with build-time ranking (no per-request similarity search); twin_source=both also draws from the nearest zone. twins_found can be below 3 under strict filters. Location fields: locid, name, city_name, country, country_name, lat, lon, elevation, hemisphere, zone, nearest_zone, koppen, koppen_name, hottest_month, hottest_max_t, hottest_dewp, coolest_month, coolest_min_t, hot_day_p99, cold_night_p1, prcp_year, wettest_month, driest_month, snow_year, rain_regime. Months are calendar months 1-12, temperatures degrees C, precipitation mm.


Request

Parameter Desc Presence Default
token Token Required
zone Comma list of zone numbers to return Optional
countries Comma list of country codes to return Optional
twins Twins per location, 0-3 Optional 3
twin_sourcezone (own zone only) or both (own zone, then the nearest zone) Optional both
hemisphere Twin filter: any, same or other (relative to the location) Optional any
min_km Twin filter: Exclude twins closer than this many km; 0 to allow neighboursOptional 1000

Response

Parameter Desc Presence Default
zones Zones: zone, label, family, family_share, color, size, summary, nearest (zone, dist) Yes
locations Locations: location fields plus twins (locid, name, city_name, country, country_name, lat, lon, zone, relation, source, km, and rmse and match for ranked twins) and twins_foundYes
count Number of locations returned Yes
params The parameters applied, with defaults filled in Yes
build_id Index build, YYYYMMDDHHMMSS Yes
fingerprintFingerprint contract version Yes
error Error message when the request could not be served No

Get Token