NOAA ERDDAP Metadata API

Inspect variable and attribute metadata for a specific dataset.

OpenAPI Specification

noaa-erddap-metadata-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ERDDAP REST Data Access Metadata API
  version: '2.23'
  description: "OpenAPI specification for ERDDAP (Environmental Research Division's Data\nAccess Program), a scientific data server providing simple, consistent\naccess to gridded and tabular scientific datasets.\n\nERDDAP runs at many institutions worldwide. Set the server URL to the base\nURL of the instance you want to access.\n\n## Two-phase workflow for data access\n\n1. **Discover** — search for datasets (`/search/`) or list all (`/info/index.json`).\n2. **Inspect** — fetch dataset metadata (`/info/{datasetID}/index.json`) to learn\n   variable names, data types, units, and coordinate ranges.\n3. **Download** — request data from `/tabledap/` or `/griddap/` using the\n   variable names and constraint ranges discovered in step 2.\n\n## Constraint syntax (tabledap and griddap)\n\nConstraints are appended to the query string as `&varName>=value` pairs.\n\n| Operator | Meaning |\n|----------|---------|\n| `=`  | equals |\n| `!=` | not equals |\n| `<`, `<=`, `>`, `>=` | numeric / time comparison |\n| `=~` | Java regular expression match |\n\nString values must be double-quoted: `&stationType=\"fixed\"`.\nTime values can be ISO 8601 (`2020-01-01T00:00:00Z`), seconds since\n1970-01-01 (Unix epoch), or relative expressions (`now-7days`, `now-1hour`).\nSpatial relative extremes are also supported: `&latitude<min(latitude)+10`.\n\n## Response format selection\n\nThe desired format is embedded in the path (`.json`, `.csv`, `.nc`, etc.)\nrather than in an `Accept` header. See the `MetadataFileType` and\n`DataFileType` schemas for the full list.\n"
  contact:
    name: ERDDAP Project
    url: https://github.com/ERDDAP/erddap
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://coastwatch.pfeg.noaa.gov/erddap
  description: NOAA CoastWatch West Coast Node (reference server)
- url: https://erddap.ioos.us/erddap
  description: US IOOS ERDDAP
- url: '{baseUrl}'
  description: Any ERDDAP server — replace with the instance base URL
  variables:
    baseUrl:
      default: https://coastwatch.pfeg.noaa.gov/erddap
      description: 'Base URL of any ERDDAP server, including the /erddap path segment

        if present (e.g. https://example.org/erddap).

        '
tags:
- name: Metadata
  description: Inspect variable and attribute metadata for a specific dataset.
paths:
  /info/{datasetID}/index.{fileType}:
    get:
      summary: Get variable and attribute metadata for a dataset
      operationId: getDatasetInfo
      tags:
      - Metadata
      description: 'Returns a table describing every variable and global attribute in the

        dataset. Each row is one of:


        | Row Type  | Variable Name | Attribute Name | Data Type | Value |

        |-----------|--------------|----------------|-----------|-------|

        | attribute | NC_GLOBAL    | title          | String    | ...   |

        | variable  | time         |                | double    |       |

        | attribute | time         | units          | String    | seconds since 1970-01-01T00:00:00Z |


        Use this response to discover variable names, units, `standard_name`,

        and the actual coordinate ranges (`actual_range` attributes) before

        constructing a data request.

        '
      parameters:
      - name: datasetID
        in: path
        required: true
        description: Unique dataset identifier (visible in search results as the `ID` column).
        schema:
          type: string
        example: erdMBsstd1day
      - $ref: '#/components/parameters/metadataFileType'
      responses:
        '200':
          description: Dataset metadata table.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetInfo'
            text/csv:
              schema:
                type: string
        '404':
          description: Dataset not found on this server.
components:
  parameters:
    metadataFileType:
      name: fileType
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/MetadataFileType'
  schemas:
    DatasetInfo:
      type: object
      description: 'Variable and attribute metadata for a single dataset, returned as an

        ERDDAP table with five columns.

        '
      properties:
        table:
          type: object
          required:
          - columnNames
          - columnTypes
          - rows
          properties:
            columnNames:
              type: array
              items:
                type: string
              example:
              - Row Type
              - Variable Name
              - Attribute Name
              - Data Type
              - Value
            columnTypes:
              type: array
              items:
                type: string
              example:
              - String
              - String
              - String
              - String
              - String
            rows:
              type: array
              description: 'Row types:

                - `attribute` + `NC_GLOBAL` — dataset-level (global) attribute.

                - `variable` — declares a variable (Attribute Name and Value are empty).

                - `attribute` + variable name — attribute of that variable.

                '
              items:
                type: array
                minItems: 5
                maxItems: 5
                items: {}
                prefixItems:
                - description: 'Row Type: ''attribute'' or ''variable'''
                  type: string
                - description: Variable Name or 'NC_GLOBAL'
                  type: string
                - description: Attribute Name (empty for variable rows)
                  type: string
                - description: Data Type (String, double, float, int, …)
                  type: string
                - description: Value
                  type: string
              example:
              - - attribute
                - NC_GLOBAL
                - title
                - String
                - NDBC Standard Meteorological Buoy Data
              - - attribute
                - NC_GLOBAL
                - institution
                - String
                - NOAA NDBC
              - - variable
                - time
                - ''
                - double
                - ''
              - - attribute
                - time
                - units
                - String
                - seconds since 1970-01-01T00:00:00Z
              - - attribute
                - time
                - actual_range
                - double
                - 1.0E9, 1.7E9
              - - variable
                - wtmp
                - ''
                - float
                - ''
              - - attribute
                - wtmp
                - long_name
                - String
                - SST
              - - attribute
                - wtmp
                - units
                - String
                - degree_C
    MetadataFileType:
      type: string
      description: Response format for discovery and metadata endpoints.
      enum:
      - html
      - csv
      - csvp
      - csv0
      - json
      - jsonlCSV1
      - jsonlCSV
      - jsonlKVP
      - tsv
      - tsvp
      - tsv0
      - xhtml