If you do onto the Odin project there is a lesson within the js course that gives instructions, no payment required and only took me about five minutes to get. Answer from Benand2 on reddit.com
🌐
Reddit
reddit.com › r/learnpython › best weather api
r/learnpython on Reddit: Best Weather API
August 24, 2023 - Sometimes we have paid to upgrade for a month but then fell back to free. www.visualcrossing.comThe support is really good even for the free tier and the query constructor tool is very helpful for building URLs to the API. ... Hmm. Comment history is nothing but shilling for visualcrossing. ... Sorry that is all we use after Dark Sky. Just answering the question on python and weather.
🌐
Reddit
reddit.com › r/learnprogramming › is there a free and accurate weather api
r/learnprogramming on Reddit: Is there a free and accurate weather API
December 29, 2024 -

I tried OpenWeatherMap but I need to put a credit card in and I don't have that right now. I also tried weatherstack but the info it gave me was wrong. Meteo wants a free trial.

Are there alternative weather API that are free and accurate without having put credit details in?

🌐
Reddit
reddit.com › r/learnpython › free weather apis for easy use in python?
Free weather APIs for easy use in Python? : r/learnpython
October 17, 2024 - https://www.weather.gov/documentation/services-web-api · This will give you free API , TRY IT · Reply · reply · Top 1% Rank by size · r/learnpython • · r/learnpython · Subreddit for posting questions and asking for general advice about all topics related to learning python.
🌐
Reddit
reddit.com › r/learnpython › need a bit of help with a weather app, please
r/learnpython on Reddit: Need a bit of help with a weather app, please
December 3, 2025 -

I’m trying to build a small weather-tracking app and went looking for an API. Found Meteomatics, lots of good reviews, looks solid. But I can’t reach their dev team and I can’t even sign up to get API access.

So… I’m kinda stuck.

Anyone got any advice or alternatives?

🌐
Reddit
reddit.com › r/webdev › free weather api for non-commercial use
r/webdev on Reddit: Free weather API for non-commercial use
July 23, 2022 - Hi! First time posting here. I created a simple free weather API. It does not require an API key for non-commercial use. I have a build a simple API…
🌐
Reddit
reddit.com › r/programming › looking for a free weather api with forecasts
r/programming on Reddit: Looking for a free weather API with forecasts
May 25, 2020 - I don't have any concrete numbers, but Business Insider has done an article taking about the international users they have from different parts of the world: https://www.businessinsider.co.za/yr-2018-2-3 and https://www.newsinenglish.no/2013/02/26/weather-site-takes-on-the-world/ If you want to do some "local testing" for your area to see if its accurate, the same data set is available in app form through their app called "Yr" or their web site at https://yr.no/ ... IndieHackers is a subreddit focused on people who bootstrap their way to success by building products. ... Subreddit for posting questions and asking for general advice about all topics related to learning python.
🌐
Reddit
reddit.com › r/python › weather.gov api wrapper
r/Python on Reddit: Weather.gov API wrapper
May 29, 2022 -

Hey there r/Python. Watched a random netflix show about the government and realized that Weather.gov is a free, mostly untapped resource for accurate weather data that doesn't try and sell your data when you use it like The Weather Channel, Accuweather, or Weatherbug. After looking for a bit I couldn't find a package that utilized weather.gov so I decided to write it myself.

PyPi : https://pypi.org/project/weather-gov/0.1/

Source: https://github.com/spectrshiv/python-weather_gov

I've been writing python for internal use for quite a while, but this is my first real public project I've actually put some thought into and followed through on. I appreciate any feedback you guys have.

Licensed under GPLv3.

Find elsewhere
🌐
Reddit
reddit.com › r/learnprogramming › what are some cool apis you can use for free? (e.g. weather api)
r/learnprogramming on Reddit: What are some cool APIs you can use for free? (e.g. Weather API)
December 21, 2022 -

I think one of the big issues when learning to program is the absolut lack of data and for most semi-useful tools you need at least some of. Do you know of any cool websites that provide real world data / lots of data that can be easily accessed with an API (JSON) call?

