Author Topic: XML or JSON source for NWS forecasts?  (Read 1175 times)

0 Members and 1 Guest are viewing this topic.

Offline dnavarrojr

  • Member
  • *
  • Posts: 43
    • Weather Center
XML or JSON source for NWS forecasts?
« on: May 13, 2016, 09:20:38 AM »
Is there an XML or JSON source for NWS forecasts?  Or do you have to "scrape" the info from their HTML?
Dave Navarro, Jr. - The Weather Center
https://weathercenter.us

Offline SLOweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 3456
    • Weatherelement Moline IL
Re: XML or JSON source for NWS forecasts?
« Reply #1 on: May 13, 2016, 09:26:10 AM »
Check out http://graphical.weather.gov/xml/.

Quote
What is NDFD XML?

National Digital Forecast Database (NDFD) Extensible Markup Language (XML) is a service providing the public, government agencies, and commercial enterprises with data from the National Weather Service’s (NWS) digital forecast database.   This service, which is defined in a Service Description Document, provides NWS customers and partners the ability to request NDFD data over the internet and receive the information back in an XML format.  The request/response process is made possible by the NDFD XML Simple Object Access Protocol (SOAP) server.   To see the details of the NDFD XML SOAP service, go to the following URL and click on the NDFDgen or NDFDgenByDay link:

http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: XML or JSON source for NWS forecasts?
« Reply #2 on: May 13, 2016, 09:33:22 AM »

Offline dnavarrojr

  • Member
  • *
  • Posts: 43
    • Weather Center
Re: XML or JSON source for NWS forecasts?
« Reply #3 on: May 13, 2016, 12:08:15 PM »
Thanks so much!  Your tips got me to this:

http://graphical.weather.gov/xml/rest.php

Which led me to find this info for Topeka:

http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?centerPointLat=39.055833&centerPointLon=-95.689444&distanceLat=1.0&distanceLon=1.0&resolutionSquare=50.0&format=24+hourly&numDays=7

The only downside is that you have to pass LAT/LON coordinates, it doesn't work with a zip code.
Dave Navarro, Jr. - The Weather Center
https://weathercenter.us

 

anything