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.
benrobo avatar
weather_forecast_in_the_morning
@benrobo
Cron
An interactive, runnable TypeScript val by benrobo
rochambeau314 avatar
weatherDescription
@rochambeau314
HTTP
An interactive, runnable TypeScript val by rochambeau314
mebmeb avatar
weatherGPT
@mebmeb
Cron
stevekrouse avatar
BIGweather
@stevekrouse
HTTP (preview)
Big Weather Display Displays the current day's weather information BIG so you can see it from far away. Currently it's hardcoded for: prospect heights, brooklyn charts of the temp and % change of precipitation Probably easiest for you to fork it and change it to suit your needs vs making it customizable
jcoleman avatar
weatherGPT
@jcoleman
Cron
stevekrouse avatar
getWeather
@stevekrouse
Script
Get Weather Simple function to get weather data from the free wttr.in service. import { getWeather } from "https://esm.town/v/stevekrouse/getWeather"; let weather = await getWeather("Brooklyn, NY"); console.log(weather.current_condition[0].FeelsLikeF)
flafi87 avatar
periodical_weather_telegram
@flafi87
Cron
An interactive, runnable TypeScript val by flafi87
patrickjm avatar
simpleWeather
@patrickjm
Script
An interactive, runnable TypeScript val by patrickjm
stevekrouse avatar
umbrellaReminder
@stevekrouse
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
flafi87 avatar
weather_forecast_in_the_morning
@flafi87
Cron
An interactive, runnable TypeScript val by flafi87
richardkaplan avatar
getWeather
@richardkaplan
Script
Get Weather Simple function to get weather data from the free wttr.in service. import { getWeather } from "https://esm.town/v/stevekrouse/getWeather"; let weather = await getWeather("Brooklyn, NY"); console.log(weather.current_condition[0].FeelsLikeF)
csshsh avatar
weatherDescription
@csshsh
HTTP
An interactive, runnable TypeScript val by csshsh
cjpais avatar
weather
@cjpais
Script
// Forked from @marcel.weather
chet avatar
getWeather
@chet
Script
Must set process.env.WEATHER_API_KEY for weatherapi.com
marcel avatar
weather
@marcel
Script
An interactive, runnable TypeScript val by marcel
cjpais avatar
simpleWeather
@cjpais
Script
// Forked from @patrickjm.simpleWeather