🌐
Reddit
reddit.com › r/pythonlearning › simple python weather app
r/PythonLearning on Reddit: Simple Python Weather App
August 20, 2025 - Good point 👍 I’ll look into using a .env file to keep the API key safe instead of hardcoding it. Thanks for the tip! ... There is a python package to help with that.
🌐
Reddit
reddit.com › r/learnprogramming › weather api that can fetch information about specific day in the future by city name?
r/learnprogramming on Reddit: Weather API that can fetch information about specific day in the future by city name?
May 27, 2022 -

I'm building a weather forecast personal project and need an API that I can enter "New York" and "06-06-2022" and get the weather forecast for that day (preferable to have a free plan).

So far, I have only found APIs that can get data from specific days in the future but expect latitude and longitude as parameter, or the other way around, where it accepts city name but you can't specify a future date.

Thanks in advance!

🌐
Reddit
reddit.com › r/python › open weather map project | free to use code | help improve code
r/Python on Reddit: Open Weather Map Project | Free to use code | Help improve code
August 11, 2023 -

Save this in a file ex filename.py I would suggest using VSCode.

Get you API key for free from https://openweathermap.org/api (This is not an advertisement this is a fun project) Replace the value of variable "Key" with the key that you got in double or single quotes.

Then make another file named Functions.py exactly if you really want to change the name, go to the 4th line (Including Spaces) and change the "import Functions as Geocode" to "import {name here} as Geocode"

Here have the code:

____________________________________________________________________________________________________________

filename.py

import requests
import Functions as Geocode
# File check functions


# Variables
Key = 'Your key goes here'

# Geocoding Setup
countryCode = input("Enter the country code of your country (IN for India):")
Zip = input("Enter the zip code of your city:")
City = Geocode.City(Key, countryCode, Zip)
lat = Geocode.Latitude(Key, countryCode, Zip)
lon = Geocode.Longitude(Key, countryCode, Zip)

CurrAirPol = f'http://api.openweathermap.org/data/2.5/air_pollution?lat={lat}&lon={lon}&appid={Key}'

AQI = Geocode.CurrentAirPollution(CurrAirPol)
print(AQI)

End of Code here!

____________________________________________________________________________________________________________

Functions.py

import requests


def City(Key, countryCode, Zip):
    Geocoding = f'http://api.openweathermap.org/geo/1.0/zip?zip={Zip},{countryCode}&appid={Key}'
    response = requests.get(Geocoding).json()
    print(f"Are you trying to access the data of {response['name']}")
    return response['name']


def Latitude(Key, countryCode, Zip):
    Geocoding = f'http://api.openweathermap.org/geo/1.0/zip?zip={Zip},{countryCode}&appid={Key}'
    response = requests.get(Geocoding).json()
    return response['lat']


def Longitude(Key, countryCode, Zip):
    Geocoding = f'http://api.openweathermap.org/geo/1.0/zip?zip={Zip},{countryCode}&appid={Key}'
    response = requests.get(Geocoding).json()
    return response['lon']


def CurrentAirPollution(Path):
    response = requests.get(Path).json()
    AQI = response['list'][0]['main']['aqi']

    CO = response['list'][0]['components']['co']
    print(f'Carbon Monoxide = {CO}')

    NO = response['list'][0]['components']['no']
    print(f'Nitric Oxide = {NO}')

    NO2 = response['list'][0]['components']['no2']
    print(f'Nitrogen Dioxide = {NO2}')

    O3 = response['list'][0]['components']['o3']
    print(f'Trioxygen = {O3}')

    SO2 = response['list'][0]['components']['so2']
    print(f'Sulfur Dioxide = {SO2}')

    PM = response['list'][0]['components']['pm2_5']
    print(f'Dangerous: PM2.5 = {PM}')

    PM10 = response['list'][0]['components']['pm10']
    print(f'Dangerous: PM10, Particulate Matter = {PM10}')

    NH3 = response['list'][0]['components']['nh3']
    print(f'Azane = {NH3}')

    if AQI >= 1 and AQI <= 3:
        return f"Bad Air Quality, Air Quality = {AQI}"
    elif AQI >= 4 and AQI <= 6:
        return f"Moderate Air Quality, Air Quality = {AQI}"
    elif AQI >= 7 and AQI <= 9:
        return f"High Air Quality, Air Quality = {AQI}"
    else:
        return f"Very High Air Quality, Air Quality = 10"

