WeatherSpotTry Free
v2 · Current

API Reference

Two endpoints. Coordinates or city name in. AI-enriched weather prose out. Designed for Home Assistant, AI agents, IoT dashboards, and anyone tired of parsing raw JSON.

Base URLhttps://xojr-u3gp-4r20.n2.xano.io/api:z3ww5TpX

Authentication

All API endpoints require your API key in the X-Api-Key header. Your key is issued when you subscribe to Pro, Ultra, or Agentic.

GET /forecast_v2?lat=51.0447&lon=-114.0719&units=metric HTTP/1.1
Host: xojr-u3gp-4r20.n2.xano.io
X-Api-Key: YOUR_API_KEY

GET /forecast_v2

GET/forecast_v2

Returns the full AI-enriched weather payload for the given coordinates. Coordinates are snapped to an H3 Resolution 6 cell (~3.2 km) for cache lookup — exact coordinates are never stored. Cache-first: ~80% of requests return in under 50 ms at zero AI cost.

Query Parameters

ParameterTypeRequiredDescription
latdecimalrequiredLatitude (WGS84). e.g. 51.0447
londecimalrequiredLongitude (WGS84). e.g. -114.0719
unitsstringrequired"metric" (°C, km/h) or "imperial" (°F, mph)
sourcestringoptionalOptional. Logged for analytics. e.g. "home_assistant"

Example Request

curl "https://xojr-u3gp-4r20.n2.xano.io/api:z3ww5TpX/forecast_v2?lat=51.0447&lon=-114.0719&units=metric" \
  -H "X-Api-Key: YOUR_API_KEY"

GET /forecast_city

GET/forecast_city

Accepts a city name instead of coordinates. Geocodes via OpenWeather Geocoding API, then returns the same AI-enriched payload as /forecast_v2. Ideal for voice assistants, chatbots, and dashboards where the user supplies a place name. Results are H3-cached the same way — repeat calls for the same city area are instant.

For best results, include a country or state code: Calgary, CA or Portland, OR, US. Requires Pro or higher — not available on the free tier.

Query Parameters

ParameterTypeRequiredDescription
citystringrequiredCity name, optionally with region/country. e.g. "Calgary, CA" or "London, GB"
unitsstringoptional"metric" (default) or "imperial"

Example Request

curl "https://xojr-u3gp-4r20.n2.xano.io/api:z3ww5TpX/forecast_city?city=Calgary%2C+CA&units=metric" \
  -H "X-Api-Key: YOUR_API_KEY"

Additional Response Fields

The response includes two extra fields not present in /forecast_v2:

{
  "success": true,
  "city_resolved": "Calgary, Alberta, CA",
  "resolved_coordinates": {
    "lat": 51.0447,
    "lon": -114.0719
  },
  "message": { ... }
}

Response Schema

Both endpoints return the same message object. All responses are application/json.

Current conditions

{
  "message": {
    "location_name": "Calgary, Alberta",
    "current": {
      "weather": {
        "main": "Clouds",
        "description": "Overcast clouds"
      },
      "context": {
        "vibe": "A crisp, grey autumn morning with a northwest chill that makes the 4°C feel closer to 1°C.",
        "clothing_hint": "Warm mid-layer and a wind-resistant shell. Gloves optional but appreciated."
      }
    }
  }
}

Telegram-optimised strings

Pre-formatted for TTS. Numbers written as words. No special characters.

{
  "message": {
    "telegram": {
      "temp_metric": "4°C",
      "temp_imperial": "39°F",
      "briefing": "Four degrees Celsius, feels like one. Overcast skies and a northwest wind at twelve kilometres per hour...",
      "morning": "A cold, grey start to the day. Bundle up before heading out.",
      "commute": "Roads are dry but the windchill is a factor on exposed intersections.",
      "tomorrow": "A milder system moves in overnight — expect temperatures closer to ten degrees by midday.",
      "seven_day_summary": "A brief warm spell midweek gives way to another cold front by the weekend."
    }
  }
}

Hourly forecast (next 12 hours)

{
  "message": {
    "next_12h": [
      {
        "time": "2026-08-14T15:00",
        "temp_c": 18.4,
        "weather_description": "Partly cloudy",
        "wind_speed_kmh": 14,
        "wind_direction": "NW",
        "humidity_pct": 52
      }
    ]
  }
}

7-day daily forecast

{
  "message": {
    "daily": [
      {
        "date": "2026-08-14",
        "weather": { "main": "Clouds" },
        "temp_max_c": 22,
        "temp_min_c": 11,
        "temp_max_f": 72,
        "temp_min_f": 52,
        "precip_mm": 0
      }
    ]
  }
}

Air quality

{
  "message": {
    "air_quality": {
      "us_aqi": 24,
      "aqi_category": "Good",
      "pm25": 4.2,
      "pm10": 8.1,
      "ozone": 61.3,
      "no2": 5.8,
      "pollen": {
        "alder": 0,
        "birch": 0,
        "grass": 12,
        "ragweed": 0
      }
    }
  }
}

Cache Headers

Every response includes cache diagnostic headers:

HeaderValuesMeaning
X-CacheHIT · STALE · MISSWhether this response came from cache
X-H3-Cellhex stringH3 Resolution 6 cell your request was snapped to
X-Latency-MsintegerTotal server-side latency in milliseconds

Error Responses

400Missing or invalid parameters
401Missing or invalid API key
402Trial expired — subscribe to continue
404City not found — try a more specific name (e.g. 'Portland, OR, US')
429Rate limit exceeded for your tier
500Upstream weather API or AI error

Try it live

Enter a city name or coordinates and see a real AI-enriched response — no account or API key needed.

Open Playground →

Ready to integrate?

Start with the Telegram bot for a free 30-day trial, then upgrade to Pro or Ultra for REST API access.