Test Mode 1

The parameter 'test' by itself parrots that value back. This can be used to verify that you are able to successfully connect to the API.

Example Link:

http://api.parfait.snarkybox.com/forecast?test=true

What that link returns will look like this if viewed in a browser:

true

Test Mode 2

Adding the parameters 'lat' and 'lon' will dump the forecast xml sent by NOAA, plus parrot back a table of all the possible parameters and their current values in a simple HTML web page. Any Latitude/Longitude recognized by NWS as being inside of the US can be used. The values for the 'lat' and 'lon' parameters can be found at the MapQuest Latitude/Longitude Finder website: http://developer.mapquest.com/web/tools/lat-long-finder.

Example Link:

http://api.parfait.snarkybox.com/forecast?test=true&lat=33.94&lon=-118.4

What that link returns will look like this if viewed in a browser:


<?xml version="1.0" encoding="ISO-8859-1"?>
<dwml xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:noNamespaceSchemaLocation="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
  <head>
    <product concise-name="dwmlByDay" operational-mode="developmental" srsName="WGS 1984">
      <creation-date refresh-frequency="PT1H">2014-11-16T06:10:54-08:00</creation-date>
      <category>current observations and forecast</category>
    </product>
    <source>
      <production-center>Los Angeles/Oxnard, CA</production-center>
      <credit>http://www.wrh.noaa.gov/lox</credit>
      <more-information>http://www.nws.noaa.gov/forecasts/xml/</more-information>
    </source>
  </head>
  <data type="forecast">
    <location>
      <location-key>point1</location-key>
      <description>Los Angeles International Airport, CA</description>
      <point latitude="33.94" longitude="-118.39"/>
      <city state="CA">Los Angeles International Airport</city>
      <height datum="mean sea level">98</height>
    </location>
    <moreWeatherInformation applicable-location="point1">http://forecast.weather.gov/MapClick?lat=33.94&amp;lon=-118.39</moreWeatherInformation>
    <time-layout time-coordinate="local" summarization="12hourly">
      <layout-key>k-p6h-n1-1</layout-key>
      <start-valid-time>2014-11-16T08:00:00-08:00</start-valid-time>
      <end-valid-time>2014-11-22T18:00:00-08:00</end-valid-time>
    </time-layout>
    <time-layout time-coordinate="local" summarization="12hourly">
      <layout-key>k-p6h-n1-2</layout-key>
      <start-valid-time>2014-11-16T08:00:00-08:00</start-valid-time>
      <end-valid-time>2014-11-22T18:00:00-08:00</end-valid-time>
    </time-layout>
    <time-layout time-coordinate="local" summarization="12hourly">
      <layout-key>k-p12h-n13-1</layout-key>
      <start-valid-time period-name="Today">2014-11-16T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Tonight">2014-11-16T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Monday">2014-11-17T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Monday Night">2014-11-17T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Tuesday">2014-11-18T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Tuesday Night">2014-11-18T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Wednesday">2014-11-19T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Wednesday Night">2014-11-19T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Thursday">2014-11-20T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Thursday Night">2014-11-20T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Friday">2014-11-21T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Friday Night">2014-11-21T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Saturday">2014-11-22T06:00:00-08:00</start-valid-time>
    </time-layout>
    <time-layout time-coordinate="local" summarization="12hourly">
      <layout-key>k-p24h-n7-1</layout-key>
      <start-valid-time period-name="Today">2014-11-16T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Monday">2014-11-17T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Tuesday">2014-11-18T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Wednesday">2014-11-19T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Thursday">2014-11-20T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Friday">2014-11-21T06:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Saturday">2014-11-22T06:00:00-08:00</start-valid-time>
    </time-layout>
    <time-layout time-coordinate="local" summarization="12hourly">
      <layout-key>k-p24h-n6-2</layout-key>
      <start-valid-time period-name="Tonight">2014-11-16T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Monday Night">2014-11-17T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Tuesday Night">2014-11-18T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Wednesday Night">2014-11-19T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Thursday Night">2014-11-20T18:00:00-08:00</start-valid-time>
      <start-valid-time period-name="Friday Night">2014-11-21T18:00:00-08:00</start-valid-time>
    </time-layout>
    <parameters applicable-location="point1">
      <temperature type="maximum" units="Fahrenheit" time-layout="k-p24h-n7-1">
        <name>Daily Maximum Temperature</name>
        <value>74</value>
        <value>77</value>
        <value>80</value>
        <value>71</value>
        <value>67</value>
        <value>68</value>
        <value>68</value>
      </temperature>
      <temperature type="minimum" units="Fahrenheit" time-layout="k-p24h-n6-2">
        <name>Daily Minimum Temperature</name>
        <value>53</value>
        <value>55</value>
        <value>55</value>
        <value>58</value>
        <value>57</value>
        <value>56</value>
      </temperature>
      <probability-of-precipitation type="12 hour" units="percent" time-layout="k-p12h-n13-1">
        <name>12 Hourly Probability of Precipitation</name>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
        <value xsi:nil="true"/>
      </probability-of-precipitation>
      <weather time-layout="k-p12h-n13-1">
        <name>Weather Type, Coverage, Intensity</name>
        <weather-conditions weather-summary="Sunny"/>
        <weather-conditions weather-summary="Mostly Clear"/>
        <weather-conditions weather-summary="Sunny"/>
        <weather-conditions weather-summary="Partly Cloudy"/>
        <weather-conditions weather-summary="Mostly Sunny"/>
        <weather-conditions weather-summary="Partly Cloudy"/>
        <weather-conditions weather-summary="Mostly Sunny"/>
        <weather-conditions weather-summary="Partly Cloudy"/>
        <weather-conditions weather-summary="Mostly Sunny"/>
        <weather-conditions weather-summary="Mostly Cloudy"/>
        <weather-conditions weather-summary="Slight Chc Rain"/>
        <weather-conditions weather-summary="Mostly Cloudy"/>
        <weather-conditions weather-summary="Mostly Sunny"/>
      </weather>
      <conditions-icon type="forecast-NWS" time-layout="k-p12h-n13-1">
        <name>Conditions Icon</name>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/few.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/nfew.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/few.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/nsct.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/sct.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/nsct.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/sct.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/nsct.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/sct.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/nbkn.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/ra.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/nbkn.png</icon-link>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/sct.png</icon-link>
      </conditions-icon>
      <hazards time-layout="k-p6h-n1-1">
        <name>Watches, Warnings, and Advisories</name>
        <hazard-conditions>
          <hazard headline="Red Flag Warning">
            <hazardTextURL>http://forecast.weather.gov/showsigwx?warnzone=CAZ041&amp;warncounty=CAC037&amp;firewxzone=CAZ241&amp;local_place1=Los+Angeles+International+Airport+CA&amp;product1=Red+Flag+Warning</hazardTextURL>
          </hazard>
        </hazard-conditions>
      </hazards>
      <hazards time-layout="k-p6h-n1-2">
        <name>Watches, Warnings, and Advisories</name>
        <hazard-conditions>
          <hazard headline="Wind Advisory">
            <hazardTextURL>http://forecast.weather.gov/showsigwx?warnzone=CAZ041&amp;warncounty=CAC037&amp;firewxzone=CAZ241&amp;local_place1=Los+Angeles+International+Airport+CA&amp;product1=Wind+Advisory</hazardTextURL>
          </hazard>
        </hazard-conditions>
      </hazards>
      <hazards time-layout="">
        <name>Watches, Warnings, and Advisories</name>
        <hazard-conditions>
          <hazard headline="Hazardous Weather Outlook">
            <hazardTextURL>http://forecast.weather.gov/showsigwx?warnzone=CAZ041&amp;warncounty=CAC037&amp;firewxzone=CAZ241&amp;local_place1=Los+Angeles+International+Airport+CA&amp;product1=Hazardous+Weather+Outlook</hazardTextURL>
          </hazard>
        </hazard-conditions>
      </hazards>
      <wordedForecast time-layout="k-p12h-n13-1" dataSource="loxNetcdf" wordGenerator="markMitchell">
        <name>Text Forecast</name>
        <text>Sunny, with a high near 74. North northeast wind around 5 mph becoming west southwest in the afternoon. </text>
        <text>Mostly clear, with a low around 53. North northwest wind around 5 mph becoming calm  after midnight. </text>
        <text>Sunny, with a high near 77. North northeast wind 5 to 10 mph becoming west in the afternoon. </text>
        <text>Partly cloudy, with a low around 55. West wind 5 to 10 mph becoming north northeast in the evening. </text>
        <text>Mostly sunny, with a high near 80. North northeast wind around 5 mph becoming east in the morning. </text>
        <text>Partly cloudy, with a low around 55.</text>
        <text>Mostly sunny, with a high near 71.</text>
        <text>Partly cloudy, with a low around 58.</text>
        <text>Mostly sunny, with a high near 67.</text>
        <text>Mostly cloudy, with a low around 57.</text>
        <text>A slight chance of rain.  Mostly cloudy, with a high near 68.</text>
        <text>Mostly cloudy, with a low around 56.</text>
        <text>Mostly sunny, with a high near 68.</text>
      </wordedForecast>
    </parameters>
  </data>
  <data type="current observations">
    <location>
      <location-key>point1</location-key>
      <point latitude="33.93806" longitude="-118.38889"/>
      <area-description>Los Angeles, Los Angeles International Airport, CA</area-description>
      <height datum="mean sea level" height-units="feet">125</height>
    </location>
    <moreWeatherInformation applicable-location="point1">http://www.wrh.noaa.gov/total_forecast/other_obs?wfo=lox&amp;zone=CAZ041</moreWeatherInformation>
    <time-layout time-coordinate="local">
      <layout-key>k-p1h-n1-1</layout-key>
      <start-valid-time period-name="current">2014-11-16T06:53:00</start-valid-time>
    </time-layout>
    <parameters applicable-location="point1">
      <temperature type="apparent" units="Fahrenheit" time-layout="k-p1h-n1-1">
        <value>58</value>
      </temperature>
      <temperature type="dew point" units="Fahrenheit" time-layout="k-p1h-n1-1">
        <value>55</value>
      </temperature>
      <humidity type="relative" time-layout="k-p1h-n1-1">
        <value>90</value>
      </humidity>
      <weather time-layout="k-p1h-n1-1">
        <name>Weather Type, Coverage, Intensity</name>
        <weather-conditions weather-summary="Partly Cloudy"/>
        <weather-conditions>
          <value>
            <visibility units="statute miles">10.00</visibility>
          </value>
        </weather-conditions>
      </weather>
      <conditions-icon type="forecast-NWS" time-layout="k-p1h-n1-1">
        <name>Conditions Icon</name>
        <icon-link>http://forecast.weather.gov/images/wtf/medium/sct.png</icon-link>
      </conditions-icon>
      <direction type="wind" units="degrees true" time-layout="k-p1h-n1-1">
        <value>0</value>
      </direction>
      <wind-speed type="gust" units="knots" time-layout="k-p1h-n1-1">
        <value>NA</value>
      </wind-speed>
      <wind-speed type="sustained" units="knots" time-layout="k-p1h-n1-1">
        <value>0</value>
      </wind-speed>
      <pressure type="barometer" units="inches of mercury" time-layout="k-p1h-n1-1">
        <value>30.13</value>
      </pressure>
    </parameters>
  </data>
</dwml>

http://forecast.weather.gov/MapClick?lat=33.94&lon=-118.4&FcstType=dwml

lat lon layer periods test version
33.94 -118.4     true 2017.10.08.24