Using Weather API in Python in 6 Lines of Code | OpenWeatherMap API

In this video, we are going to create a python script for dealing with Weather API that returns weather Information for the CITY Passed as an input.

Link to OpenWeatherMap API:
Code :


NV VLOGS says:

But how to code analysis weather of last 3 years using python to display annual and seasonal graphs ..can you make a code for this?

Supriya Veeragandham says:

how to create requests module?? is that a predefined module or user -defined module could you help me out with this we are working on a project

murali krishna dokuparthi says:

Thank you, good info

Brian Chacko says:

Thanks for the code

Abhishek Gandhi says:

They show me same temperature of all city so what can I do
And I want to show temp in Celsius plz help me

Drashya Kushwah says:

Thank you so much… 🙂

Arpit Mishra says:

can we get the temperature of particular dates of certain location?

TheAspirationStudios says:

Hey man, I’m coding something similar and I need some help if you’re available ! thanks

Roshan Sharma says:

I am not able to fetch data in formatted_data in python 3.7… So what did i do..?

abhash ranjan says:

Traceback (most recent call last):
File “C:/Python36/”, line 1, in
import requests
ModuleNotFoundError: No module named ‘requests’

how can i fix this

Arlecchino says:

but what do the ,, .json() ” from requests.get(url).json() ?

Discovery Com says:

Please can you help me to run this code?

Error message :

City Name :london

Traceback (most recent call last):
File “C:/Python27/”, line 4, in
city = input(‘City Name :’)
File ““, line 1, in
NameError: name ‘london’ is not defined

Anees Ansari says:

how do i get the temperature ?

Arlecchino says:

thx a lot

Jason Agyekum says:

Simple and straight to the point. Thanks!


thanks a lot, it’s clear and well explained. Kindly make more videos. Thank you again.

Matthew Henschke says:

Great tutorial, thank you!

Rishabh Jadia says:

how do i get the weather information, coord and main in one dictionary.(eg. weather->main,description & coord->lon,lat & main->humidity,pressure,temperature) instead of print one by one.
Here, get the data of 1 days only. sir, how to get the data of next two days also.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!