Developer Network NREL NREL Developer Network

NSRDB Data Query (/api/solar/nsrdb_data_query)

Returns information on the closest NSRDB datasets for a location including a set of links that can be used to download the data. For information about the NSRDB and the datasets represented by this service please visit https://nsrdb.nrel.gov.

Request URL

GET|POST /api/solar/nsrdb_data_query.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 Depends
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. Required if neither address nor lat/lon are specified.
address Depends
Type: string
Default: None
The address to use. Required if neither wkt nor lat/lon are specified.
lat Depends
Type: decimal
Default: None
Min: -90
Max: 90
The latitude for the location to use. Required if neither address nor wkt are specified.
lon Depends
Type: decimal
Default: None
Min: -180
Max: 180
The longitude for the location to use. Required if neither address nor wkt are specified.
type No
Type: string
Default: None
Options: satellite, station
The type of datasets to include in the response.
show_empty No
Type: boolean
Default: false
If true, returns metadata for all datasets including those with no data at the given location.

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 array
An array of objects describing the datasets returned by the query. Dataset objects will include descriptive details, links to dataset information, links to documentation for more dataset-specific API endpoints, and where appropriate a list of direct download links for easily accessing the data for any year at any resolution available. Please note that the returned links will require the addition of a valid api_key and email parameter.

Data File Format

Generated data files are formatted in accordance with the Standard Time Series Data File Format. This file format has been developed to support SAM and other NREL models and is documented fully in this PDF. More information on SAM file formats available on the SAM weather page.

Examples

JSON Output Format

GET /api/solar/nsrdb_data_query.json?api_key=DEMO_KEY&wkt=POINT(91.287+23.832)
{
  "errors": [],
  "inputs": {
    "wkt": "POINT(91.287 23.832)"
  },
  "outputs": [
    {
      "apiDocs": "http://developer.nrel.gov/docs/solar/nsrdb/suny_data_download/",
      "availableYears": [
        "tmy",
        2000,
        2001,
        2002,
        2003,
        2004,
        2005,
        2006,
        2007,
        2008,
        2009,
        2010,
        2011,
        2012,
        2013,
        2014
      ],
      "availableIntervals": [
        60
      ],
      "displayName": "SUNY International",
      "metadataLink": "https://nsrdb.nrel.gov/international-datasets",
      "name": "suny-international",
      "type": "satellite",
      "links": [
        {
          "year": "tmy",
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=tmy&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2000,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2000&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2001,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2001&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2002,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2002&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2003,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2003&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2004,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2004&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2005,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2005&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2006,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2006&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2007,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2007&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2008,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2008&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2009,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2009&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2010,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2010&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2011,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2011&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2012,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2012&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2013,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2013&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        },
        {
          "year": 2014,
          "interval": 60,
          "link": "http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2014&wkt=POINT%2891.287+23.832%29&interval=60&api_key=yourapikey&email=youremail"
        }
      ]
    }
  ]
}

XML Output Format

GET /api/solar/nsrdb_data_query.xml?api_key=DEMO_KEY&wkt=POINT(91.287+23.832)
<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <errors type="array"/>
  <inputs>
    <wkt>POINT(91.287 23.832)</wkt>
  </inputs>
  <outputs type="array">
    <output>
      <apiDocs>http://developer.nrel.gov/docs/solar/nsrdb/suny_data_download/</apiDocs>
      <availableYears type="array">
        <availableYear>tmy</availableYear>
        <availableYear type="integer">2000</availableYear>
        <availableYear type="integer">2001</availableYear>
        <availableYear type="integer">2002</availableYear>
        <availableYear type="integer">2003</availableYear>
        <availableYear type="integer">2004</availableYear>
        <availableYear type="integer">2005</availableYear>
        <availableYear type="integer">2006</availableYear>
        <availableYear type="integer">2007</availableYear>
        <availableYear type="integer">2008</availableYear>
        <availableYear type="integer">2009</availableYear>
        <availableYear type="integer">2010</availableYear>
        <availableYear type="integer">2011</availableYear>
        <availableYear type="integer">2012</availableYear>
        <availableYear type="integer">2013</availableYear>
        <availableYear type="integer">2014</availableYear>
      </availableYears>
      <availableIntervals type="array">
        <availableInterval type="integer">60</availableInterval>
      </availableIntervals>
      <displayName>SUNY International</displayName>
      <metadataLink>https://nsrdb.nrel.gov/international-datasets</metadataLink>
      <name>suny-international</name>
      <type>satellite</type>
      <links type="array">
        <link>
          <year>tmy</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=tmy&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2000</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2000&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2001</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2001&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2002</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2002&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2003</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2003&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2004</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2004&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2005</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2005&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2006</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2006&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2007</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2007&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2008</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2008&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2009</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2009&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2010</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2010&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2011</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2011&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2012</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2012&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2013</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2013&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
        <link>
          <year type="integer">2014</year>
          <interval type="integer">60</interval>
          <link>http://developer.nrel.gov/api/solar/suny_india_download.csv?names=2014&amp;wkt=POINT%2891.287+23.832%29&amp;interval=60&amp;api_key=yourapikey&amp;email=youremail</link>
        </link>
      </links>
    </output>
  </outputs>
</hash>

Rate Limits

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

Contact

For questions about the API or the data models please contact nsrdb@nrel.gov

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 or invalid.
Help Improve this Content