Reference

API reference

Base URL https://api.climatedata.dev. Every endpoint is a GET and returns JSON unless the path ends in another format.

Generated from the dataset contracts when this site was built. Add @{version} after any dataset id to pin a version (how). Errors are problem documents.

Endpoints

GET /v1

The API index for this site.

  • site, name, tagline
  • api_version: "v1"
  • links.catalog, links.status

Example: https://api.climatedata.dev/v1

GET /v1/catalog

Every dataset published on this site.

  • site
  • datasets[]: id, kind, title, description, current (version), published_at, cadence, check_every, sla, discontinued
  • datasets[].source: name, url, license, commercial_ok
  • datasets[].coverage: start, end

Example: https://api.climatedata.dev/v1/catalog

GET /v1/status

How fresh each dataset is.

  • site, generated_at, overall ("ok" or "degraded")
  • datasets[]: id, status, version, checked_at, source_updated_at, sla, consecutive_failures, last_error
  • status is one of ok, pending, late, stale-upstream, failing, blocked, discontinued

Example: https://api.climatedata.dev/v1/status

GET /v1/{dataset}

Metadata for one dataset: the version that answered, its coverage, source, validation and downloads.

  • dataset, kind, title, description, cadence
  • version, current_version, pinned, published_at
  • source: id, name, publisher, url, license, commercial_ok, attribution, retrieved_at, source_updated_at
  • coverage: start, end
  • validation: status (pass, warn), warnings[]
  • series[]: id, name; for tables also key[] and partition
  • downloads[]: name, bytes, url
  • links: locations, versions, this_version

Example: https://api.climatedata.dev/v1/co2-monthly

Errors: unknown-dataset , unknown-version , data-unavailable , and rate-limited for any endpoint.

GET /v1/{dataset}/versions

The version history.

  • dataset, current, published_at
  • previous[]: earlier version ids, newest first
  • snapshots: month (YYYY-MM) to version id

Example: https://api.climatedata.dev/v1/co2-monthly/versions

Errors: unknown-dataset , and rate-limited for any endpoint.

GET /v1/{dataset}/locations

What can be requested: each series with its location ids, or for tables the partitions (under the series id "table").

  • dataset, version, kind
  • series[]: id, name, locations[] (ids)
  • locations[]: id, name

Example: https://api.climatedata.dev/v1/co2-monthly/locations

Errors: unknown-dataset , unknown-version , and rate-limited for any endpoint.

GET /v1/{dataset}/{series}/{location}.json

One series at one place, ordered by date. Also .csv.

  • meta: dataset, series, series_name, location, location_name, units, source, license, attribution
  • data[]: one object per row, with the dataset's columns

Example: https://api.climatedata.dev/v1/co2-monthly/average/noaa-mlo.json

Errors: unknown-file , unknown-format , and rate-limited for any endpoint.

GET /v1/{dataset}/table/{partition}.json

Rows of a table for one partition value; table/all has every row for tables up to 50,000 rows. Also .csv.

  • meta: dataset, key, partition (when partitioned), rows (count), units, source, license, attribution
  • rows[]: one object per row

Errors: unknown-file , unknown-format , and rate-limited for any endpoint.

GET /v1/{dataset}/download/{dataset}.csv

The whole dataset in one file. Also .parquet. Series downloads add series and location columns.

  • CSV (text/csv) or Parquet (application/vnd.apache.parquet)
  • Supports Range requests (206)

Example: https://api.climatedata.dev/v1/co2-monthly/download/co2-monthly.csv

Errors: unknown-file , and rate-limited for any endpoint.

GET /v1/{dataset}/{path}

A file of a files dataset, at its published path.

  • The file, with a content type from its extension

Errors: unknown-file , and rate-limited for any endpoint.

Datasets

Monthly atmospheric CO2 Time series

Id
co2-monthly
Updates
Monthly
Series
average, trend
Columns
date month (YYYY-MM) , value number, ppm , uncertainty number, ppm , interpolated true / false
What Path
Metadata: version, coverage, downloads, validation /v1/co2-monthly
Versions and monthly snapshots /v1/co2-monthly/versions
Series and locations /v1/co2-monthly/locations
Monthly mean mole fraction (JSON) /v1/co2-monthly/average/{location}.json
Monthly mean mole fraction (CSV) /v1/co2-monthly/average/{location}.csv
Monthly mean with the average seasonal cycle removed (JSON) /v1/co2-monthly/trend/{location}.json
Monthly mean with the average seasonal cycle removed (CSV) /v1/co2-monthly/trend/{location}.csv
Whole dataset (CSV) /v1/co2-monthly/download/co2-monthly.csv
Whole dataset (Parquet) /v1/co2-monthly/download/co2-monthly.parquet

County climate report card Time series

Id
county-climate
Updates
Monthly
Series
tavg, tmax, tmin, pcpn
Columns
date month (YYYY-MM) , value number, degF or in , normal number, degF or in , anomaly number, degF or in , rank integer
What Path
Metadata: version, coverage, downloads, validation /v1/county-climate
Versions and monthly snapshots /v1/county-climate/versions
Series and locations /v1/county-climate/locations
Average temperature (°F) (JSON) /v1/county-climate/tavg/{location}.json
Average temperature (°F) (CSV) /v1/county-climate/tavg/{location}.csv
Maximum temperature (°F) (JSON) /v1/county-climate/tmax/{location}.json
Maximum temperature (°F) (CSV) /v1/county-climate/tmax/{location}.csv
Minimum temperature (°F) (JSON) /v1/county-climate/tmin/{location}.json
Minimum temperature (°F) (CSV) /v1/county-climate/tmin/{location}.csv
Precipitation (inches) (JSON) /v1/county-climate/pcpn/{location}.json
Precipitation (inches) (CSV) /v1/county-climate/pcpn/{location}.csv
Whole dataset (CSV) /v1/county-climate/download/county-climate.csv
Whole dataset (Parquet) /v1/county-climate/download/county-climate.parquet