End of Code

____________________________________________________________________________________________________________

Note: This will display all of the things like how much carbon monoxide and stuff, I am not good at chemistry so I googled all of the chemical names sorry ):

Hope this helps you all beginners to getting a good idea of how much pain I felt making this CurrentAirPollution Functions cus too many errors started coming but I came up with this. Please don't be arrogant like me I suffered a lot, 2 hours of work );

Send help

Regards.

🌐
Reddit
reddit.com › r/webdev › best weather forecast api
r/webdev on Reddit: Best weather forecast API
July 28, 2024 -

Hi y'all, I'm planning to develop a nautic web application which would require a reliable weather forecast API, but its for a friend and I'm not looking for a super-scalable/pricy option.

I would like to get some recomendations on a reliable and cheap (or free, due that I'd do low requests pet day/month)

I've seen windycom API's but the free version is not for production (not real data) and the paid one is ~1k€/yr

Thanks 4ur time.

🌐
Reddit
reddit.com › r/webdev › any reliable, free weather api's?
r/webdev on Reddit: Any Reliable, free weather API's?
October 15, 2018 -

I'm in need of an API that will provide current weather conditions (static location- UK). I had my heart set on Weather Underground but that's not going to be possible for much longer.

I'm still in the process of looking for myself but thought I'd ask, for my recommendations too.

UPDATE:

I've looked at the sites mentioned below and stuck with: Darksky.net, API, their API provides 1,000 free calls per day. (Suggested by Steeze206)

Then for icons I used - https://erikflowers.github.io/weather-icons/ (suggested by Gizm083)

🌐
Reddit
reddit.com › r/learnprogramming › best free weather api for mapping europe and america?
r/learnprogramming on Reddit: Best Free Weather API for Mapping Europe and America?
March 5, 2025 - ... Most weather API providers have free plans. If you're still looking for a provider, I’d recommend you to try our Meteosource Weather API as well — it includes the parameters you mentioned.
🌐
Reddit
reddit.com › r/selfhosted › for anyone procrastinating on finding another weather data source before the dark sky shutdown next week, i put together a drop-in compatible/ free/ documented api called pirate weather.
r/selfhosted on Reddit: For anyone procrastinating on finding another weather data source before the Dark Sky shutdown next week, I put together a drop-in compatible/ free/ documented API called Pirate Weather.
March 26, 2023 -

Ever since Dark Sky announced they were shutting down, I wanted to find a drop-in compatible replacement for the half dozen things around my house that relied on weather data. Moreover, weather forecast are mostly run by governments, I wanted a data source that made this data much easier to use. The combination of these two goals was Pirate Weather. It’s designed to be 1:1 compatible with Dark Sky, and since every processing step is documented, you can work out exactly where the data is coming from and what it means.

All the processing scripts are in the GitHub repository. Since releasing it last year, the API has come a long way, squashing a ton of bugs and improving stability. The community feedback has been invaluable, and I’ll be continuing to make improvements to it over time, with better text summaries coming next!

As part of this, I also put together a repository with a python notebook to grab a weather data variable directly from NOAA and process it, which might also be useful to some applications here!

🌐
Reddit
reddit.com › r/webdev › best free weather api? (also lol at openweathermap's pricing)
r/webdev on Reddit: Best free weather API? (also LOL at openWeatherMap's pricing)
November 19, 2020 -

I found a decent free tier API that gives some hourly forecast data (openWeatherMap.com). It's pretty decent, but I started looking at their pricing for paid plans, and like, holy FUCK the "developer" plan is $180 per month! for a weather api? with limited endpoints? Why would anyone pay that much?

What's your favorite free weather API?

EDIT: I ended up going with weatherapi.com. Their endpoints are much more detailed than other options and offer 3 days of hour-by-hour forecast data on free tier, which is best in class.

🌐
Reddit
reddit.com › r/learnpython › help with weather app project
r/learnpython on Reddit: Help with weather app project
February 5, 2023 -

Hello all,

I decided to try my hand at a weather app to familiarize myself with API interactions, JSON data and the end goal is to make this data accessible through a gui. I have currently made my API get request and after much trial and error, can isolate the json data values into variables.

I am making this post looking for some advice as to the best way to organize this data. Ultimately I would like to be able to input the city and date/time into the gui and have it output results such as max/min temps and real feel. I know that once I can have it output those few results adding more will be simple.

My real question is, what is the best way to organize the data I extract from the json with that functionality in mind?

import requests
import json
import datetime
import pprint

payload = {'lat': 43.94, 'lon': -70.89, 'appid': 'api_key' , 'units': 'imperial'}
api_url = 'http://api.openweathermap.org/data/2.5/forecast'
r = requests.get(api_url, params=payload)
w_data = r.json()
r_dict_f = json.dumps(w_data, indent=2)

results = []
loc = []
dates = []
highs = []
lows = []

city = w_data['city']['name']

for item in w_data['list']:
date = item['dt_txt']
dates.append(date)
results.append(date)
low = item['main']['temp_min']
lows.append(low)
results.append(low)
high = item['main']['temp_max']
highs.append(high)
results.append(high)
data = {
'date': dates,
'city': city,
'weather': {
'highs': highs,
'lows': lows
}
}
pprint.pprint(data)

So right now I'm just trying to print out the data. It seems like I am organizing it poorly so I am reaching out for some advice.

Please do not write any code for me. If you could just explain what I might want to do next to work toward my goal I would appreciate it. I find that I learn better when I have a direction to move in and do the research myself.

Thank you!

Top answer
1 of 2
4
What you'll want to do is create a new class to hold your data. Then, you can serialize your object into json, and deserialize it into an object. This post from stackoverflow should get you started. Let me know how it goes, and feel free to ask me some more questions here if you have trouble getting it to work. Edit: also, you definitely have the right mentality for learning how to code :-) Edit2: it seems like that post kind of covers it... Should have read it more thoroughly before posting. What you should probably do is look into how to set up the json encoder and make a class serializeable. What that stackoverflow post does is gives you a serialization method instead of making your class serializeable. For the learns, I'd recommend making your class serializeable. It's all about the json module. But, either way should work.
2 of 2
2
I'd go with 2 classes intitially. One for the api and one for each api record. You will get something very expandable and modular with just 2 classes. # Imagine the API returns the following format # {temperature: 40, humidity: 80, timestamp: 1675627897} class WeatherResult: def __init__(self, temperature=None. humidity=None, timestamp=None): self.temperature = temperature self.humidity = humidity self.timestamp = timestamp @property def temperature_celcius(self): # write your own conversion :D return convert_f_to_c(self.temperature) def as_dict(self): return { 'temperature': self.temperature_celcius, 'humidity': self.humidity 'timestamp': self.timestamp } class WeatherAPI: api_url = 'http://api.openweathermap.org/data/2.5/forecast' def __init__(self, lat, lng): self.lat = lat self.lng = lng self.records = list() def get_record(self): payload = {'lat': self.lat, 'lng': self.lng} req = requests.get(api_url, params=payload) data_as_dict = req.json() self.results.append(WeatherResult(**data)) def to_json(self): return json.dumps([record.to_dict() for record in self.records]) This is a contrived example (respecting your request for no code) that implements one class for managing the API and retaining a list of results and one class for structuring and working with the returned data. Edit: u/wutzvill has pointed you in the right direction.