Looking at the api documentation found HERE and HERE, you are calling the /gridpoints/{wfo}/{x},{y}/forecast/hourly call which will return the hourly weather forecast for the specified weather office {wfo} at the specified x-y coordinates. You can find a list of the weather offices HERE. Finding the X-Y coordinates for the weather offices may be a bit more tedious to find on the web.

If you happen have access to the GPS coordinates that you are working with you can use the /points/{x},{y} API call to get the information on the closest weather office to then pass to the /gridpoints/{wfo}/{x},{y}/forecast/hourly API call.

The flow of your application can look something like this:

Step 1: Get your map Geo coordinates. In my case, I am at 35,-106

Step 2: Make a call to the weather.gov API: https://api.weather.gov/points/35,-106. You will be presented with some JSON data. Look for the cwa key in the properties object. That will be the forecast office to pass into the next api call. In my case, the key is ABQ. You also need to find the gridX and gridY keys in the properties. These are the XY coordinates that you will use for the {X},{Y} parameters in the API call. In my case X = 121 and Y = 112.

Step 3: Make the final call to the weather.gov API: https://api.weather.gov/gridpoints/ABQ/121,112/forecast/hourly

Answer from Joshua Espana on Stack Overflow
🌐
Weather-gov
weather-gov.github.io › api › general-faqs
api.weather.gov: General FAQs
api.weather.gov represents the public face of the next generation of data services from the National Weather Service.
🌐
National Weather Service
weather.gov › documentation
Web Services 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.
Discussions

json - How do I get the hourly forecast from api.weather.gov for Texas stations or zones or offices or gridpoints or anything else? - Stack Overflow
I have one gridpoint working for Indiana. https://api.weather.gov/gridpoints/IND/56,65/forecast/hourly More on stackoverflow.com
🌐 stackoverflow.com
Weather.gov API wrapper
Please be careful to cache the results if you will be using it to serve multiple people or making frequent requests. More on reddit.com
🌐 r/Python
22
66
May 29, 2022
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 28, 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
🌐
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 297 users
Forked by 15 users
Languages   HTML 51.4% | SCSS 47.7% | Ruby 0.9%
🌐
Hacker News
news.ycombinator.com › item
The US government has a public, free API for getting weather data, and it will s... | Hacker News
March 1, 2023 - I never understood why people go through all these other API's that consistently get shut down, cancelled or become pay for use eventually · See here for notes on other unsupported providers: https://github.com/vsergeev/briefsky#unsupported-providers
🌐
GitHub
github.com › weather-gov › api › discussions › 558
Retrieving Current Temps via API · weather-gov/api · Discussion #558
If you call /points/XXXXXX,YYYYYYY, with the lat/lon, the properties/observationStations key provides another API call, /gridpoints/AA,BB/stations, that returns a list of weather stations near that point, sorted by distance. You can take a station from that list, call /stations/STATIONID/observations, and that gives you the weather at that station.
Author   weather-gov
🌐
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).
🌐
Aviation Weather
aviationweather.gov › data › api
Data API
REST API endpoint are accessible at addresses under /api/data as outlined in the schema information. For example METARs are found at https://aviationweather.gov/api/data. Most requests require query parameters in order to specify constraints of the data being requested.
Find elsewhere
Top answer
1 of 2
5

Looking at the api documentation found HERE and HERE, you are calling the /gridpoints/{wfo}/{x},{y}/forecast/hourly call which will return the hourly weather forecast for the specified weather office {wfo} at the specified x-y coordinates. You can find a list of the weather offices HERE. Finding the X-Y coordinates for the weather offices may be a bit more tedious to find on the web.

If you happen have access to the GPS coordinates that you are working with you can use the /points/{x},{y} API call to get the information on the closest weather office to then pass to the /gridpoints/{wfo}/{x},{y}/forecast/hourly API call.

The flow of your application can look something like this:

Step 1: Get your map Geo coordinates. In my case, I am at 35,-106

Step 2: Make a call to the weather.gov API: https://api.weather.gov/points/35,-106. You will be presented with some JSON data. Look for the cwa key in the properties object. That will be the forecast office to pass into the next api call. In my case, the key is ABQ. You also need to find the gridX and gridY keys in the properties. These are the XY coordinates that you will use for the {X},{Y} parameters in the API call. In my case X = 121 and Y = 112.

Step 3: Make the final call to the weather.gov API: https://api.weather.gov/gridpoints/ABQ/121,112/forecast/hourly

2 of 2
4

As long as you have the latitude/longitude of the location you want the forecast for, then:

  1. Get the point metadata from https://api.weather.gov/points/{lat},{lon}
  2. Follow the link in the forecastHourly property to get the forecast

This is preferable to constructing the URL as in the other answer, as your program won't break if the URL scheme changes in the future.

🌐
Weather
api.weather.gov
Weather API - Weather.gov
An official website of the United States government
🌐
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 › gridpoints
api.weather.gov: Gridpoint Frequently Asked Questions
July 4, 2019 - Below is a list of layers that the API exposes. ... heatIndex: Heat index. This is the apparentTemperature data with values filtered out that are below the threshold of the heat index calculation. windChill: Wind chill. This is the apparentTemperature data with values filtered out that are above the threshold of the wind chill calculation. ... This data is not numeric, but an array. Each array element is a JSON object representing a decoded NDFD GRIB weather string.
🌐
GitHub
github.com › weather-gov › api › discussions
weather-gov/api · Discussions
Explore the GitHub Discussions forum for weather-gov api. Discuss code, ask questions & collaborate with the developer community.
Author   weather-gov
🌐
Zenoss
zenpacks.zenoss.io › zdk › start › http › nws-api
NWS API - ZenPack Documentation
{ "@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#", "unit": "http://codes.wmo.int/common/unit/", "@vocab": "https://api.weather.gov/ontology#", "geometry": { "@id": "s:GeoCoordinates", "@type": "geo:wktLiteral" }, "city": "s:addressLocality", "state": "s:addressRegion", "distance": { "@id": "s:Distance", "@type": "s:QuantitativeValue" }, "bearing": { "@type": "s:QuantitativeValue" }, "value": { "@id": "s:value" }, "unit
🌐
National Climatic Data Center
ncdc.noaa.gov › cdo-web › webservices › v2
Web Services API (version 2) Documentation | Climate Data Online (CDO) | National Climatic Data Center (NCDC)
This API is for developers looking to create their own scripts or programs that use the CDO database of weather and climate data. An access token is required to use the API, and each token will be limited to five requests per second and 10,000 requests per day.
🌐
National Weather Service
weather.gov › idp › apiobsscn
API Observations Reduction
Weather.gov > Integrated Dissemination Program > API Observations Reduction · ACTIVE ALERTS · FORECAST MAPS · RADAR · RIVERS, LAKES, RAINFALL · AIR QUALITY · SATELLITE · CURRENT · After implementation the API will only serve observations in the following bounding boxes.