Warning: Javascript must be enabled to use all the features on this page!
Click to hideNews Bulletins
  • Please see news on new formats
  • UPDATE, 11/9: As of November 8, the USGS has successfully restored all of the operational gages that stopped transmitting due to an issue with the satellite telemetry system that records and transmits data. The USGS will now focus on restoring other equipment that experienced the telemetry issues, including about 85 rapid deployment gages that are used periodically for emergency response. Read more
  • Full News RSS icon

NWIS Daily Values Web Service -- Beta 1.0

 

A new service for the delivery of daily hydrologic data in XML format


The USGS is pleased to announce a new web service for the delivery of hydrologic data, available for beta testing as of December 3, 2007.   This service is a part of the development of a web services architecture for water resources data.   This prototype web service provides access to historical daily value data contained in the USGS National Water Information System (NWIS) database in XML format.

This service can be called either via a "REST" request (using a standard HTML "GET" method very similar to NWISWeb) or via a "SOAP" request.   This page provides a examples of how to access the service using either the REST and/or SOAP request methods.

NOTE: This service is considered to be in Beta-test mode in order to evaluate system performance and usability and, as such, the system may be unavailable for short periods of time as reconfigurations are made to address user feedback and overall performance. However, the data provided have been verified as correct and identical to those that are available through the web browser data-delivery mechanisms provided by the USGS NWISWeb interface http://waterdata.usgs.gov/

Details about changes made to this service will be posted on this page as modifications are completed.   Please send any feedback and/or questions to GS-W_NWISWebservice@usgs.gov



REST Request:

A REST request is the simpler of the two access methods as all of the request parameters are included in a standard URL.   Therefore, a REST request can be submitted simply by typing the appropriate URL syntax for the web service into the address bar of your browser or submitting the URL via a script or program for automated retrievals.

The table below includes examples of valid combinations of site numbers, parameter codes, statistic codes, and start/end dates that will return values of special interest as noted in the comment field of the table.   To try the service, copy data from a row in the "Example URL values" table below into the appropriate field of the URL constructor form and then "Submit".   The example form is not restricted to the values shown in the example table as all USGS daily value data ARE available through this service.

NOTE 1: This service provides a data access tool for users that already know what data exist in the NWIS daily values database.   For more information on NWIS see USGS Water Data for the Nation.

NOTE 2: The service returns an XML string that can be viewed formatted in some browsers, but "view page source" must be used on other browsers.

URL constructor:
http://waterservices.usgs.gov/NWISQuery/GetDV1?
        SiteNum=&ParameterCode=&StatisticCode=&AgencyCode=&StartDate=&EndDate=


Example URL values:
 
Site Number Parameter Code Statistic Code Agency Code Start Date End Date Comment
 09429000  00060  00003    2000-11-01   2000-12-31   Daily value data
 01578310  00060  00003    2000-11-01   2000-12-31   
 06025500  00060  00003    1999-03-01   2000-02-29   Result Codes present
 06025500  00060  00003    2006-10-29   2006-11-30   Data Aging Code
 09392000  00065  00003    2000-11-01   2000-12-31   
 02290810  63160  00003  USNPS  2000-01-01   2000-02-29   Non-USGS Agency Code
 05412041  00060  01002    1988-10-01   1988-10-31   
 12362000  72020  32359    1951-10-01   1951-10-31   


SOAP Request:

For those wishing to access the service via a SOAP request, the Web Services Definition Language (WSDL) is available at:

    http://waterservices.usgs.gov/NWISQuery/GetWSService?wsdl