> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verdant-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query data directly

> Return climate data directly in the response, with provenance. JSON includes a manifest and data array; CSV returns rows with version, digest and metadata-link headers. Only published public demo data is admitted. No charging, acquisition or missing-to-zero conversion.



## OpenAPI

````yaml /openapi.json post /api/v1/data/query
openapi: 3.1.0
info:
  title: Verdant Climate Data API
  version: 1.0.0
  description: >-
    Versioned climate data with preserved meaning. Discover → inspect → resolve
    → query. Small published-data queries return values directly, with explicit
    units, spatial support, missingness and provenance. Public demo endpoints
    require no credentials. Paid acquisition is not enabled; consult
    capabilities before planning a workflow.
servers:
  - url: https://api.verdant-ai.com
    description: Production (public demo data; payment test mode)
security: []
tags:
  - name: Discovery
  - name: Queries
  - name: Observations
  - name: Raster
  - name: Service
paths:
  /api/v1/data/query:
    post:
      tags:
        - Queries
      summary: Query data directly
      description: >-
        Return climate data directly in the response, with provenance. JSON
        includes a manifest and data array; CSV returns rows with version,
        digest and metadata-link headers. Only published public demo data is
        admitted. No charging, acquisition or missing-to-zero conversion.
      operationId: queryData
      requestBody:
        required: true
        description: >-
          A bounded climate query. JSON is the default representation. The
          response contains data directly; no download or acquisition job is
          required.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataRequest'
            example:
              variables:
                - air_temperature_max
              region:
                bbox:
                  - 142.3
                  - -34.45
                  - 142.4
                  - -34.35
                crs: EPSG:4326
              period:
                start: '2003-01-01'
                end: '2003-01-01'
              temporal_resolution: daily
              spatial_resolution: native
              units:
                air_temperature_max: degC
              data_class: interpolated_observation
              format: json
              missing_policy: preserve
              source_preference: silo
      responses:
        '200':
          description: >-
            Complete bounded result, returned inline. Native cell centers are
            selected west/south inclusive and east/north exclusive; dates are
            inclusive. No Content-Disposition attachment is set.
          headers:
            Content-Digest:
              description: SHA-256 of exact response bytes, formatted sha-256=:BASE64:.
              schema:
                type: string
            Verdant-Dataset-Version:
              description: Immutable version used.
              schema:
                type: string
            Verdant-Request-SHA256:
              description: SHA-256 of the validated, normalized request.
              schema:
                type: string
            Link:
              description: >-
                Dataset metadata URL with rel=describedby. Includes source
                references, license and attribution for CSV clients.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResult'
            text/csv:
              schema:
                type: string
              example: "date,longitude,latitude,variable,value,unit,tile,row,col\r\n\"2003-01-01\",\"142.35\",\"-34.4\",\"air_temperature_max\",\"30.5\",\"degC\",\"mildura\",\"48\",\"47\"\r\n"
        '400':
          description: Empty, malformed JSON, or unreadable body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request or response exceeds bounds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Content-Type must be application/json.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid contract, incompatible coverage, or unsupported query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Data service unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DataRequest:
      type: object
      properties:
        variables:
          minItems: 1
          maxItems: 1
          type: array
          items:
            type: string
            enum:
              - air_temperature_max
        region:
          type: object
          properties:
            bbox:
              type: array
              prefixItems:
                - type: number
                  minimum: -180
                  maximum: 180
                - type: number
                  minimum: -90
                  maximum: 90
                - type: number
                  minimum: -180
                  maximum: 180
                - type: number
                  minimum: -90
                  maximum: 90
              items: false
              minItems: 4
              maxItems: 4
            crs:
              type: string
              const: EPSG:4326
          required:
            - bbox
            - crs
          additionalProperties: false
        period:
          type: object
          properties:
            start:
              type: string
              format: date
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
            end:
              type: string
              format: date
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          required:
            - start
            - end
          additionalProperties: false
        temporal_resolution:
          type: string
          const: daily
        spatial_resolution:
          type: string
          const: native
        units:
          type: object
          properties:
            air_temperature_max:
              type: string
              const: degC
          required:
            - air_temperature_max
          additionalProperties: false
        data_class:
          type: string
          const: interpolated_observation
        format:
          default: json
          type: string
          enum:
            - json
            - csv
        missing_policy:
          type: string
          const: preserve
        source_preference:
          type: string
          const: silo
        dataset_version:
          description: >-
            Pin an immutable published dataset version. Omit to choose a
            compatible public demo version.
          type: string
          pattern: ^[a-zA-Z0-9_-]{1,128}$
      required:
        - variables
        - region
        - period
        - temporal_resolution
        - spatial_resolution
        - units
        - data_class
        - missing_policy
        - source_preference
      additionalProperties: false
      description: >-
        Data meaning is independent of representation and delivery. JSON
        (default) and CSV are returned inline. Bbox order:
        west,south,east,north; no antimeridian crossing. Date bounds inclusive;
        at most 31 days and 10,000 cells; actual coverage must pass resolve.
        dataset_version pins reproducibility.
    QueryResult:
      type: object
      properties:
        manifest:
          type: object
          properties:
            datasetVersion:
              type: string
              pattern: ^[a-zA-Z0-9_-]{1,128}$
            datasetContentSha256:
              type: string
              pattern: ^[a-f0-9]{64}$
            requestSha256:
              type: string
              pattern: ^[a-f0-9]{64}$
            transformVersion:
              type: string
            queryVersion:
              type: string
              const: native-cell-centers-v1
            dataClass:
              type: string
            crs:
              type: string
              const: EPSG:4326
            missingPolicy:
              type: string
              const: preserve
            spatialSelection:
              type: string
              const: cell_center_in_bbox_west_south_inclusive_east_north_exclusive
            rowCount:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            sourceManifest:
              type: array
              items:
                type: object
                properties:
                  sha256:
                    type: string
                    pattern: ^[a-f0-9]{64}$
                  url:
                    type: string
                    format: uri
                  doi:
                    type: string
                  member_path:
                    type: string
                  license:
                    type: string
                required:
                  - sha256
                additionalProperties: {}
            license:
              type: string
            attribution:
              type: string
            dataSha256:
              type: string
              pattern: ^[a-f0-9]{64}$
              description: >-
                SHA-256 of UTF-8 JSON.stringify(data), using returned row and
                field order.
          required:
            - datasetVersion
            - datasetContentSha256
            - requestSha256
            - transformVersion
            - queryVersion
            - dataClass
            - crs
            - missingPolicy
            - spatialSelection
            - rowCount
            - sourceManifest
            - license
            - attribution
            - dataSha256
          additionalProperties: false
        data:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                format: date
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
              longitude:
                type: number
              latitude:
                type: number
              variable:
                type: string
              value:
                type:
                  - number
                  - 'null'
              unit:
                type: string
              tile:
                type: string
                pattern: ^[a-zA-Z0-9_-]{1,128}$
              row:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              col:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
            required:
              - date
              - longitude
              - latitude
              - variable
              - value
              - unit
              - tile
              - row
              - col
            additionalProperties: false
      required:
        - manifest
        - data
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              path:
                type: array
                items:
                  type:
                    - string
                    - number
              message:
                type: string
            required:
              - code
              - path
              - message
            additionalProperties: {}
      required:
        - error
      additionalProperties: {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.