Build a simple weather app using Open Weather Map using vanilla Javascript. (Part 1)

Zac Smith
3 min readMay 27, 2019

Using an API can be a lot of fun and take your personal and professional projects to a new level. This simple tutorial is not for the professional developer, rather for the new developer that wants to learn how to make a simple, interesting web app that makes use of the openweathermap.org API.

As a disclaimer, I am not teaching how to build a web app, rather I am trying to help the new developer, or those new to APIs understand how they work and apply some practical project direction.

Steps to adding the API to your app!

Sign up for a free account at: https://openweathermap.org. This can be a little confusing, simply sign up and verify your email. Note that it will take a few hours before your account is active so your app-id will not work right off .

When you are ready to get your API URL, there are a couple of things you should know. When you log in, click on the API link and then choose the ‘Current weather data -> API Doc’. The subscribe link will just take you to the sign up process.

You will see an example that looks like this:

API Doc for OpenWeatherMap.org

Notice the API call example, api.openweathermap.org/data/2.5/weather?q={city name}. If you were to grab this and try to use the London UK listed…

--

--