Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Introduction to the GDEX API

Authors
Affiliations
NSF NCAR
NSF NCAR
NSF NCAR

Overview

The GDEX REST API provides programmatic access to dataset discovery, metadata, subset requests, and file downloads. This can be useful when automating workflows or programatically searching for data. This notebook introduces the API conventions, authentication, and the standard response envelope.

  1. Understand the base URL and endpoint structure

  2. Learn the standard JSON response envelope

  3. Authenticate with a token

  4. Make your first API call

Documentation

The first and most important resource you should take a look at is the full documentation found on the

documentation page

From here, you can see examples and descriptions of each endpoint.

Prerequisites

ConceptsImportanceNotes
HTTP basicsHelpfulGET/POST, status codes
requests libraryNecessaryPython HTTP client
JSONHelpfulParsing responses
  • Time to learn: 15 minutes


Imports

API Conventions

All endpoints live under https://gdex.ucar.edu/api/. Dataset IDs use the format d###### (six digits). Every successful response follows this envelope returned in JSON format:

{
  "status": "ok",
  "http_response": 200,
  "error_messages": [],
  "contact": "datahelp@ucar.edu",
  "data": { ... }
}

Authentication

Most read endpoints are public and do NOT require authentication. However, Subset and purge endpoints require authentication via:

  • Token: ?token=<your_token> — get yours at https://gdex.ucar.edu/accounts/profile/

Your First API Call

GET /api/datasets/ lists all available datasets with their IDs and titles.

1739 datasets
d010000 — Daily Northern Hemisphere Sea Level Pressure Grids, continuing from 1899
d010001 — Monthly Northern Hemisphere Sea-Level Pressure Grids, continuing from 1899
d010008 —  
d010014 — SUMMA Hydrology in the Pacific Northwest for Hydrologic System Vulnerability Assessments
d010018 — Atmospheric Potential Oxygen forward Model Intercomparison Project (APO-MIP)

Summary

The GDEX API follows a consistent REST pattern: GET https://gdex.ucar.edu/api/<endpoint>/. Public endpoints need no auth; subset and purge endpoints require a token from your GDEX profile.