weatherAI.io

API documentation

One endpoint turns the weather into a decision for an activity at a place and date.

Quick start

  1. Create a free account, verify your email and copy your API key from the dashboard.
  2. Call https://api.weatherai.io/v1/decide with a location and an activity.
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.weatherai.io/v1/decide?location=London&activity=running&when=tomorrow"

Authentication

Send your key in the X-API-Key header (Authorization: Bearer wai_… also works). ?key= works too, but headers keep keys out of logs and browser history. Keys start with wai_. You can create up to 5 keys and revoke any of them in the dashboard; a revoked key stops working at once. Keep keys on your server; never put them in public web pages or apps.

GET /v1/decide

ParameterRequiredDescription
locationyesCity or town name, lat,lon, UK postcode, US zip code, Canadian postal code or IP address. q also works.
activityyesOne of the activities. Common aliases such as run, bike, bbq, wedding and laundry are accepted.
whennotoday (default), tomorrow or a date yyyy-MM-dd up to 13 days ahead, in the location's local time.
from, tonoOnly consider hours from from (0–23) and before to (1–24), local time. Example: from=17&to=21 for an evening run.
unitsnometric (default) or imperial for the figures in data.
detailnohourly adds an hour-by-hour score with the main issue for each hour.

Response

{
  "location": { "name": "London", "region": "City of London, Greater London", "country": "United Kingdom",
                "lat": 51.52, "lon": -0.11, "tz_id": "Europe/London", "localtime": "2026-10-17 21:04" },
  "activity": "running",
  "date": "2026-10-18",
  "verdict": "good",
  "score": 82,
  "best_windows": [ { "start": "2026-10-18 07:00", "end": "2026-10-18 10:00", "score": 91 } ],
  "risks": [ { "type": "rain", "severity": "high", "from": "2026-10-18 14:00", "to": "2026-10-18 18:00",
               "detail": "1.2 mm of rain" } ],
  "summary": "Good conditions for a run in London; best 07:00–10:00. Watch for rain from 14:00.",
  "data": { "temp_min": 8.1, "temp_max": 14.0, "feels_like_min": 6.0, "feels_like_max": 12.5,
            "rain_chance_max": 70, "precip_total_mm": 4.8, "wind_max_kph": 30, "gust_max_kph": 45,
            "uv_max": 3, "cloud_avg": 52, "humidity_avg": 78, "sunrise": "07:24", "sunset": "18:07",
            "units": "metric" },
  "billing": { "charged": "free", "cost_gbp": "0.0000", "free_remaining": 993, "balance_gbp": "4.2000" }
}
FieldMeaning
verdictgreat (85+), good (70+), fair (55+), poor (35+) or avoid.
score0–100: how good the best opportunity on that date is.
best_windowsUp to 3 runs of good hours (score 60+) at least as long as the activity needs, best first. Empty when nothing is good enough.
risksWhat lowers the score and when: rain, thunder, snow, wind, gusts, heat, cold, UV, cloud, humidity, visibility, moon; plus official weather alerts. Severity low, moderate or high (alerts use the issuer's severity).
summaryOne sentence ready to show to a user or read out by an assistant.
dataKey figures for the hours considered. Stargazing adds the moon phase, illumination and moonrise/moonset.
billingWhether the call was free or paid, what it cost, free calls left this month and your credit balance.

GET /v1/best-day

Which of the next days is best? One call compares up to 14 days for an activity and ranks them. It costs one call, however many days it compares.

ParameterRequiredMeaning
location, activityyesAs for /v1/decide.
daysnoHow many days to compare, starting today: 1 to 14. Default 7.
from, to, unitsnoAs for /v1/decide, applied to every day (e.g. evenings only: from=17&to=22).
GET https://api.weatherai.io/v1/best-day?location=London&activity=bbq&days=7

{
  "location": { "name": "London", "country": "United Kingdom", … },
  "activity": "outdoor-event",
  "days_checked": 7,
  "summary": "Best day for an outdoor event in London: Saturday 17 October (great, 92), 12:00–19:00.",
  "best": { "date": "2026-10-17", "weekday": "Saturday", "verdict": "great", "score": 92,
            "best_window": { "start": "2026-10-17 12:00", "end": "2026-10-17 19:00", "score": 92 },
            "top_risks": [], "summary": "Great conditions for an outdoor event in London; best 12:00–19:00." },
  "days": [ { "date": "2026-10-14", "weekday": "Wednesday", "verdict": "fair", "score": 61, … }, … ],
  "billing": { … }
}

Activities

activityWhat it looks forShortest windowHours considered
runningOutdoor run or jog: comfortable temperature, little rain, light wind, not too much sun.1 h05:00–22:00
cyclingRoad or leisure cycling: wind and gusts matter most, then rain and temperature.2 h05:00–21:00
outdoor-eventSeveral hours outdoors with guests: dry, warm enough, not too windy, in daylight.4 h08:00–23:00
beachSunbathing and swimming: warm, sunny, dry and not too windy. High UV is reported as a risk, not a reason to stay away.3 h07:00–20:00
laundry-dryingWashing on the line: dry air, a breeze, some warmth and no rain.4 h06:00–21:00
stargazingClear, dark skies at night: little cloud, a small or set moon, good visibility and no rain.2 h18:00–06:00 next day
hikingSeveral hours on foot in daylight: dry, mild, good visibility, no storms. Mountain weather can differ from the forecast for the nearest town.3 h06:00–20:00
golfFour or more hours on the course: dry, light wind, comfortable temperature. Any thunder means off the course.4 h06:00–21:00
tennisAn hour or two on an outdoor court: dry courts and little wind matter most.1 h07:00–22:00
dog-walkingA walk with a dog: heat is the main danger (dogs overheat and pavements get hot), then storms and heavy rain.1 h05:00–23:00
gardeningA few hours in the garden: mild, mostly dry and not too windy.2 h07:00–20:00
fishingHours by the water: light wind, no storms (a rod attracts lightning). Light rain and cloud are fine.3 h04:00–22:00
sailingNeeds a breeze of about 12 to 35 km/h, no squalls or storms, and good visibility. Not a marine forecast: check official marine and tide information before going out.3 h07:00–20:00
drone-flyingShort flights in daylight: low wind and gusts, no rain or snow, good visibility, batteries above about 5°C. Always follow local drone rules.1 h06:00–21:00
exterior-paintingPainting walls, fences or woodwork outside: air at 10°C or more, dry for hours, humidity under about 70% and little wind. Check the paint's own limits.5 h07:00–19:00
concrete-pourA pour and the first hours of curing: air above 5°C (no frost), no rain, not too hot or windy (fast drying cracks the surface).6 h06:00–19:00
roofingWork on roofs and scaffolding: wind and gusts first, then rain, ice and storms.4 h06:00–20:00
crop-sprayingSpraying crops: a light, steady breeze (about 3 to 15 km/h; dead calm risks drift in an inversion), no rain soon after, not hot. Always follow the product label.2 h05:00–21:00
outdoor-workA shift outdoors: heat stress first, then storms, cold, ice and heavy rain.4 h06:00–20:00
drivingTime on the road: ice, snow, fog, heavy rain and storm-force gusts. Temperature itself does not matter.2 h05:00–23:00

The list is also available as JSON, free and without a key: GET https://api.weatherai.io/v1/activities.

How scoring works

Every forecast hour starts at 100 and loses points for each thing outside the activity's comfortable range: the "feels like" temperature, the chance and amount of rain, thunderstorms, snow, wind and gusts, UV, cloud, humidity, visibility, darkness (or daylight, for stargazing), moonlight, ice (near-freezing with rain or snow, for driving, roofing and walking) and a minimum air temperature for work that needs it (concrete, paint). Hours scoring 60 or more are good; runs of good hours at least as long as the activity needs become best_windows. The rules are deliberately simple and the same for every customer, so answers are explainable.

Hours that have already passed at the location are never recommended.

Errors

Errors return JSON {"error": {"code": "…", "message": "…"}}. Only a successful 200 answer is charged.

HTTPcodeMeaning
400invalid_location, invalid_activity, invalid_when, invalid_time_range, invalid_daysFix the request.
401missing_key, invalid_keySend a valid key.
402no_creditThis month's free calls are used and your credit is empty: top up.
403email_not_verified, account_suspendedVerify your email or contact support.
404location_not_foundWe couldn't find that place.
422no_hours_leftNo forecast hours left for that date and time range (for example, late evening for "today").
429rate_limitedSlow down (see limits below).
503weather_unavailableTemporary problem on our side. Retry shortly.

Billing and limits

  • 1,000 free calls every calendar month (UTC), then £0.0012 per call from prepaid credit, VAT included. See pricing.
  • /v1/decide and /v1/best-day cost one call each when they succeed, and so do the MCP tools decide and best_day. Everything else is free.
  • Every answer carries headers X-Free-Calls-Remaining, X-Credit-Balance-GBP and X-Call-Cost-GBP.
  • Up to 20 requests per second per account.
  • Answers for the same place are cached for up to 10 minutes on our side; caching on yours for 10–30 minutes is fine and saves calls.

Other endpoints (free)

GET /v1/activitiesThe activities you can ask about. No key needed.
GET /v1/usageFree calls used and left this month, credit balance and how many paid calls it covers. Needs your key.
GET /openapi.jsonOpenAPI 3 description of the API.
GET /healthReturns ok when the API is up.

MCP server (AI agents)

weatherAI.io is also an MCP server, so assistants and agents can use it as tools without any code. Server URL:

https://api.weatherai.io/mcp

It speaks the Streamable HTTP transport. Authenticate with your API key as the X-API-Key header (or Authorization: Bearer wai_…). For apps that only take a URL, add it as ?key=wai_…, and treat that URL as a secret.

ToolWhat it doesCost
decideVerdict, score, best windows, risks and summary for one activity, place and day.1 call
best_dayCompares the next days (up to 14) and picks the best.1 call
list_activitiesThe activities the tools understand.free
get_usageFree calls left this month and credit balance.free

Claude Code

claude mcp add --transport http weatherai https://api.weatherai.io/mcp --header "X-API-Key: wai_YOUR_KEY"

Claude (claude.ai and the desktop app)

Settings → Connectors → Add custom connector, with the URL https://api.weatherai.io/mcp?key=wai_YOUR_KEY.

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "weatherai": {
      "url": "https://api.weatherai.io/mcp",
      "headers": { "X-API-Key": "wai_YOUR_KEY" }
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "weatherai": {
      "type": "http",
      "url": "https://api.weatherai.io/mcp",
      "headers": { "X-API-Key": "wai_YOUR_KEY" }
    }
  }
}

Menus and file locations change between versions of these apps; if a step doesn't match, look for "MCP servers" or "connectors" in the app's settings.

Without MCP

Give your agent the OpenAPI spec or this function definition. The summary field is meant to be repeated to the user as it is.

{
  "name": "weather_decision",
  "description": "Decide whether and when to do an outdoor activity at a place and date. Returns verdict, score 0-100, best time windows, risks and a one-line summary.",
  "parameters": {
    "type": "object",
    "properties": {
      "location": { "type": "string", "description": "City, 'lat,lon', postcode or zip code" },
      "activity": { "type": "string", "enum": ["running", "cycling", "outdoor-event", "beach", "laundry-drying", "stargazing", "hiking", "golf", "tennis", "dog-walking", "gardening", "fishing", "sailing", "drone-flying", "exterior-painting", "concrete-pour", "roofing", "crop-spraying", "outdoor-work", "driving"] },
      "when": { "type": "string", "description": "today, tomorrow or yyyy-MM-dd (up to 13 days ahead)" }
    },
    "required": ["location", "activity"]
  }
}