openapi: 3.0.3
info:
  title: Stormglass.io API
  description: >
    Global weather and marine data API providing forecasts, historical and real-time data
    including weather, ocean, tides and solar parameters.
  version: "2.0.0"

servers:
  - url: https://api.stormglass.io/v2
    description: Production server

security:
  - ApiKeyAuth: []

components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

  parameters:

    lat:
      name: lat
      in: query
      required: true
      description: Latitude in decimal degrees (-90 to 90)
      schema:
        type: number
        format: float
        minimum: -90
        maximum: 90
      example: 59.33

    lng:
      name: lng
      in: query
      required: true
      description: Longitude in decimal degrees (-180 to 180)
      schema:
        type: number
        format: float
        minimum: -180
        maximum: 180
      example: 18.069

    params:
      name: params
      in: query
      required: false
      description: Comma-separated list of parameters (e.g. airTemperature,waveHeight)
      schema:
        type: string

    start:
      name: start
      in: query
      required: false
      description: "Timestamp in UTC for the first hour to include in the forecast - ex. 2026-03-06T05"
      schema:
        type: string
        format: date-time

    end:
      name: end
      in: query
      required: false
      description: "Timestamp in UTC for the last hour to include in the forecast - ex. 2026-03-12T05"
      schema:
        type: string
        format: date-time

    source:
      name: source
      in: query
      required: false
      description: Data source (e.g. noaa,dwd,sg)
      schema:
        type: string

  schemas:
    Meta:
      type: object
      properties:
        lat:
          type: number
          format: float
          minimum: -90
          maximum: 90
          example: 59.33
        lng:
          type: number
          format: float
          minimum: -180
          maximum: 180
          example: 18.069
        start:
          type: string
          format: date-time
          example: "2026-03-06T05:00:00+00:00"
        end:
          type: string
          format: date-time
          example: "2026-03-06T05:00:00+00:00"
        dailyQuota:
          type: number
          description: The number of requests you are allowed to make each day
          example: 500
        requestCount:
          type: number
          description: The number of successful requests you have made since 00:00 UTC
          example: 49

    SourceValue:
      type: object
      description: >
        Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
        and value is the measured parameter.
      additionalProperties:
        type: number

    TemperatureValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: -100
            maximum: 100
            x-unit: °C
          example:
            sg: 12.1

    PressureValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 850
            maximum: 1100
            x-unit: hPa
          example:
            sg: 1013.5

    PercentageValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 100
            x-unit: '%'
          example:
            sg: 78

    SpeedValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 100
            x-unit: m/s
          example:
            sg: 5.0

    DirectionValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 360
            x-unit: °
          example:
            sg: 116.59

    UnitlessFactorValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
            x-unit: ''
          example:
            sg: 0.0

    PrecipitationValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 500
            x-unit: mm/h
          example:
            sg: 2.23

    SeaLevelValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: -30
            maximum: 30
            x-unit: m
          example:
            sg: -0.34

    DepthValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 100
            x-unit: m
          example:
            sg: 1.34

    ThicknessValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 100
            x-unit: m
          example:
            sg: 2.35

    HeightValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 100
            x-unit: m
          example:
            sg: 2.35

    PeriodValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 100
            x-unit: s
          example:
            sg: 12.53

    DistanceValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 10000
            x-unit: km
          example:
            sg: 20.99

    FluxValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1500
            x-unit: W/m²
          example:
            sg: 141.32

    MoistureValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
            x-unit: ''
          example:
            sg: 0.25

    MassConcentrationValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            x-unit: 'mg/m^3'
          example:
            sg: 0.14

    MoleConcentrationValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            x-unit: 'mmol/m^3'
          example:
            10.99

    PHValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            x-unit: 'ph'
          example:
            sg: 8.04

    SalinityValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            x-unit: '/10^3'
          example:
            sg: 35.29

    UVIndexValue:
      allOf:
        - $ref: '#/components/schemas/SourceValue'
        - type: object
          additionalProperties:
            type: number
            minimum: 0
            x-unit: W/m²
          example:
            sg: 0.3

    time:
      type: string
      format: date-time
      pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:00:00\+00:00$'
      description: >
        Timestamp in UTC (ISO 8601), always rounded to full hours.
      example: "2026-03-06T05:00:00+00:00"

    timeFullHour:
      type: string
      format: date-time
      pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:00:00\+00:00$'
      description: >
        Timestamp in UTC (ISO 8601), always rounded to full hours.
      example: "2026-03-06T05:00:00+00:00"


    WeatherParameter:
      type: string
      enum:
        - airTemperature
        - airTemperature80m
        - airTemperature100m
        - airTemperature1000hpa
        - airTemperature800hpa
        - airTemperature500hpa
        - airTemperature200hpa
        - pressure
        - cloudCover
        - currentDirection
        - currentSpeed
        - dewPointTemperature
        - gust
        - humidity
        - iceCover
        - precipitation
        - rain
        - snow
        - graupel
        - snowAlbedo
        - snowDepth
        - seaIceThickness
        - seaLevel
        - swellDirection
        - swellHeight
        - swellPeriod
        - secondarySwellDirection
        - secondarySwellHeight
        - secondarySwellPeriod
        - visibility
        - waterTemperature
        - surfaceTemperature
        - waveDirection
        - waveHeight
        - wavePeriod
        - windWaveDirection
        - windWaveHeight
        - windWavePeriod
        - windDirection
        - windDirection20m
        - windDirection30m
        - windDirection40m
        - windDirection50m
        - windDirection80m
        - windDirection100m
        - windDirection1000hpa
        - windDirection800hpa
        - windDirection500hpa
        - windDirection200hpa
        - windSpeed
        - windSpeed20m
        - windSpeed30m
        - windSpeed40m
        - windSpeed50m
        - windSpeed80m
        - windSpeed100m
        - windSpeed1000hpa
        - windSpeed800hpa
        - windSpeed500hpa
        - windSpeed200hpa

    WeatherData:
      type: object
      required:
        - time
      properties:
        time:
          $ref: '#/components/schemas/timeFullHour'

        airTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature 2m above ground given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        airTemperature80m:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature 80m above ground given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        airTemperature100m:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature 100m above ground given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        airTemperature1000hpa:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature at 100hPa given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        airTemperature800hpa:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature 800hPa given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        airTemperature500hpa:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature 500hPa given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        airTemperature200hpa:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature 200hPa given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        pressure:
          allOf:
            - $ref: '#/components/schemas/PressureValue'
            - description: >
                Air pressure given in hectopascals (hPa). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        cloudCover:
          allOf:
            - $ref: '#/components/schemas/PercentageValue'
            - description: >
                Cloud cover given in percentage. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        currentDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Current Direction in degrees. 0° indicates current coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        currentSpeed:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of current in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        dewPointTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Dew point temperature at 2m above ground in degrees Celsius (°C). Always ≤ air temperature. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        gust:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Wind gust in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        humidity:
          allOf:
            - $ref: '#/components/schemas/PercentageValue'
            - description: >
                Relative humidity in percent. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        iceCover:
          allOf:
            - $ref: '#/components/schemas/UnitlessFactorValue'
            - description: >
                Ice Cover given in a unitless factor between 0 and 1. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        precipitation:
          allOf:
            - $ref: '#/components/schemas/PrecipitationValue'
            - description: >
                Mean precipitation in kg/m²/h = mm/h. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        rain:
          allOf:
            - $ref: '#/components/schemas/PrecipitationValue'
            - description: >
                Mean rain-type precipitation in kg/m²/h = mm/h. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        snow:
          allOf:
            - $ref: '#/components/schemas/PrecipitationValue'
            - description: >
                Mean snow-type precipitation in kg/m²/h = mm/h. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        graupel:
          allOf:
            - $ref: '#/components/schemas/PrecipitationValue'
            - description: >
                Mean graupel-type precipitation in kg/m²/h = mm/h. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        seaLevel:
          allOf:
            - $ref: '#/components/schemas/SeaLevelValue'
            - description: >
                Sea level relative to MSL. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        snowAlbedo:
          allOf:
            - $ref: '#/components/schemas/UnitlessFactorValue'
            - description: >
                Reflectivity of snow cover. Unitless factor between 0.0 and 1.0. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        snowDepth:
          allOf:
            - $ref: '#/components/schemas/DepthValue'
            - description: >
                Depth of snow in meters (m). Unitless factor between 0.0 and 1.0. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        seaIceThickness:
          allOf:
            - $ref: '#/components/schemas/ThicknessValue'
            - description: >
                Thickness of sea ice in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        swellDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of swell waves in degrees. 0° indicates swell coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        swellHeight:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Height of swell waves in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        swellPeriod:
          allOf:
            - $ref: '#/components/schemas/PeriodValue'
            - description: >
                Period of swell waves in seconds (s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        secondarySwellDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of secondary swell waves in degrees. 0° indicates swell coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        secondarySwellHeight:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Height of secondary swell waves in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        secondarySwellPeriod:
          allOf:
            - $ref: '#/components/schemas/PeriodValue'
            - description: >
                Period of secondary swell waves in seconds (s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        visibility:
          allOf:
            - $ref: '#/components/schemas/DistanceValue'
            - description: >
                Horizontal visibility given in kilometers (km). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        waterTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Water temperature given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        surfaceTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Surface temperature  given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        waveDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of combined wind and swell waves. 0° indicates waves coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        waveHeight:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Significant Height of combined wind and swell waves in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        wavePeriod:
          allOf:
            - $ref: '#/components/schemas/PeriodValue'
            - description: >
                Period of combined wind abd swell waves in seconds (s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windWaveDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind waves. 0° indicates waves coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windWaveHeight:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Height of wind waves in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windWavePeriod:
          allOf:
            - $ref: '#/components/schemas/PeriodValue'
            - description: >
                Period of wind waves in seconds (s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 10m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection20m:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 20m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection30m:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 30m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection40m:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 40m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection50m:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 50m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection80m:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 80m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection100m:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 80m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection1000hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 1000hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection800hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 800hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection500hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 500hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection200hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 200hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 10m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed20m:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 20m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed30m:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 30m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed40m:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 40m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed50m:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 50m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed80m:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 80m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed100m:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 100m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed1000hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 1000hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed800hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 800hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed500hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 500hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed200hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 200hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

      additionalProperties: false
      minProperties: 2



    HistoricalParameter:
      type: string
      enum:
        - airTemperature
        - bathymetry
        - pressure
        - cloudCover
        - currentDirection
        - currentSpeed
        - dewPointTemperature
        - gust
        - iceCover
        - precipitation
        - rain
        - snow
        - snowAlbedo
        - swellDirection
        - swellHeight
        - swellPeriod
        - secondarySwellDirection
        - secondarySwellHeight
        - secondarySwellPeriod
        - waveDirection
        - waveHeight
        - wavePeriod
        - windWaveDirection
        - windWaveHeight
        - windWavePeriod
        - windDirection
        - windDirection100m
        - windDirection1000hpa
        - windDirection800hpa
        - windDirection500hpa
        - windDirection200hpa
        - windSpeed
        - windSpeed100m
        - windSpeed1000hpa
        - windSpeed800hpa
        - windSpeed500hpa
        - windSpeed200hpa
        - soilMoisture
        - soilMoisture10cm
        - soilMoisture40cm
        - soilMoisture100cm
        - soilTemperature
        - soilTemperature10cm
        - soilTemperature40cm
        - soilTemperature100cm
        - solarDownwardRadiationFlux
        - surfaceNetShortwaveRadiationDownwardsFlux


    HistoricalData:
      type: object
      required:
        - time
      properties:
        time:
          $ref: '#/components/schemas/timeFullHour'

        airTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Air temperature 2m above ground given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        bathymetry:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Wave and currents model depth in meters. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)

        pressure:
          allOf:
            - $ref: '#/components/schemas/PressureValue'
            - description: >
                Air pressure given in hectopascals (hPa). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        cloudCover:
          allOf:
            - $ref: '#/components/schemas/PercentageValue'
            - description: >
                Cloud cover given in percentage. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        currentDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Current Direction in degrees. 0° indicates current coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.
                example:
                  cmems: 235.32
                  sg: 235.32

        currentSpeed:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of current in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.
                example:
                  cmems: 0.22
                  sg: 0.22

        dewPointTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Dew point temperature at 2m above ground in degrees Celsius (°C). Always ≤ air temperature. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        gust:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Wind gust in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        iceCover:
          allOf:
            - $ref: '#/components/schemas/UnitlessFactorValue'
            - description: >
                Ice Cover given in a unitless factor between 0 and 1. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        precipitation:
          allOf:
            - $ref: '#/components/schemas/PrecipitationValue'
            - description: >
                Mean precipitation in kg/m²/h = mm/h. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        rain:
          allOf:
            - $ref: '#/components/schemas/PrecipitationValue'
            - description: >
                Mean rain-type precipitation in kg/m²/h = mm/h. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        snow:
          allOf:
            - $ref: '#/components/schemas/PrecipitationValue'
            - description: >
                Mean snow-type precipitation in kg/m²/h = mm/h. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        snowAlbedo:
          allOf:
            - $ref: '#/components/schemas/UnitlessFactorValue'
            - description: >
                Reflectivity of snow cover. Unitless factor between 0.0 and 1.0. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        swellDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of swell waves in degrees. 0° indicates swell coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        swellHeight:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Height of swell waves in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        swellPeriod:
          allOf:
            - $ref: '#/components/schemas/PeriodValue'
            - description: >
                Period of swell waves in seconds (s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        waveDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of combined wind and swell waves. 0° indicates waves coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        waveHeight:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Significant Height of combined wind and swell waves in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        wavePeriod:
          allOf:
            - $ref: '#/components/schemas/PeriodValue'
            - description: >
                Period of combined wind abd swell waves in seconds (s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windWaveDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind waves. 0° indicates waves coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windWaveHeight:
          allOf:
            - $ref: '#/components/schemas/HeightValue'
            - description: >
                Height of wind waves in meters (m). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windWavePeriod:
          allOf:
            - $ref: '#/components/schemas/PeriodValue'
            - description: >
                Period of wind waves in seconds (s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 10m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection100m:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 80m above ground. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection1000hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 1000hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection800hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 800hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection500hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 500hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windDirection200hpa:
          allOf:
            - $ref: '#/components/schemas/DirectionValue'
            - description: >
                Direction of wind at 200hPa. 0° indicates wind coming from north. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 10m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed100m:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 100m above ground in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed1000hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 1000hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed800hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 800hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed500hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 500hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        windSpeed200hpa:
          allOf:
            - $ref: '#/components/schemas/SpeedValue'
            - description: >
                Speed of wind at 200hpa in meters per second (m/s). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilMoisture:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 0 to 10 cm below surface.

        soilMoisture10cm:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 10 to 40 cm below surface.

        soilMoisture40cm:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 40 to 100 cm below surface.

        soilMoisture100cm:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 100 to 200 cm below surface.

        soilTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 0 to 10 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilTemperature10cm:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 10 to 40 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilTemperature40cm:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 40 to 100 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilTemperature100cm:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 100 to 200 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        solarDownwardRadiationFlux:
          allOf:
            - $ref: '#/components/schemas/FluxValue'
            - description: >
                Solar downward radiation flux at ground or sea level (W/m²) - (ECMWF source parameter name: "Surface net short-wave solar radiation"). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        surfaceNetShortwaveRadiationDownwardsFlux:
          allOf:
            - $ref: '#/components/schemas/FluxValue'
            - description: >
                Surface net short-wave radiation downwards flux at ground or sea level (W/m²) - (ECMWF source parameter name: "Surface net short-wave solar radiation downwards"). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)

      additionalProperties: false
      minProperties: 2


    BioParameter:
      type: string
      enum:
        - chlorophyll
        - iron
        - nitrate
        - phyto
        - oxygen
        - ph
        - phytoplankton
        - phosphate
        - silicate
        - salinity
        - soilMoisture
        - soilMoisture10cm
        - soilMoisture40cm
        - soilMoisture100cm
        - soilTemperature
        - soilTemperature10cm
        - soilTemperature40cm
        - soilTemperature100cm

    BioData:
      type: object
      required:
        - time
      properties:
        time:
          $ref: '#/components/schemas/timeFullHour'

        chlorophyll:
          allOf:
            - $ref: '#/components/schemas/MassConcentrationValue'
            - description: >
                Mass concentration of chlorophyll a in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.
        iron:
          allOf:
            - $ref: '#/components/schemas/MoleConcentrationValue'
            - description: >
                Mole concentration of dissolved iron in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.
        nitrate:
          allOf:
            - $ref: '#/components/schemas/MoleConcentrationValue'
            - description: >
                Mole concentration of nitrate in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.
        oxygen:
          allOf:
            - $ref: '#/components/schemas/MoleConcentrationValue'
            - description: >
                Mole concentration of dissolved molecular oxygen in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        phyto:
          allOf:
            - $ref: '#/components/schemas/MassConcentrationValue'
            - description: >
                Net primary production of biomass expressed as carbon per unit volume in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        ph:
          allOf:
            - $ref: '#/components/schemas/PHValue'
            - description: >
                Sea water ph reported on total scale. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        phytoplankton:
          allOf:
            - $ref: '#/components/schemas/MoleConcentrationValue'
            - description: >
                Mole concentration of phytoplankton expressed as carbon in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        phosphate:
          allOf:
            - $ref: '#/components/schemas/MoleConcentrationValue'
            - description: >
                Mole concentration of phosphate in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        silicate:
          allOf:
            - $ref: '#/components/schemas/MoleConcentrationValue'
            - description: >
                Mole concentration of silicate in sea water. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        salinity:
          allOf:
            - $ref: '#/components/schemas/SalinityValue'
            - description: >
                Sea water salinity given in per mille. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilMoisture:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 0 to 10 cm below surface. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilMoisture10cm:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 10 to 40 cm below surface. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilMoisture40cm:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 40 to 100 cm below surface. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilMoisture100cm:
          allOf:
            - $ref: '#/components/schemas/MoistureValue'
            - description: >
                Volumetric soil moisture content at 100 to 200 cm below surface. Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 0 to 10 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilTemperature10cm:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 10 to 40 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilTemperature40cm:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 40 to 100 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        soilTemperature100cm:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Soil temperature at 100 to 200 cm below surface in Celcius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        surfaceTemperature:
          allOf:
            - $ref: '#/components/schemas/TemperatureValue'
            - description: >
                Surface temperature  given in Celsius (°C). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

      additionalProperties: false
      minProperties: 2

    SolarParameter:
      type: string
      enum:
        - uvIndex
        - solarDownwardRadiationFlux
        - surfaceNetShortwaveRadiationDownwardsFlux

    SolarData:
      type: object
      required:
        - time
      properties:
        time:
          $ref: '#/components/schemas/timeFullHour'

        uvIndex:
          allOf:
            - $ref: '#/components/schemas/UVIndexValue'
            - description: >
                Ultraviolet (UV) radiation at ground or sea level (W/m²). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        solarDownwardRadiationFlux:
          allOf:
            - $ref: '#/components/schemas/FluxValue'
            - description: >
                Solar downward radiation flux at ground or sea level (W/m²) - (ECMWF source parameter name: "Surface net short-wave solar radiation"). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)
                and value is the measured parameter.

        surfaceNetShortwaveRadiationDownwardsFlux:
          allOf:
            - $ref: '#/components/schemas/FluxValue'
            - description: >
                Surface net short-wave radiation downwards flux at ground or sea level (W/m²) - (ECMWF source parameter name: "Surface net short-wave solar radiation downwards"). Key-value pairs where key is the data source (e.g. noaa, ecmwf, sg)

      additionalProperties: false
      minProperties: 2


    AstronomyData:
      type: object
      properties:
        astronomicalDawn:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T01:19:34+00:00
        astronomicalDusk:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T20:23:04+00:00
        civilDawn:
         allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T03:18:21+00:00
        civilDusk:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T18:24:17+00:00
        moonFraction:
          allOf:
            - $ref: '#/components/schemas/UnitlessFactorValue'
            - example: 0.8511389255011577
        moonPhase:
          type: object
          properties:
            closest:
              type: object
              properties:
                text:
                  type: string
                  example: Third quarter
                time:
                  allOf:
                  - $ref: '#/components/schemas/time'
                  - example: 2026-04-09T15:49:00+00:00
                value:
                  allOf:
                    - $ref: '#/components/schemas/UnitlessFactorValue'
                    - example: 0.75

            current:
              type: object
              properties:
                text:
                  type: string
                  example: Waning gibbous
                time:
                  allOf:
                  - $ref: '#/components/schemas/time'
                  - example: 2026-04-06T00:00:00+00:00
                value:
                  allOf:
                    - $ref: '#/components/schemas/UnitlessFactorValue'
                    - example: 0.6260832133442481
        moonrise:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-05T23:05:20+00:00
        moonset:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T04:09:23+00:00
        nauticalDawn:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T02:24:15+00:00
        nauticalDusk:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T19:18:22+00:00
        sunrise:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T04:01:10+00:00
        sunset:
          allOf:
            - $ref: '#/components/schemas/time'
            - example: 2026-04-06T17:41:28+00:00
        time:
          allOf:
            - $ref: '#/components/schemas/timeFullHour'
            - example: 2026-04-06T00:00:00+00:00

    TideExtreme:
      type: object
      properties:
        time:
          $ref: '#/components/schemas/time'
        height:
          type: number
          example: 2.23523
          x-unit: m
        type:
          type: string
          enum: [high, low]

  responses:
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: object
                properties:
                  key:
                    type: string
                    example: API Key is invalid

    QuotaExceededError:
      description: "Error: Payment required (quota exceeded)"
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: object
                properties:
                  key:
                    type: string
                    example: API Quota Exceeded
              meta:
                type: object
                properties:
                  dailyQuota:
                    type: number
                    example: 10
                  requestCount:
                    type: number
                    example: 11

    UnprocessableEntity:
      description: "Error: Unprocessable Entity"
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: object
                properties:
                  key:
                    type: string
                    example: This string will explain what parameter that we cannot process

paths:

  /weather/point:
    get:
      summary: Get weather data for a point
      description: Returns weather and marine data for a specific coordinate.
      parameters:
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lng'
        - $ref: '#/components/parameters/start'
        - $ref: '#/components/parameters/end'
        - $ref: '#/components/parameters/source'
        - name: params
          in: query
          required: true
          schema:
            type: array
            minItems: 1
            items:
              $ref: '#/components/schemas/WeatherParameter'
          style: form
          explode: false
      responses:
        '200':
          description: Weather data response
          content:
            application/json:
              schema:
                type: object
                properties:
                  hours:
                    type: array
                    items:
                      $ref: '#/components/schemas/WeatherData'
                  meta:
                    $ref: '#/components/schemas/Meta'

        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /historical/point:
    get:
      summary: Get historical weather data for a point
      description: Returns historical weather and marine data for a specific coordinate.
      parameters:
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lng'

        - name: start
          in: query
          required: false
          description: >
              UTC timestamp for the first hour to include.
              Either start or end must be included.
          schema:
            type: string
            format: date-time

        - name: end
          in: query
          required: false
          description: >
              UTC timestamp for the last hour to include. An end date must be a at least one week before current date.
              Either start or end must be included.
          schema:
            type: string
            format: date-time

        - name: source
          in: query
          required: false
          schema:
            type: string
          description: Data source (e.g. ecmwf,cmems,sg)

        - name: params
          in: query
          required: true
          schema:
            type: array
            minItems: 1
            items:
              $ref: '#/components/schemas/HistoricalParameter'
          style: form
          explode: false

      responses:
        '200':
          description: Historical data response
          content:
            application/json:
              schema:
                type: object
                properties:
                  hours:
                    type: array
                    items:
                      $ref: '#/components/schemas/HistoricalData'
                  meta:
                    $ref: '#/components/schemas/Meta'

        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /bio/point:
    get:
      summary: Get bio data for a point
      description: Returns bio data globally for both land and sea for a specific coordinate.
      parameters:
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lng'
        - $ref: '#/components/parameters/start'
        - $ref: '#/components/parameters/end'
        - $ref: '#/components/parameters/source'
        - name: params
          in: query
          required: true
          schema:
            type: array
            minItems: 1
            items:
              $ref: '#/components/schemas/BioParameter'
          style: form
          explode: false

      responses:
        '200':
          description: Bio data response
          content:
            application/json:
              schema:
                type: object
                properties:
                  hours:
                    type: array
                    items:
                      $ref: '#/components/schemas/BioData'
                  meta:
                    $ref: '#/components/schemas/Meta'

        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /solar/point:
    get:
      summary: Get solar data for a point
      description: Returns solar data globally for a specific coordinate.
      parameters:
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lng'
        - $ref: '#/components/parameters/start'
        - $ref: '#/components/parameters/end'
        - name: params
          in: query
          required: true
          schema:
            type: array
            minItems: 1
            items:
              $ref: '#/components/schemas/SolarParameter'
          style: form
          explode: false
      responses:
        '200':
          description: Solar data response
          content:
            application/json:
              schema:
                type: object
                properties:
                  hours:
                    type: array
                    items:
                      $ref: '#/components/schemas/SolarData'
                  meta:
                    $ref: '#/components/schemas/Meta'

        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /tide/extremes/point:
    get:
      summary: Get tide extremes for a point
      description: Retrieve information about high and low tide times and the corresponding relative sea level in meters for a single point.
      parameters:
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lng'
        - $ref: '#/components/parameters/start'
        - $ref: '#/components/parameters/end'
        - name: datum
          in: query
          description: Datum values will be relative to. Either LAT, MLLW, MLW, MSL, MHW, MHHW or HAT.
          schema:
            type: string
            enum: [LAT, MLLW, MLW, MSL, MHW, MHHW, HAT]
            default: MSL
          required: false
      responses:
        '200':
          description: Tide extremes data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TideExtreme'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /tide/stations:
    get:
      summary: List all tide stations
      description: The Tide Stations List Requests is used to list all available stations.
      responses:
        '200':
          description: List of tide stations
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: "boulogne"
                        lat:
                          type: number
                          example: 50.728
                        lng:
                          type: number
                          example: 1.577
                        source:
                          type: string
                          example: sg
        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /tide/stations/area:
    get:
      summary: List all tide stations within an area
      description: The Tide Stations Area Request will list all available tide stations within a defined geographic area.
      parameters:
        - name: box
          in: query
          required: true
          schema:
            type: string
            description: >
                Top right and bottom left coordinates of box on format: lat1,lng1:lat2,lng2
          example: 48.691,-9.774:43.231,-0.2655
      responses:
        '200':
          description: List of tide stations
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: "boulogne"
                        lat:
                          type: number
                          example: 50.728
                        lng:
                          type: number
                          example: 1.577
                        source:
                          type: string
                          example: sg

        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /elevation/point:
    get:
      summary: Get elevation/bathymetry for a point
      description: >
          The elevation request is used to fetch elevation data (bathymetry for oceans and topography for land) for a point. The stormglass API provides elevation data globally.
      parameters:
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lng'
      responses:
        '200':
          description: Elevation data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      elevation:
                        type: number
                        example: 5.23
                  meta:
                    $ref: '#/components/schemas/Meta'

        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'

  /astronomy/point:
    get:
      summary: Retrieve sunrise, sunset, moonrise, moonset and moon phase for a single point.
      description: Retrieve sunrise, sunset, moonrise, moonset and moon phase for a single point.

      parameters:
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lng'
        - $ref: '#/components/parameters/start'
        - $ref: '#/components/parameters/end'
      responses:
        '200':
          description: Astronomy data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AstronomyData'
                  meta:
                    $ref: '#/components/schemas/Meta'

        '402':
          $ref: '#/components/responses/QuotaExceededError'

        '403':
          $ref: '#/components/responses/ForbiddenError'

        '422':
          $ref: '#/components/responses/UnprocessableEntity'
