🌐
National Weather Service
weather.gov › documentation › services-web-api
API Web Service
The new API will use headers to modify the version and format of the response. Every request, either by browser or application, sends header information every time you visit any website. For example, a commonly used header called "UserAgent" tells a website what type of device you are using so it can tailor the best experience for you. No private information is shared in a header, and this is a standard practice for all government and private sites.
🌐
Python Snacks
pythonsnacks.com › p › a-guide-on-using-the-national-weather-service-api-with-python
A guide on using the National Weather Service API with Python
July 12, 2025 - Now, integrating it with Python, you’re going to want to use the requests package. A stripped down version of what this looks like without error handling, etc may be something such as: import requests headers = {'User-Agent' : 'myapp'} endpoint = 'https://api.weather.gov/alerts?area={state}' response = requests.get(endpoint, headers = headers) data = response.json() # `features` contains the data we want.
Discussions

Best API or DB for historical weather?
ERA5: https://www.ecmwf.int/en/forecasts/dataset/ecmwf-reanalysis-v5 More on reddit.com
🌐 r/meteorology
11
3
June 23, 2025
Looking for archive data of US weather.gov warnings
Iowa State Mesonet has an archive of lots of NWS data https://mesonet.agron.iastate.edu/vtec/search.php More on reddit.com
🌐 r/gis
5
6
January 1, 2025
What will happen to all previous climate data if the NOAA gets shut down?
Anecdotally, there are also a lot of states that have their own hosting of climate data and/or local station measurements (I've only retrieved COOP from state / university sites). But also, I feel like there would be a lot of people scrambling to preserve the data and paying money to do so - myself and my company included, because I rely heavily on meteorological data for my work. More on reddit.com
🌐 r/weather
59
81
January 21, 2025
Can anyone recommend free databases for hourly weather data?
All data collected by NOAA are free. Archived surface observations are available from NCEI. First page results if you search for something like "NOAA hourly weather data archive". More on reddit.com
🌐 r/meteorology
6
3
November 17, 2024
🌐
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.

🌐
Weather-gov
weather-gov.github.io › api › general-faqs
api.weather.gov: General FAQs
The API won’t support the existing JSON format, but take a look at the new JSON format as described earlier. We think you’ll agree that it’s much simpler to use in your application. You can continue to use the existing legacy services on forecast.weather.gov, but we encourage you to move to the API when you can.
🌐
Eli the Computer Guy
elithecomputerguy.com › 2023 › 09 › national-weather-service-rest-api-with-python
National Weather Service REST API with Python – Eli the Computer Guy
import requests ip_address = requests.get('http://api.ipify.org').text print(ip_address) geo_data = requests.get(f'http://ip-api.com/json/{ip_address}').json() print(geo_data) lat = geo_data['lat'] lon = geo_data['lon'] print(lat) print(lon) response = requests.get(f'https://api.weather.gov/alerts?point={lat},{lon}').json() print(f"Alerts: {len(response['features'])}") file = open('alert.html', 'w') for x in response['features']: file.write(f"<h1>{x['properties']['headline']}</h1>") file.write(f"<h3>{x['properties']['areaDesc']}</h3>") file.write(f"<p>{x['properties']['description']}</p>") file.close() API · Python ·
🌐
National Weather Service
weather.gov › documentation
Documentation
Weather.gov > Documentation · Services · API Web Service · Alerts Web Service · Technical Bulletins · This page provides documentation for the National Weather Service. Please select the documentation that you are looking for using the menu above or the list below.
🌐
GitHub
github.com › paulokuong › noaa
GitHub - paulokuong/noaa: NOAA Weather Service Python SDK
{'@id': 'https://api.weather.gov/gridpoints/OKX/39,36', '@type': 'wx:Gridpoint', 'updateTime': '2020-11-24T08:51:35+00:00', 'validTimes': '2020-11-24T02:00:00+00:00/P7DT5H', 'elevation': {'unitCode': 'wmoUnit:m', 'value': 24.9936}, 'forecastOffice': 'https://api.weather.gov/offices/OKX', 'gridId': 'OKX', 'gridX': '39', 'gridY': '36', 'temperature': {'uom': 'wmoUnit:degC', 'values': [{'validTime': '2020-11-24T02:00:00+00:00/PT1H', 'value': 5.555555555555555}, {'validTime': '2020-11-24T03:00:00+00:00/PT1H', 'value': 6.111111111111111}, {'validTime': '2020-11-24T04:00:00+00:00/PT1H', 'value': 5.5
Starred by 250 users
Forked by 53 users
Languages   Python 100.0% | Python 100.0%
🌐
Ua-libraries-research-data-services
ua-libraries-research-data-services.github.io › UALIB_ScholarlyAPI_Cookbook › src › python › nws.html
National Weather Service (NWS) API in Python — Scholarly API Cookbook
For live and up-to-date weather data, conditions, forecasts, and alerts in U.S. locations, visit the National Weather Service website. The /alerts endpoint returns all alerts issued for a given location or area. The example below uses the point parameter to find all alerts for a pair of ...
Find elsewhere
🌐
Readthedocs
nwsapy.readthedocs.io › en › latest › index.html
NWSAPy: A Pythonic Implementation of the National Weather Service API — NWSAPy documentation
NWSAPy (APy, for short) is designed to be a pythonic approach to utilizing the National Weather Service API.
🌐
Justin Braun
justinbraun.com › home › nws api › python 101: pulling the weather forecast with the nws api
Python 101: Pulling the weather forecast with the NWS API – Justin Braun
September 19, 2023 - We’re going to make use of the Requests library in Python. This makes the calls to the API URL and the response back from the server. ... Let’s establish the URL for the API that we’ll use to get the forecast information for our zone.
🌐
PyPI
pypi.org › project › weather-gov
weather-gov · PyPI
A Python wrapper for the National Weather Service's Weather.gov API
      » pip install weather-gov
    
Published   May 30, 2022
Version   0.2
🌐
Omi AI
omi.me › blogs › api-guides › how-to-fetch-weather-alerts-using-national-weather-service-api-in-python
How to Fetch Weather Alerts Using National Weather Service API in Pyth – Omi AI
November 12, 2024 - Optionally, consider using Python's ... endpoint provides current weather alerts information. The URL format is: https://api.weather.gov/alerts...
🌐
GitHub
github.com › weather-gov › api
GitHub - weather-gov/api: Community discussion and documentation for the NWS API · GitHub
This repository is here to serve as a meeting place for developers in the general public to interface with each other and the NWS API development team. This will allow us to gather better feedback on user needs and respond more quickly to concerns. You can start reading our documentation at https://weather-gov.github.io/api
Starred by 296 users
Forked by 15 users
Languages   HTML 51.4% | SCSS 47.7% | Ruby 0.9%
🌐
PyPI
pypi.org › project › nwsapy
nwsapy · PyPI
NWS-APy (APy for short) takes a pythonic approach to retrieving (GET) and organizing data using the National Weather Service API (found here: https://www.weather.gov/documentation/services-web-api#/)
      » pip install nwsapy
    
Published   Mar 12, 2022
Version   1.0.3
🌐
GitHub
github.com › weather-gov › api › discussions › 708
Made a wrapper API around weather gov · weather-gov/api · Discussion #708
import json import requests def get_weather_data_by_location(lat, lng): url = f'https://weathermateplus.com/api' params = { 'lat': lat, 'lng': lng } response = requests.get(url, params=params) return response.json() def get_weather_data_search(addy): url = f'https://weathermateplus.com/api/location' params = { 'address': addy } response = requests.get(url, params=params) return response.json() def pretty_print(j): print(json.dumps(j, indent=4)) if __name__ == '__main__': latitude = 46.4884768 longitude = -120.18902 search_term = 'Richland, WA' d1 = get_weather_data_by_location(latitude, longitude) d2 = get_weather_data_search(search_term) pretty_print(d1) pretty_print(d2)
Author   weather-gov
🌐
Adafruit Playground
adafruit-playground.com › u › CGrover › pages › weather-gov-a-truly-free-weather-api
weather.gov: A Truly Free Weather API | Adafruit Playground
July 26, 2024 - Up to this point, we've been using a browser to tour weather.gov and to find our local observation station. Now let's incorporate the API query URL into a CircuitPython project.
🌐
Zenoss
zenpacks.zenoss.io › zdk › start › http › nws-api
NWS API - ZenPack Documentation
https://api.weather.gov/stations/KDFW/observations/latest ... { "@context": [ "https://raw.githubusercontent.com/geojson/geojson-ld/master/contexts/geojson-base.jsonld", { "wx": "https://api.weather.gov/ontology#", "s": "https://schema.org/", "geo": "http://www.opengis.net/ont/geosparql#", ...
🌐
Weather-gov
weather-gov.github.io › api
api.weather.gov: Community discussion and documentation for the US National Weather Service API
Welcome! This GitHub Pages site is here to answer some of the most frequently asked questions about the National Weather Service public data API (api.weather.gov).