Data

Weather Data JSON Example

Weather API JSON response example with current conditions, temperature, humidity, wind, and a 3-day forecast. Compatible with OpenWeatherMap and WeatherAPI formats.

{
  "location": {
    "city": "Surat",
    "state": "Gujarat",
    "country": "IN",
    "lat": 21.1702,
    "lon": 72.8311,
    "timezone": "Asia/Kolkata",
    "localTime": "2025-05-24T16:30:00+05:30"
  },
  "current": {
    "tempC": 36.2,
    "tempF": 97.2,
    "feelsLikeC": 39.5,
    "humidity": 62,
    "windKph": 18.5,
    "windDir": "SW",
    "uvIndex": 8,
    "condition": {
      "text": "Partly cloudy",
      "icon": "partly-cloudy-day",
      "code": 1003
    },
    "visibility": 10,
    "pressureMb": 1004,
    "precipMm": 0
  },
  "forecast": [
    {
      "date": "2025-05-24",
      "maxC": 38,
      "minC": 28,
      "avgHumidity": 65,
      "precipMm": 0,
      "condition": "Partly cloudy",
      "chanceOfRain": 10
    },
    {
      "date": "2025-05-25",
      "maxC": 36,
      "minC": 27,
      "avgHumidity": 72,
      "precipMm": 2.4,
      "condition": "Thunderstorm",
      "chanceOfRain": 80
    },
    {
      "date": "2025-05-26",
      "maxC": 33,
      "minC": 26,
      "avgHumidity": 78,
      "precipMm": 5.1,
      "condition": "Heavy rain",
      "chanceOfRain": 95
    }
  ],
  "units": "metric",
  "source": "openweathermap",
  "fetchedAt": "2025-05-24T11:00:00Z"
}

Field Reference

current.tempCrequirednumberCurrent temperature in Celsius. Store metric and convert for display.
current.feelsLikeCoptionalnumberApparent temperature accounting for humidity and wind chill.
current.uvIndexoptionalintegerUV Index: 0-2 low, 3-5 moderate, 6-7 high, 8-10 very high, 11+ extreme.
forecastoptionalarray<object>Daily forecast. Each entry covers midnight-to-midnight in the location's timezone.
unitsrequiredstringUnit system used: metric (°C, km/h) or imperial (°F, mph).
fetchedAtrequiredstring (ISO 8601)When the data was fetched. Used to decide when to refresh and to show data freshness.

Variants

Minimal WidgetJust the current conditions for a compact weather widget.
{
  "city": "Surat",
  "tempC": 36.2,
  "condition": "Partly cloudy",
  "humidity": 62,
  "windKph": 18.5,
  "icon": "partly-cloudy-day"
}

Common Use Cases

  • Weather widget in a dashboard or mobile home screen
  • Agricultural app — rain and temperature threshold alerts
  • Logistics app — weather-aware delivery route planning
weatherforecastAPItemperaturedata

Validate or format this JSON

One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.

Frequently Asked Questions

Store in Celsius (metric) as the source value and derive Fahrenheit for display. Never store the same temperature in multiple units — the derived value will drift if the source is ever corrected.

Current conditions: every 10-30 minutes. Hourly forecast: every hour. Daily forecast: every 3-6 hours. Cache aggressively — weather APIs charge per call and conditions change slowly.

Use null for fields that the station did not report (uvIndex, precipMm). Do not omit the field — the client should know the field exists but has no data, rather than treating missing as 0.

Related JSON Examples