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.
outdoorFairWeather
tyler71
outdoorFairWeather
Upstream /kingishb/blackLobster Why this one? Takes in a query string of lat, lon and timezone, returns a list of good biking days as an API response. Query Params: lat lon tz Example query: ?lat=47.606209&lon=-122.332069&tz=America/Los_Angeles Example response: { "status": "success", "message": "Retrieved Times", "data": { "biking": [ { "start": "Wed 11:00 AM", "end": "Wed 6:00 PM" }, { "start": "Thu 10:00 AM", "end": "Thu 6:00 PM" }, { "start": "Fri 9:00 AM", "end": "Fri 6:00 PM" }, { "start": "Sat 8:00 AM", "end": "Sat 6:00 PM" }, { "start": "Sun 9:00 AM", "end": "Sun 6:00 PM" }, { "start": "Mon 10:00 AM", "end": "Mon 6:00 PM" } ] } }
HTTP
weatherman
AIPROJOSE
weatherman
An interactive, runnable TypeScript val by AIPROJOSE
Cron
weatherDashboard
rishabhdamelay
weatherDashboard
Weather
HTTP
weatherForecast
gabrieledarrigo
weatherForecast
Daily forecast weather condition for Rho, MI ☀️🌤️☁️🌧️
Cron
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
getWeather
geoffreylitt
getWeather
Remix of: stevekrouse/getWeather
Script
WundergroundStationDisplayV2
Croniac
WundergroundStationDisplayV2
Remix of: Croniac/WundergroundStationDisplay
HTTP