Getting live weather data from OpenWeatherMap
In this article we're going to use the OpenWeatherMap free API to pull weather forecasts for the next 7 days. OpenWeatherMap has a number of API endpoints, we're going to use One Call which returns a forecasts for the next hour, 48 hours, and 7 days.
This API method returns a lot of data, we've used the SyncWith Google Sheets Addon to select just the data we wanted, which is inside the
daily
field, and inside there we took most of the data from the temp
and feels_like
fields, deleting the rest of the data that we didn't need.Step 1: Get an API Key
First, you'll need an API key from OpenWeatherMap, to do that go and sign up for a free account.
Paste your API key into the box below labelled
appid
Step 2: Get the coordinates of the place you'd like the weather for
Get the latitude and longitude of the place you'd like to get the weather for, I did this following the instructions
Get the coordinates of a place
from google here: https://support.google.com/maps/answer/18539Copy and paste the numeric values into the
lat
and lon
boxes below.Step 3: Customize (Optional)
By default I've set the units parameter to
imperial
which will get you temperature in Fahrenheit, you can change it to metric
to get temperature in CelsiusStep 4: Get your weather data
Once you've filled in the values below, click Submit to get your data!
Daily weather
Please fill in any necessary fields and click Run.
GET
Preview
View the API data, get a live Google Sheet dashboard
dt | temp.day | temp.min | temp.max | temp.night | temp.eve | temp.morn | feels_like.day | feels_like.night | feels_like.eve | feels_like.morn |
---|---|---|---|---|---|---|---|---|---|---|
Get a live Google Sheet
Export your data to a google sheet, with the SyncWith Addon, or download to CSV
Automatically updated
Schedule your data to update hourly or daily
Add data sources
Import additional data from other apps
Build reports & dashboards
Easily build live reports within Google Sheets