Returns information about data available for a given location for the solar resource database used by the PVWatts v6 API.
GET /api/solar/data_query/v1.format?parameters
Parameter | Required | Value | Description |
---|---|---|---|
format | Yes |
Type: string
Default: None
Options: json, xml, csv
|
The output response format. |
api_key | Yes |
Type: string
Default: None
|
Your developer API key. See API keys for more information. |
address | Depends |
Type: string
Default: None
|
The address to use. Required if lat/lon not specified. |
lat | Depends |
Type: decimal
Default: None
Min: -90
Max: 90
|
The latitude for the location to use. Required if address not specified. |
lon | Depends |
Type: decimal
Default: None
Min: -180
Max: 180
|
The longitude for the location to use. Required if address not specified. |
radius | No |
Type: integer
Default: 100
Min: 0
Max: 2000
|
The search radius to use when searching for climate data stations (miles). Pass in radius=0 to find the closest stations regardless of the distance. A value greater than 0 is required when using in combination with all=1. |
all | No |
Type: integer
Default: 0
Options: 0, 1
|
Return all stations within the radius. The closest stations will still be returned individually. |
The response is composed of service-related informational fields and information about the closest climate data files.
Field | Value | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
inputs | Type: collection | The input parameters received in the request. | ||||||||||||
errors | Type: array of strings | Any error messages resulting from the request. | ||||||||||||
warnings | Type: array of strings | Any warning messages resulting from the request. This includes messages regarding data not being found for one or more datasets. | ||||||||||||
version | Type: string | The current version of the web service. | ||||||||||||
metadata | Type: collection | Any metadata associated with the request (sources, etc) | ||||||||||||
outputs | Type: collection |
Information about the climate data files for each supported dataset. (see output fields for more detail)
|
The output fields contain the following information regarding climate data files from each supported dataset. If no data is found for a specific dataset, the service will return null for it in the outputs, and return a message in the warnings.
Field | Value | Description |
---|---|---|
id | Type: string | An identifier for the climate data within the dataset. NOTE: this file ID can only be used with the PVWatts V6 API, and will not work with the PVWatts V8 API. |
lat | Type: decimal | The latitude of the station. |
lon | Type: decimal | The longitude of the station. |
city | Type: string | The city where the station is located. |
state | Type: string | The state where the station is located. |
timezone | Type: integer | The timezone of the station, relative to GMT. |
elevation | Type: integer | The elevation of the station in meters. |
distance | Type: integer | The distance in meters from the input location to the station. |
GET /api/solar/data_query/v1.json?api_key=DEMO_KEY&lat=40&lon=-105&radius=50&all=1
{
"version": "1.3.1",
"warnings": [
"No intl data found for lat=40.0 lon=-105.0"
],
"errors": [],
"metadata": {},
"inputs": {
"lat": "40",
"lon": "-105",
"radius": "50",
"all": "1"
},
"outputs": {
"tmy2": {
"id": "0-94018",
"city": "BOULDER",
"state": "COLORADO",
"timezone": -7,
"lat": 40.13,
"lon": -105.24,
"elevation": 1689,
"distance": 24977
},
"tmy3": {
"id": "1-724699",
"city": "BROOMFIELD/JEFFCO [BOULDER - SURFRAD]",
"state": "COLORADO",
"timezone": -7,
"lat": 40.13,
"lon": -105.24,
"elevation": 1689,
"distance": 24977
},
"intl": null,
"nsrdb": {
"id": "3-W105N040-W10502N4001",
"city": "",
"state": "Colorado",
"lat": 40.01,
"lon": -105.02,
"distance": 2029,
"timezone": -7,
"elevation": 1582,
"resolution": 4
},
"all_stations": [
{
"id": "3-W105N040-W10502N4001",
"city": "",
"state": "Colorado",
"lat": 40.01,
"lon": -105.02,
"distance": 2029,
"timezone": -7,
"elevation": 1582,
"resolution": 4,
"dataset": "nsrdb"
},
{
"id": "0-94018",
"city": "BOULDER",
"state": "COLORADO",
"timezone": -7,
"lat": 40.13,
"lon": -105.24,
"elevation": 1689,
"distance": 24977,
"dataset": "tmy2"
},
{
"id": "1-724699",
"city": "BROOMFIELD/JEFFCO [BOULDER - SURFRAD]",
"state": "COLORADO",
"timezone": -7,
"lat": 40.13,
"lon": -105.24,
"elevation": 1689,
"distance": 24977,
"dataset": "tmy3"
},
{
"id": "1-724666",
"city": "DENVER/CENTENNIAL [GOLDEN - NREL]",
"state": "COLORADO",
"timezone": -7,
"lat": 39.742,
"lon": -105.179,
"elevation": 1829,
"distance": 32650,
"dataset": "tmy3"
},
{
"id": "1-725650",
"city": "DENVER INTL AP",
"state": "COLORADO",
"timezone": -7,
"lat": 39.833,
"lon": -104.65,
"elevation": 1650,
"distance": 35063,
"dataset": "tmy3"
},
{
"id": "1-724695",
"city": "AURORA BUCKLEY FIELD ANGB",
"state": "COLORADO",
"timezone": -7,
"lat": 39.717,
"lon": -104.75,
"elevation": 1726,
"distance": 38143,
"dataset": "tmy3"
},
{
"id": "1-724769",
"city": "FORT COLLINS (AWOS)",
"state": "COLORADO",
"timezone": -7,
"lat": 40.45,
"lon": -105.017,
"elevation": 1529,
"distance": 50435,
"dataset": "tmy3"
},
{
"id": "1-724768",
"city": "GREELEY/WELD (AWOS)",
"state": "COLORADO",
"timezone": -7,
"lat": 40.433,
"lon": -104.633,
"elevation": 1420,
"distance": 57549,
"dataset": "tmy3"
}
]
}
}
GET /api/solar/data_query/v1.xml?api_key=DEMO_KEY&lat=40&lon=-105&radius=50&all=1
<?xml version="1.0" encoding="UTF-8"?>
<response>
<version>1.3.1</version>
<warnings type="array">
<warning>No intl data found for lat=40.0 lon=-105.0</warning>
</warnings>
<errors type="array"/>
<metadata>
</metadata>
<inputs>
<lat>40</lat>
<lon>-105</lon>
<radius>50</radius>
<all>1</all>
</inputs>
<outputs>
<tmy2>
<id>0-94018</id>
<city>BOULDER</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">40.13</lat>
<lon type="float">-105.24</lon>
<elevation type="integer">1689</elevation>
<distance type="integer">24977</distance>
</tmy2>
<tmy3>
<id>1-724699</id>
<city>BROOMFIELD/JEFFCO [BOULDER - SURFRAD]</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">40.13</lat>
<lon type="float">-105.24</lon>
<elevation type="integer">1689</elevation>
<distance type="integer">24977</distance>
</tmy3>
<intl nil="true"/>
<nsrdb>
<id>3-W105N040-W10502N4001</id>
<city></city>
<state>Colorado</state>
<lat type="float">40.01</lat>
<lon type="float">-105.02</lon>
<distance type="integer">2029</distance>
<timezone type="integer">-7</timezone>
<elevation type="integer">1582</elevation>
<resolution type="integer">4</resolution>
</nsrdb>
<all-stations type="array">
<all-station>
<id>3-W105N040-W10502N4001</id>
<city></city>
<state>Colorado</state>
<lat type="float">40.01</lat>
<lon type="float">-105.02</lon>
<distance type="integer">2029</distance>
<timezone type="integer">-7</timezone>
<elevation type="integer">1582</elevation>
<resolution type="integer">4</resolution>
<dataset>nsrdb</dataset>
</all-station>
<all-station>
<id>0-94018</id>
<city>BOULDER</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">40.13</lat>
<lon type="float">-105.24</lon>
<elevation type="integer">1689</elevation>
<distance type="integer">24977</distance>
<dataset>tmy2</dataset>
</all-station>
<all-station>
<id>1-724699</id>
<city>BROOMFIELD/JEFFCO [BOULDER - SURFRAD]</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">40.13</lat>
<lon type="float">-105.24</lon>
<elevation type="integer">1689</elevation>
<distance type="integer">24977</distance>
<dataset>tmy3</dataset>
</all-station>
<all-station>
<id>1-724666</id>
<city>DENVER/CENTENNIAL [GOLDEN - NREL]</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">39.742</lat>
<lon type="float">-105.179</lon>
<elevation type="integer">1829</elevation>
<distance type="integer">32650</distance>
<dataset>tmy3</dataset>
</all-station>
<all-station>
<id>1-725650</id>
<city>DENVER INTL AP</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">39.833</lat>
<lon type="float">-104.65</lon>
<elevation type="integer">1650</elevation>
<distance type="integer">35063</distance>
<dataset>tmy3</dataset>
</all-station>
<all-station>
<id>1-724695</id>
<city>AURORA BUCKLEY FIELD ANGB</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">39.717</lat>
<lon type="float">-104.75</lon>
<elevation type="integer">1726</elevation>
<distance type="integer">38143</distance>
<dataset>tmy3</dataset>
</all-station>
<all-station>
<id>1-724769</id>
<city>FORT COLLINS (AWOS)</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">40.45</lat>
<lon type="float">-105.017</lon>
<elevation type="integer">1529</elevation>
<distance type="integer">50435</distance>
<dataset>tmy3</dataset>
</all-station>
<all-station>
<id>1-724768</id>
<city>GREELEY/WELD (AWOS)</city>
<state>COLORADO</state>
<timezone type="integer">-7</timezone>
<lat type="float">40.433</lat>
<lon type="float">-104.633</lon>
<elevation type="integer">1420</elevation>
<distance type="integer">57549</distance>
<dataset>tmy3</dataset>
</all-station>
</all-stations>
</outputs>
</response>
Standard rate limits apply. No more than 1,000 requests may be made in any hour
Standard errors may be returned. In addition, the following service-specific errors may be returned:
HTTP Status Code | Description |
---|---|
422 | Unprocessable Entity - One or more parameters did not pass validation, or a parameter may be missing. Check the errors section of the response to see how the request should be modified to address the error. |