Overview
A RESTful application programming interface (API) is available to access Climate at a Glance data. The API can format desired data as comma-separated values (CSV), JavaScript Object Notation (JSON), and Extensible Markup Language (XML). The Data Service is only available via HTTP Strict Transport Security (HSTS) following Federal government policy.
Request Endpoint Parameters
Parameters are passed using a GET request with a combination of path and optional query parameters. Accepted values are defined in the table below.
Path Parameters
https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/{scope}/time-series/{location}/{parameter}/{surface}/{timescale}/{month}/{begYear}-{endYear}/data.{format}
The {begYear} and {endYear} parameters are optional. If they are not included, the entire period of record is returned.
https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/{scope}/time-series/{location}/{parameter}/{surface}/{timescale}/{month}/data.{format}
Query Parameters
An optional query component may follow at the end of the URL path, preceded by a question-mark ?
, in the form of key=value
pairs, and separated by an ampersand &
.
…?{basePeriod}=[true|false]&{basePeriodBegYear}=[year]&{basePeriodEndYear}=[year]
Request Parameter |
Type |
Description |
scope |
String |
|
location |
String |
Accepted Values (click scope to toggle)
(start dates are in parentheses)
|
parameter |
String |
pdsi
Palmer Drought Severity Index (PDSI)
phdi
Palmer Hydrological Drought Index (PHDI)
pmdi
Palmer Modified Drought Index (PMDI)
*Please note, not all parameters are available for all locations and timescales. More info ↓
Degree Days are not available for:
Cities
Alaska
Hawaii
Great Plains
Souther Plains and Gulf Coast
Rockies and Westward
River Basins
Agricultural Belts
Palmer Indices are not available for:
Cities
Alaska
Hawaii
PDSI, PHDI, and PMDI are not offered for multiple-month time scales.
|
timescale |
Integer, String |
|
month |
Integer |
|
startYear |
Integer |
4-digit year (must be less than or equal to endYear)
|
endYear |
Integer |
4-digit year (must be greater than or equal to startYear)
|
format |
String |
csv
Comma-Separated Values
json
JavaScript Object Notation
xml
Extensible Markup Language
|
basePeriod |
Boolean |
true
Return anomalies based on the requested base period mean
false
Return no anomalies
|
basePeriodBegYear |
Integer |
4-digit year (must be less than or equal to basePeriodEndYear)
|
basePeriodEndYear |
Integer |
4-digit year (must be greater than or equal to basePeriodBegYear)
|