Developer Network NREL NREL Developer Network

Site Count (/api/nsrdb/v2/site-count)

Determine the number of sites containing data for a given point, polygon, or multipoint as specified by a WKT. This is useful for calculating download request size. Details at the download guide.

Request URL

GET|POST /api/nsrdb/v2/site-count.format?parameters

Request Parameters

NOTE: when using POST to submit a request the api_key must still be included as a query parameter in the url. All other parameters may be included in a POST request as part of the payload.

Parameter Required Value Description
api_key Yes
Type: string
Default: None

Your developer API key. See API keys for more information.

wkt Yes
Type: well-known text string
Default: None
A well-known text (WKT) representation of the geometry for which to extract data. May be a point, multipoint, or polygon geometry. When a point is passed the site nearest to that point is used. When a multipoint is passed the site nearest each point is used. This can be useful for downloading multiple sites in a single request when those sites are geographically distant from each other. When a polygon is passed all sites that intersect with the given polygon are used.

Response Fields

The response is composed of service-related informational fields and the results of the data query.

Field Value Description
errors
Type: string array

A list of error messages

warnings
Type: string array

A list of warning messages

inputs
Type: Object Hash
Key: Value pairs representing all input parameters
outputs
Type: Object Hash
Upon successful completion a list of datasets with a site count for each will be returned.

Examples

JSON Output Format

GET /api/nsrdb/v2/site-count.json?api_key=DEMO_KEY&wkt=POLYGON((-114.609374+40.178873%2C-112.675781+40.178873%2C-112.675781+38.616870%2C-114.609374+38.616870%2C-114.609374+40.178873))
{
  "errors": [ ],
  "inputs": {
    "wkt": "POLYGON((-114.609374 40.178873,-112.675781 40.178873,-112.675781 38.616870,-114.609374 38.616870,-114.609374 40.178873))"
  },
  "outputs": {
    "nsrdb_spectral_site_count": 0,
    "nsrdb_0512_site_count": 1872,
    "suny_india_site_count": 0,
    "nsrdb_9110_site_count": 0,
    "nsrdb_9105_site_count": 0,
    "nsrdb_9105_tmy_site_count": 0,
    "nsrdb_6190_site_count": 0,
    "nsrdb_9809_count": 0,
    "within_united_states": true,
    "nsrdb_site_count": 1872
  }
}

Rate Limits

Standard rate limits apply. No more than 1,000 requests may be made in any hour.

Errors

Standard errors may be returned. In addition, the following service-specific errors may be returned:

HTTP Status Code Description
400 Bad Request: When required parameters are missing.
Help Improve this Content