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=POINT(-152.6000585749817 64.81107997666865){
"inputs": {
"body": {},
"params": {},
"query": {
"wkt": "POINT(-152.6000585749817 64.81107997666865)"
}
},
"metadata": {
"version": "2.0.0",
"resultset": {
"count": 1
}
},
"status": 200,
"outputs": {
"himawari7": 0,
"india-wind": 0,
"himawari-tmy": 0,
"himawari": 0,
"nsrdb-msg-v1-0-0": 0,
"msg-iodc": 0,
"ncdb-4km-Hourly-CONUS-v1-0-0-RCP4-5-percent-change": 0,
"ncdb-4km-Hourly-CONUS-v1-0-0-RCP8-5": 0,
"nsrdb-GOES-conus-v4-0-0": 0,
"ncdb-4km-Hourly-CONUS-v1-0-0-RCP4-5": 0,
"nsrdb-GOES-tmy-v4-0-0": 0,
"spectral-ondemand": 0,
"mexico-wtk": 0,
"nsrdb-GOES-aggregated-v4-0-0": 0,
"nsrdb-GOES-full-disc-v4-0-0": 0,
"suny-india-tmy": 0,
"us-atlantic-virtual-buoy": 0,
"us-west-coast-hindcast": 0,
"suny-india": 0,
"us-wave-v1-0-0-gom-and-pr": 0,
"vietnam-wtk": 0,
"spectral-ondemand-meteosat": 0,
"spectral-ondemand-himawari7": 0,
"wtk-bangladesh": 0,
"spectral-ondemand-himawari": 0,
"spectral-india-tmy": 0,
"wtk-bchrrr-v1-0-0": 0,
"spectral-ondemand-msg": 0,
"sup3rwind-ukraine": 0,
"seasia-wtk": 0,
"wtk-indonesia-v1-0-0": 0,
"wtk-conus-5min-v1-0-0": 0,
"wtk-led-conus": 0,
"wtk-guam-v1-0-0-hourly": 0,
"us-atlantic-hindcast": 0,
"wtk-guam-v1-0-0-5min": 0,
"wtk-kazakhstan": 0,
"wtk-led-climate-v1-0-0": 1,
"wtk-sup3rwind-south-america-v1-0-0-5min": 0,
"wtk-south-atlantic-yearly-5min-v1-0-0": 0,
"wtk-now23-california-v1-0-0-5min": 0,
"wtk-led-alaska": 1,
"wtk-maine": 0,
"wtk-alaska-v1-0-0": 1,
"wtk-mexico-5min": 0,
"us-west-coast-virtual-buoy": 0,
"wtk-pr100-5min": 0,
"wtk-seasiawind-v3": 0,
"spectral-ondemand-polar": 1,
"wtk-canada-5min": 0,
"nsrdb-polar-tmy-v4-0-0": 1,
"nsrdb-msg-v1-0-0-tdy": 0,
"offshore-gulf-of-mexico": 0,
"offshore-mid-atlantic": 0,
"offshore-hawaii": 0,
"nsrdb-polar-v4-0-0": 1,
"offshore-ca": 0,
"offshore-great-lakes": 0,
"nsrdb-msg-v1-0-0-tgy": 0,
"philippines-wtk": 0,
"central-asia-wind": 0,
"nsrdb-msg-v1-0-0-tmy": 0,
"offshore-nw-pacific": 0,
"offshore-north-atlantic": 0,
"hawaii-hindcast": 0,
"alaska-hindcast": 0,
"wtk": 0,
"wtk-srw": 0
},
"errors": []
}
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. |