Global surface temperature Time series

Id
global-temperature
Updates
Monthly
Series
gistemp, hadcrut5
Columns
date month (YYYY-MM) , value number, degC , lower number, degC , upper number, degC , baseline text
What Path
Metadata: version, coverage, downloads, validation /v1/global-temperature
Versions and monthly snapshots /v1/global-temperature/versions
Series and locations /v1/global-temperature/locations
NASA GISTEMP v4 land-ocean temperature anomaly (°C, relative to 1951-1980) (JSON) /v1/global-temperature/gistemp/{location}.json
NASA GISTEMP v4 land-ocean temperature anomaly (°C, relative to 1951-1980) (CSV) /v1/global-temperature/gistemp/{location}.csv
Met Office HadCRUT5 analysis temperature anomaly (°C, relative to 1961-1990) (JSON) /v1/global-temperature/hadcrut5/{location}.json
Met Office HadCRUT5 analysis temperature anomaly (°C, relative to 1961-1990) (CSV) /v1/global-temperature/hadcrut5/{location}.csv
Whole dataset (CSV) /v1/global-temperature/download/global-temperature.csv
Whole dataset (Parquet) /v1/global-temperature/download/global-temperature.parquet

Global methane and nitrous oxide Time series

Id
greenhouse-gases
Updates
Monthly
Series
ch4, ch4-trend, n2o, n2o-trend
Columns
date month (YYYY-MM) , value number, ppb , uncertainty number, ppb
What Path
Metadata: version, coverage, downloads, validation /v1/greenhouse-gases
Versions and monthly snapshots /v1/greenhouse-gases/versions
Series and locations /v1/greenhouse-gases/locations
Methane (CH4), monthly global mean (JSON) /v1/greenhouse-gases/ch4/{location}.json
Methane (CH4), monthly global mean (CSV) /v1/greenhouse-gases/ch4/{location}.csv
Methane (CH4), monthly global mean with the average seasonal cycle removed (JSON) /v1/greenhouse-gases/ch4-trend/{location}.json
Methane (CH4), monthly global mean with the average seasonal cycle removed (CSV) /v1/greenhouse-gases/ch4-trend/{location}.csv
Nitrous oxide (N2O), monthly global mean (JSON) /v1/greenhouse-gases/n2o/{location}.json
Nitrous oxide (N2O), monthly global mean (CSV) /v1/greenhouse-gases/n2o/{location}.csv
Nitrous oxide (N2O), monthly global mean with the average seasonal cycle removed (JSON) /v1/greenhouse-gases/n2o-trend/{location}.json
Nitrous oxide (N2O), monthly global mean with the average seasonal cycle removed (CSV) /v1/greenhouse-gases/n2o-trend/{location}.csv
Whole dataset (CSV) /v1/greenhouse-gases/download/greenhouse-gases.csv
Whole dataset (Parquet) /v1/greenhouse-gases/download/greenhouse-gases.parquet

State and national climate Time series

Id
us-climate
Updates
Monthly
Series
tavg, tmax, tmin, pcpn
Columns
date month (YYYY-MM) , value number, degF or in , normal number, degF or in , anomaly number, degF or in , rank integer
What Path
Metadata: version, coverage, downloads, validation /v1/us-climate
Versions and monthly snapshots /v1/us-climate/versions
Series and locations /v1/us-climate/locations
Average temperature (°F) (JSON) /v1/us-climate/tavg/{location}.json
Average temperature (°F) (CSV) /v1/us-climate/tavg/{location}.csv
Maximum temperature (°F) (JSON) /v1/us-climate/tmax/{location}.json
Maximum temperature (°F) (CSV) /v1/us-climate/tmax/{location}.csv
Minimum temperature (°F) (JSON) /v1/us-climate/tmin/{location}.json
Minimum temperature (°F) (CSV) /v1/us-climate/tmin/{location}.csv
Precipitation (inches) (JSON) /v1/us-climate/pcpn/{location}.json
Precipitation (inches) (CSV) /v1/us-climate/pcpn/{location}.csv
Whole dataset (CSV) /v1/us-climate/download/us-climate.csv
Whole dataset (Parquet) /v1/us-climate/download/us-climate.parquet

World capitals climate Time series

Id
world-capitals
Updates
Monthly
Series
tavg
Columns
date month (YYYY-MM) , value number, degC , normal number, degC , anomaly number, degC , rank integer , capital text , latitude number, degrees_north , longitude number, degrees_east
What Path
Metadata: version, coverage, downloads, validation /v1/world-capitals
Versions and monthly snapshots /v1/world-capitals/versions
Series and locations /v1/world-capitals/locations
Air temperature at 2 m, monthly mean (°C) (JSON) /v1/world-capitals/tavg/{location}.json
Air temperature at 2 m, monthly mean (°C) (CSV) /v1/world-capitals/tavg/{location}.csv
Whole dataset (CSV) /v1/world-capitals/download/world-capitals.csv
Whole dataset (Parquet) /v1/world-capitals/download/world-capitals.parquet