Back to APIs list

Weather API examples & templates

Use these vals as a playground to view and fork Weather API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
Weather
ViolinMimo
Weather
An interactive, runnable TypeScript val by ViolinMimo
Cron
weatherDashboard
poorvis885
weatherDashboard
🌤️ AI Weather Dashboard An interactive AI-powered weather dashboard that provides real-time weather updates and fun, insightful weather descriptions using GPT-4o. 🚀 Features 🌍 Real-time Weather Data – Fetches temperature, wind speed, and direction. 🤖 AI Weather Insights – Generates creative weather descriptions. 🎨 Dynamic UI Themes – Refreshing color schemes for better aesthetics. 🔍 Location Search – Search for any city worldwide. 🛠️ Tech Stack Frontend: React 18, TailwindCSS APIs: Open-Meteo, OpenAI GPT-4o Hosting: ESM-based module imports
HTTP
weatherDashboard
dhashnamoorthy
weatherDashboard
Weather Dashboard
HTTP
weatherGPT
ljus
weatherGPT
WeatherGPT Transformed multiple vals to a single project. This val uses the script service in the project askSMHI .
HTTP
summarize_solar_weather
davincidreams
summarize_solar_weather
An interactive, runnable TypeScript val by davincidreams
HTTP
getWeather
stevekrouse
getWeather
Remix of: sdan/getWeather
Script
periodical_weather_telegram
flafi87
periodical_weather_telegram
An interactive, runnable TypeScript val by flafi87
Cron
evaltownWorker
deepmojo
evaltownWorker
Remix of: maxm/evaltownWorker
HTTP
weatherForecastDashboard
bhavana
weatherForecastDashboard
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
umbrellaReminder
stevekrouse
umbrellaReminder
☔️ Umbrella reminder if there's rain today Setup Fork this val 👉 https://val.town/v/stevekrouse.umbrellaReminder/fork Customize the location (line 8). You can supply any free-form description of a location. ⚠️ Only works for US-based locations (where weather.gov covers). How it works Geocodes an free-form description of a location to latitude and longitude – @stevekrouse.nominatimSearch Converts a latitude and longitude to weather.gov grid – @stevekrouse.weatherGovGrid Gets the hourly forecast for that grid Filters the forecast for periods that are today and >30% chance of rain If there are any, it formats them appropriately, and sends me an email
Cron
weatherGPT
stevekrouse
weatherGPT
Cron
getWeather
escalona
getWeather
Remix of: stevekrouse/getWeather
Script
simpleWeather
patrickjm
simpleWeather
An interactive, runnable TypeScript val by patrickjm
Script
runGetWeather
charmaine
runGetWeather
In the following example code, we are using getWeather from stevekrouse/getWeather . It uses the free wttr.in service to get weather data. Add these lines to your code Replace Brooklyn, NY with your location Click Run Now View the output in the val’s logs import { getWeather } from "https://esm.town/v/stevekrouse/getWeather"; let weather = await getWeather("Brooklyn, NY"); console.log(weather.current_condition[0].FeelsLikeF)
Cron
weather_forecast_in_the_morning
flafi87
weather_forecast_in_the_morning
An interactive, runnable TypeScript val by flafi87
Cron
WundergroundStationDisplayV2
Croniac
WundergroundStationDisplayV2
Remix of: Croniac/WundergroundStationDisplay
HTTP