USGS Daily Values Site Web Service
You can use this service to retrieve daily statistical data about the hundreds of thousands of hydrologic sites served by the USGS. This service provides USGS water data in WaterML 1.1 (an XML schema) as well as the legacy RDB (tab-delimited) format and a JSON (Javascript-friendly) format.
Please join the USGS Water Data for the Nation Notification List . This way you will receive an announcement when changes are made to this web service, or if it there are significant problems with the service.
Quick Links
How the service works
- This is a REST-friendly service, which means it is URL accessible and can be run from a browser
- The service can return daily values for one or more sites in one request
- Data for historical, as well as currently active sites are available.
With hundreds of thousands of qualifying sites across the nation, the amount of data available is very large. No one user is allowed to download all of the data with a single call. The service has consequently been engineered to facilitate common mass queries, defaulting to returning a narrower set of data. You are encouraged to make your queries efficient too, mindful that many others need access to the data at the same time. Always specify the minimum amount of data you need in your request, using built in filters and date ranges to the maximum extent possible.
Testing the service
Probably the best way to learn how to use the service is to try it out!
The USGS provides this tool that allows you to generate syntactically correct calls to the service. You can even run the query live in your browser. When you have perfected your query you can copy and paste the URL into your application to get the precise data you need.
Test the service now
Interpreting the output
Please note that recent daily values are frequently qualified as provisional, so the data should be interpreted with caution as it is possible (although unlikely) it will be revised. See the USGS Provisional Data Disclaimer page for more information.
When using format=waterml (the default format), data are returned in XML using the WaterML 1.1 schema . WaterML is a schema created by the Consortium of Universities for the Advancement of Hydrologic Science, Inc (CUAHSI) . The USGS has a cooperative agreement with CUAHSI. The crucial data are the embedded daily values. A unique daily value can be found inside the <value> tag, which is nested inside the <timeSeries> tag, such as in this example:
<ns1:values>
<ns1:value qualifiers="P" dateTime="2011-05-02">14.8</ns1:value>
<ns1:qualifier qualifierID="0" ns1:network="NWIS" ns1:vocabulary="uv_rmk_cd">
<ns1:qualifierCode>P</ns1:qualifierCode>
<ns1:qualifierDescription>Provisional data subject to revision.</ns1:qualifierDescription>
</ns1:qualifier>
<ns1:method methodID="0">
<ns1:methodDescription>sensor:null:7</ns1:methodDescription>
</ns1:method>
</ns1:values>
By itself this imparts no information as to what the daily value represents, other than the statistic is provisional because qualifiers="P". We do know the value is 14.8 and it represents a daily value for May 2, 2011. We also need to know what was measured. The key to figuring this out is to examine the outer <timeSeries> tag, which contains some important information, shown below in bold:
<ns1:timeSeries name="USGS:01646500:00010:00002">
...
</ns1:timeSeries>
The name attribute contains a sequence of useful information with key fields delimited by colons. The pattern is <agencyCd>:<siteNo>:<parameterCd>:<statisticsCd>.
So this node contains data about site number 01646500 (Little Falls Pumping Station on the Potomac River) monitored by the USGS. Specifically it has a calculated daily statistic for USGS parameter 00010, which is water temperature in degrees Celsius. How do we know this? It is made clear inside the <variable> node within the <timeSeries> node.
<ns1:variable ns1:oid="45807042">
<ns1:variableCode network="NWIS" vocabulary="NWIS:UnitValues" default="true" variableID="45807042">00010</ns1:variableCode>
<ns1:variableName>Temperature, water, °C</ns1:variableName>
<ns1:variableDescription>Temperature, water, degrees Celsius</ns1:variableDescription>
<ns1:valueType>Derived Value</ns1:valueType>
<ns1:unit>
<ns1:unitAbbreviation>deg C</ns1:unitAbbreviation>
</ns1:unit>
<ns1:options>
<ns1:option name="Statistic" optionCode="00002">Minimum</ns1:option>
</ns1:options><ns1:noDataValue>-999999.0</ns1:noDataValue>
</ns1:variable>
Since a daily value is a computation of many regular timeseries measurements, the next question is what statistic is being measured? A mean temperature? Maximum temperature? Minimum temperature? The statistics code is 00002, which the <options> tag nested inside the <variable> tag tells us is minimum (see above).
Putting it altogether, this means that for this site, the provisional minimum water temperature on May 2, 2011 was 14.8 degrees Celsius, or about 59 degrees Fahrenheit.
With other output formats, the location of the data will depend on the syntax of the format. You will need to inspect the format to locate the relevant data.
See the full description of output formats.
Error codes
Since this system uses Hypertext Transfer Protocol (HTTP), any application errors are reported in the HTTP headers, which are normally not seen. This means that when writing applications, when you get a response it is important to first examine the HTTP status code that is returned in the HTTP response. The application server will return the error code along with a message describing the error in the event there is a problem. Programmers should always check the HTTP response code and if not a 200 handle the response as an exception. Among the status codes you may see:
- 200 OK - The request was successfully executed and some data should have been returned.
- 304 Not Modified - This indicates your request was redirected using the proper URL. This may occur if the "path" of your URL is not fully qualified. Ideally a / is placed before the ? in the URL. Adding in this slash may make this go away. However, the request should still be processed. If this becomes annoying, you may also be able to tell your client program to automatically follow redirects.
- 400 Bad Request - This often occurs if the URL arguments are inconsistent. An accompanying error should describe why the request was bad. Reasons include adding the hour to the startDt or endDt arguments when only days can be specified.
- 403 Access Forbidden - This should only occur if for some reason the USGS has blocked your Internet Protocol (IP) address from using the service. This can happen if we believe that your use of the service is so excessive that it is seriously impacting others using the service. To get unblocked, send us the URL you are using along with the IP to gs-w_support_nwisweb@usgs.gov. We may require changes to your query and frequency of use in order to give you access to the service again.
- 404 Not Found - Returned if and only if the query expresses a combination of elements where data do not exist. For multi-site queries, if any data are found, it is returned for those site/parameters/date ranges where there are data. Conditions that would return a 404 Not Found include:
- All site number(s) are invalid
- All site number(s) are valid but the requested parameter(s) are not served for the sites requested
- No values exist for the requested date range. For example, a gage might be down for a period of time due to storm damage when it would normally have data.
- 500 Internal Server Error - If you see this, it means there is a problem with the web service itself. It usually means the application server is down unexpectedly. This could be caused by a host of conditions but changing your query will not solve this problem. The application support team has to fix it. Most of these errors are quickly detected and the support team is notified if they occur.
- 503 Service Unavailable - The server is currently unable to handle the request due to a temporary overloading or mainte
nance of the server. The implication is that this is a temporary condition which will be alleviated after some delay.
Using the Web Service with Adobe Flex or the Flex API
Adobe Flex requires our server have a crossdomain.xml file indicating those domains that can access our web service using Adobe Flex. We are adding these on a case by case basis. If you need to access the service using Adobe Flex or the Flex API, please contact us at gs-w_support_nwisweb at usgs dot gov and indicate the domain of the server that will access the service.
Service Documentation
URL Format
The URL must always be in this format:
http://waterservices.usgs.gov/nwis/dv/?<arguments>
where <arguments> are one or more HTTP GET parameter names and values based on the information below.
Specifying the URL Arguments
You specify the arguments that go in <arguments>.
- Each URL argument name is followed by an equal sign followed by one or more values for that argument. Where multiple values are allowed for the same argument, you can separate values with commas.
- URL arguments are separated by ampersands (&)
- The order of the URL arguments does not matter
- If a URL argument name does not match one of the names below, a HTTP 400 error code is returned
Here is an example of a valid URL that should return data:
URL argument names and argument values can be in upper, lower or mixed case. They will all be handled correctly. All of the following will yield the same result:
http://waterservices.usgs.gov/nwis/dv/?stateCd=ny
http://waterservices.usgs.gov/nwis/dv/?statecd=ny
http://waterservices.usgs.gov/nwis/dv/?STATECD=ny
http://waterservices.usgs.gov/nwis/dv/?stateCd=NY
http://waterservices.usgs.gov/nwis/dv/?STATECD=NY
http://waterservices.usgs.gov/nwis/dv/?stateCd=Ny
URL argument conventions
The following conventions are used below to document URL argument values:
arg1=[ a {,x | ,y} | b | c,d,...]
- square brackets [] are used to show a set of possible choices, with the pipe symbol | delineating exclusive choices. You must select one and only one of these choices.
- curved brackets {} are used to show optional elements. They also may be delineated with | indicating exclusive choices. If used, you may select one and only one of these choices.
- ... indicates more than item may be specified if items are delineated by commas. Note the limitation on the maximum number of argument values allowed below.
In the above example, these would be the allowed legal values:
- arg1=a
- arg1=a,x
- arg1=a,y
- arg1=b
- arg1=c
- arg1=c,d,e,f
- arg1=e,f
Major Filters
Single Site Queries
Want to only query one site? Use site (or sites) as your major filter, and put only one site number in the list! Example:
http://waterservices.usgs.gov/nwis/dv/?site=01646500
Multiple Site Queries
- Every multiple site query requires a major filter. Pick the major filter (sites, stateCd, huc, bBox or counties) that best retrieves the data for the sites that you are interested in.
- Further refine the query with minor filters, if needed.
Major Filter
(select one of the following) |
Meaning |
Minimum Number of Argument Values |
Maximum Number of Argument Values |
Examples |
sites (aliases: site, location) |
A list of site numbers. You can specify unlimited sites, up to any limit imposed by the application server or your client. Sites are comma separated. Sites may be prefixed with an optional agency code followed by a colon. If you don't know the site numbers you need, you can find relevant sites with the NWIS Mapper or on the USGS Water Data for the Nation site. |
1 |
Unlimited (see caveat) |
&site=01646500
&sites=USGS:01646500
&sites=01646500,06306300 |
stateCd
(alias: stateCds) |
U.S. postal service (2-digit) state code. USPS List of State Codes. |
1 |
1 |
&stateCd=NY |
huc
(alias: hucs) |
A list of hydrologic unit codes (HUC) or aggregated watersheds. Only 1 major HUC can be specified per request. A major HUC has two digits. Minor HUCs must be eight digits in length. Not all sites are associated with a HUC. List of HUCs. |
1 |
1 Major, 10 Minor |
&huc=01,02070010 |
bBox |
A contiguous range of decimal latitude and longitude, starting with the west longitude, then the south latitude, then the east longitude, and then the north latitude with each value separated by a comma. The product of the range of latitude and longitude cannot exceed 25 degrees. Whole or decimal degrees must be specified, up to six digits of precision. Minutes and seconds are not allowed. Remember: western longitude (which includes almost all of the United States) is specified in negative degrees. Caution: many sites outside the continental US do not have latitude and longitude referenced to NAD83 and therefore can not be found using these arguments. Certain sites are not associated with latitude and longitude due to homeland security concerns and cannot be found using this filter. |
1 |
1 |
&bBox=-83,36.5,-81,38.5 |
countyCd
(alias: countyCds) |
A list of county numbers, in a 5 digit numeric format. The first two digits of a county's code are the FIPS State Code. List of county codes. |
1 |
20 |
&countyCd=51059,51061 |
Specifying Date Ranges
Many sites have periods of record that can be measured in decades, sometimes fifty years or more. Some sites have been measuring common parameters like streamflow continuously, others are seasonal in nature, and others have had periods when no funding was available to maintain the site so no data are available. Since daily values are by definition daily calculations, it makes no sense to request time periods in less than day increments. Please follow these rules for expressing dates with this service:
I want to... |
Do this... |
Syntax Rules |
Examples |
Get the latest daily values only |
Nothing. Only the latest value is returned by default for each requested site, parameter and statistic. |
- None, no argument needed
- In some unusual cases like predictive gages, the daily value might be for the current day or a date in the future.
|
&stateCd=ny¶meterCd=00060 // Get the latest discharge daily values for all sites in New York state |
Get a range of daily values from now |
Specify the period argument |
- period must be in ISO-8601 Duration format . Do not express in increments of less than a day. For example, period=P7D is allowed but period=PT2H is not.
- periods must be deterministic. Days and weeks are deterministic (always the same duration), but months and years or not.
- Beware that there there are typically no daily values for today because the day is not yet finished, hence no daily statistic can be derived. This means in most cases if period=P7D, six daily values beginning with yesterday will be retrieved.
- Data are always returned up to the most recent value, which in the case of a predictive gage might be in the future.
|
&period=P7D // Retrieve last seven days up from now to most recent instantaneous value)
&period=P520W // Retrieves approximately ten years of data (520 weeks is about 10 years)
|
Get a range of daily values from an explicit begin or end date |
Use the startDT and endDT arguments |
- Both startDt and endDt must be in ISO-8601 Date format
- Do not express dates in increments of less than a day
- Do not supply time zones. The time zone is whatever time zone is in effect at the site.
- startDt must always be supplied
- If endDT is not provided, endDT is the most recent daily value
- startDT must be chronologically at or before endDT
|
&startDT=2010-11-22&endDT=2010-11-22 // One day of daily values only
&startDT=1990-01-01&endDT=1999-12-31 // All daily values for the 1990s
&startDT=2010-11-22 // Ends with most recent daily value
&endDt=1999-12-31 // Not allowed because of start date is ambiguous
|
Format (format)
URL Argument Name |
format |
Description |
Used to specify the output format of the data returned.
- waterml is WaterML 1.1 , an XML schema published by the CUAHSI.
- rdb is a self-describing tab-delimited format used widely by the USGS, documented in a PDF file here (Adobe Acrobat Reader )
- json is Javascript Object Notation . See the warning on using this format. The current version of WaterML will be rendered in a JSON structure as a set of name/value pairs. JSON is excellent for Web 2.0 applications. However, use JSON with caution as name/value pairs will change automatically when the default version of WaterML is upgraded. Note: json is returned with an application/json MIME type which generally has the effect in a browser of being prompted to download and save a file. In actual Web 2.0 usage this should be handled by your Javascript logic.
- Version numbers are optional. The version is actually tied to WaterML, so if you want WaterML 1.1 rendered as JSON, this can be done explicitly using format=json,1.1
|
Syntax |
format=[waterml{,1.1} | rdb{,1.0} | json{,1.1}] |
Default |
waterml |
Minimum argument values required |
1 |
Maximum argument values allowed |
1 |
Examples |
- &format=waterml // Latest implemented version of WaterML wanted
- &format=waterml,1.1 // WaterML version 1.1 wanted
- &format=rdb
- &format=rdb,1.0
- &format=json // Latest implemented version of WaterML translated to JSON
- &format=json,1.1
|
Minor Filters
Additional filters can be applied after specifying a major filter. This further reduces the set of expected results. Users are encouraged to use minor filters because it allows more efficient use of this service.
Parameter Code (parameterCd)
URL Argument Name |
parameterCd (aliases: variable, parameterCds, variables, var, vars, parmCd) |
Description |
- USGS parameter code.
- All parameter codes are numeric and 5 characters in length. Parameter codes are used to identify the constituent measured and the units of measure.
- Popular codes include stage (00065), discharge in cubic feet per second (00060) and water temperature in degrees Celsius (00010)
- Complete list of USGS parameter codes (not all parameters are served by time-series sites)
|
Syntax |
parameterCd|variable={parameterCd1,parameterCd2,...} |
Default |
returns all time-series parameters for the requested sites |
Minimum argument values required |
1 |
Maximum argument values allowed |
100 |
Examples |
- ¶meterCd=00060 // discharge, cubic feet per second
- ¶meterCd=00060,00065 // discharge, cubic feet per second and gage height in feet
- &variable=00060 // discharge, cubic feet per second
- &variable=00060,00065 // discharge, cubic feet per second and gage height in feet
|
Statistics Code (statCd)
URL Argument Name |
statCd (alias: statisticCd) |
Description |
- Selects sites based on the statistics codes desired, such as minimum, maximum or mean
- Using statCd without parameterCd is possible, but is not logical. statCd is useful only in refining data about parameters collected at a site.
- All stat codes are five numeric characters in length
- List of stat codes
|
Syntax |
statCd=[ all | { statCd1,statCd2,... } ] |
Default |
all - all statistics codes served for the sites and parameters requested |
Minimum argument values required |
1 |
Maximum argument values allowed |
20 |
Examples |
- &stateCd=ri¶meterCd=00060,00065&statCd=00003 // latest daily mean streamflow and gage height for Rhode Island
|
Site Status (siteStatus)
URL Argument Name |
siteStatus |
Description |
Selects sites based on whether or not they are active. If a site is active, it implies that it is being actively maintained. Each USGS Water Science Center determines whether a site is active or inactive. The default is all (show both active and inactive sites). |
Syntax |
siteStatus=[ all | active | inactive ] |
Default |
Minimum argument values required
| 1 |
Maximum argument values allowed |
1 |
Examples |
|
Site Type (siteType)
URL Argument Name |
siteType (aliases: siteTypes, siteTypeCd, siteTypeCds) |
Description |
- Restricts sites to those having one or more site types.
- List of valid site types
- If you request a major site type (ex: &siteType=ST) you will get all sub-site types of the same major type as well (in this case, ST-CA, ST-DCH and ST-TS)
|
Syntax |
siteType=[all | { siteType1,siteType2,... } ] |
Default |
All site types are returned |
Minimum argument values required |
1 |
Maximum argument values allowed |
No limit |
Examples |
- &siteType=ST // Streams only
- &siteType=ST,LA-OU // Streams and Land Outcrops only
|
Site was modified since (modifiedSince)
URL Argument Name |
modifiedSince |
Description |
- Returns all sites and their values only if any of the requested daily values have changed during the requested period.
- The modifiedSince time period always begins with today and moves toward the past. It must be expressed in an ISO-8601 duration format .
- If the modifiedSince argument is not specified in the generated URL, it has no effect on the query.
- Only deterministic periods are allowed. Since months and years are not deterministic, do not use them.
|
Syntax |
modifiedSince=[ISO-8601-duration] |
Default |
None |
Minimum argument values required |
1 |
Maximum argument values allowed |
1 |
Examples |
- &stateCd=NY&modifiedSince=P1W - All NY daily values are retrieved only if any of their requested daily values were changed in the last week.
|
Agency Code (agencyCd)
URL Argument Name |
agencyCd (alias: agencyCds) |
Description |
- The list of sites returned are filtered to return only the provided agency code. An agency is the organization operating or funding the collection of data at the site.
- An authoritative list of agency codes can be found here.
- Note: most sites are USGS maintained, and have an agency code of USGS
|
Syntax |
agencyCd=agencyCd1 |
Default |
All sites regardless of agency code are retrieved |
Minimum argument values required |
1 |
Maximum argument values allowed |
1 |
Examples |
- &stateCd=tx&agencyCd=USCE // Only US Army Corps of Engineers sites in Texas
|
Altitude (altMin and altMax)
URL Argument Name |
- altMin (alias: altMinVa)
- altMax (alias: altMaxVa)
|
Description |
- These arguments allows you to select sites with daily values where the associated sites' altitude are within a desired altitude, expressed in feet. Altitude is based on the datum used at the site.
- Providing a value to altMin (minimum altitude) means you want sites that have or exceed the altMin value
- Providing a value to altMax (maximum altitude) means you want sites that have or are less than the altMax value
- Both whole numbers and decimals may be used
- If both the altMin and altMax are specified, sites at or between the minimum and maximum altitude are returned
|
Syntax |
- altMin=minValue
- altMax=maxValue
|
Default |
All sites are retrieved, regardless of their altitude |
Minimum argument values required |
1 |
Maximum argument values allowed |
1 |
Examples |
- &altMin=1000&altMax=5000 // Return sites where the altitude is 1000 feet or greater and 5000 feet or less.
|
Surface Water Filters
Drainage Area (drainAreaMin and drainAreaMax)
URL Argument Names |
- drainAreaMin (alias: drainAreaMinVa)
- drainAreaMax (alias: drainAreaMaxVa)
|
Description |
- These arguments allows you to select daily value surface water sites where the associated sites' drainage areas (watersheds) are within a desired size, expressed in square miles.
- Providing a value to drainAreaMin (minimum drainage area) means you want sites that have or exceed the drainAreaMin value
- Providing a value to drainAreaMax (maximum drainage area) means you want sites that have or are less than the drainAreaMax value
- Both whole numbers and decimals may be used
- If both the drainAreaMin and drainAreaMax are specified, sites at or between the minimum and maximum drainage areas values specified are returned
- Caution: not all sites are associated with a drainage area.
- Caution: drainage area only applies to surface water sites, this should not be used with groundwater sites other than springs.
|
Syntax |
- drainAreaMin=minValue
- drainAreaMax=maxValue
|
Default |
All sites are retrieved, regardless of their drainage area |
Minimum argument values required |
1 |
Maximum argument values allowed |
1 |
Examples |
- &drainAreaMin=1000&drainAreaMax=5000 // Return sites where the drainage area is 1000 square miles or greater and is 5000 square miles or less.
|
Groundwater Filters
Aquifer Code (aquiferCd)
URL Argument Names |
|
Description |
- Used to filter sites to those that exist in specified national aquifers. Note: not all sites have been associated with national aquifers.
- Enter one or more national aquifer codes, separated by commas.
- A national aquifer code is exactly 10 characters.
- A complete list of national aquifer codes can be found here .
|
Syntax |
- aquiferCd={aquiferCd1,aquiferCd2,...}|all
|
Default |
all |
Minimum argument values required |
0 |
Maximum argument values allowed |
1000 |
Examples |
- &aquiferCd=S500EDRTRN,N100HGHPLN // returns groundwater sites for the Edwards-Trinity aquifer system and the High Plains national aquifers.
|
Local Aquifer Code (localAquiferCd)
URL Argument Names |
|
Description |
- Used to filter sites to those that exist in specified local aquifers. Note: not all sites have been associated with local aquifers.
- Enter one or more local aquifer codes, separated by commas.
- A local aquifer code begins with a 2 character state abbreviation (such as TX for Texas) followed by a colon followed by the 7 character aquifer code.
- A complete list of local aquifer codes can be found here . To translate the state code associated with the local aquifer, you may need this reference .
|
Syntax |
- all|localAquiferCd={localAquiferCd1,localAquiferCd2,...}
|
Default |
all |
Minimum argument values required |
0 |
Maximum argument values allowed |
1000 |
Examples |
- &localAquiferCd=AL:111RGLT,AL:111RSDM // returns sites for the Regolith and Saprolite local aquifers in Alabama
|
Well Depth (wellDepthMin and wellDepthMax)
URL Argument Names |
- wellDepthMin (alias: wellDepthMinVa)
- wellDepthMax (alias: wellDepthMaxVa)
|
Description |
- These arguments allows you to select daily value groundwater sites where the associated sites' well depth are within a desired depth, expressed in feet from the land surface datum.
- Express well depth as a positive number.
- Providing a value to wellDepthMin (minimum well depth) means you want sites that have or exceed the wellDepthMin value
- Providing a value to wellDepthMax (maximum well depth) means you want sites that have or are less than the wellDepthMax value
- Both whole numbers and decimals may be used
- If both the wellDepthMin and wellDepthMax are specified, sites at or between the minimum and maximum well depth values specified are returned
- wellDepthMax should be greater than or equal to wellDepthMin.
- Caution: well depth applies to groundwater sites only
|
Syntax |
- wellDepthMin=minValue
- wellDepthMax=maxValue
|
Default |
All sites are retrieved, regardless of their well depth |
Minimum argument values required |
1 |
Maximum argument values allowed |
1 |
Examples |
- &wellDepthMin=100&wellDepthMax=500 // Return daily value sites where the well depth is 100 feet or greater and 500 feet or less.
|
Hole Depth (holeDepthMin and holeDepthMax)
URL Argument Names |
- holeDepthMin (alias: holeDepthMinVa)
- holeDepthMax (alias: holeDepthMaxVa)
|
Description |
- These arguments allows you to select daily value groundwater sites where the associated sites' hole depth are within a desired depth, expressed in feet from the land surface datum.
- Express hole depth as a positive number.
- Providing a value to holeDepthMin (minimum hole depth) means you want sites that have or exceed the holeDepthMin value
- Providing a value to holeDepthMax (maximum hole depth) means you want sites that have or are less than the holeDepthMax value
- Both whole numbers and decimals may be used
- If both the holeDepthMin and holeDepthMax are specified, sites at or between the minimum and maximum hole depth values specified are returned
- holeDepthMax should be greater than or equal to holeDepthMin.
- Caution: hole depth applies to groundwater sites only
|
Syntax |
- holeDepthMin=minValue
- holeDepthMax=maxValue
|
Default |
All sites are retrieved, regardless of their hole depth |
Minimum argument values required |
1 |
Maximum argument values allowed |
1 |
Examples |
- &holeDepthMin=100&holeDepthMax=500 // Return daily values sites where the hole depth is 100 feet or greater and 500 feet or less.
|
Examples
PHP Example
Here is a simple example using the popular PHP scripting language that retrieves the most recent mean streamflow daily value for all sites marked with the site type in "Stream" Rhode Island. PHP is popular on web servers for serving dynamic content. It may be useful in understanding how to access the service and traverse XML trees but should not be used as a "best practice" way of retrieving data.
Javascript Example
Warning: this example probably will not work because browsers are typically not allowed to use JSON content which did not originate on the same server as the web page. The USGS expects to support JSONP or a similar format to address this issue in a subsequent release. You can try it live.
Here is an example of using this service with Web 2.0 technologies, specifically Asynchronous Javascript and XML (AJAX), using the service's JSON format and a Web 2.0 toolkit called jQuery . This is designed to work in a browser and the jQuery library makes it very portable across browsers.
Feedback
Please provide any feedback you have on this service to .