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.
Enyewashebir avatar
Enyewashebir
weatherDashboard
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
stevekrouseTest avatar
stevekrouseTest
weatherAdviceEndpoint
HTTP
This endpoint provides clothing advice based on the current temperature for a given location.
0
stevekrouseTest avatar
stevekrouseTest
weatherAdvice
HTTP
This function provides clothing advice based on the current temperature for a given location.
0
stevekrouseTest avatar
stevekrouseTest
getWeather
HTTP
This endpoint fetches the current weather for a given location using the Open-Meteo API. Pass in a location object with latitude and longitude.
0
flafi87 avatar
flafi87
Brenna_Weather_Dashboard
HTTP
@jsxImportSource https://esm.sh/preact
0
stevekrouse avatar
stevekrouse
getWeather
Script
Forked from sdan/getWeather
4
flafi87 avatar
flafi87
periodical_weather_telegram
Cron
An interactive, runnable TypeScript val by flafi87
0
deepmojo avatar
deepmojo
evaltownWorker
HTTP
Forked from maxm/evaltownWorker
0
bhavana avatar
bhavana
weatherForecastDashboard
HTTP
@jsxImportSource https://esm.sh/react@18.2.0
0
stevekrouse avatar
stevekrouse
umbrellaReminder
Cron
☔️ 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
9
stevekrouse avatar
stevekrouse
weatherGPT
Cron
4
escalona avatar
escalona
getWeather
Script
Forked from stevekrouse/getWeather
0
patrickjm avatar
patrickjm
simpleWeather
Script
An interactive, runnable TypeScript val by patrickjm
0
charmaine avatar
charmaine
runGetWeather
Cron
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)
0
flafi87 avatar
flafi87
weather_forecast_in_the_morning
Cron
An interactive, runnable TypeScript val by flafi87
0
Croniac avatar
Croniac
WundergroundStationDisplayV2
HTTP
Forked from Croniac/WundergroundStationDisplay
0