Weatherbit 16 Day / Daily Forecast API

The 16 Day / Daily Forecast API from Weatherbit — 1 operation(s) for 16 day / daily forecast.

OpenAPI Specification

weatherbit-16-day-daily-forecast-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Weatherbit - Interactive Swagger UI Documentation 16 Day / Daily Forecast API
  description: This an interactive version of the documentation for the Weatherbit API.  The base URL for the API is [http://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/) or [https://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/). Below is the Swagger UI documentation for the API. All API requests require the `key` parameter.        An Example for a 48 hour forecast for London, UK would be `http://api.weatherbit.io/v2.0/forecast/hourly?lat=51.5072`&`lon=-0.1276`. See our [Weather API description page](https://www.weatherbit.io/api) for the full documentation.
  version: 2.0.0
servers:
- url: https://api.weatherbit.io/v2.0
- url: http://api.weatherbit.io/v2.0
tags:
- name: 16 Day / Daily Forecast
paths:
  /forecast/daily:
    get:
      tags:
      - 16 Day / Daily Forecast
      summary: Weatherbit Returns a Daily Forecast - Given Lat/Lon.
      description: "Returns a daily forecast, where each point represents one day (24hr) period. Every point has a datetime string in the format \"YYYY-MM-DD\". One day begins at 00:00 UTC, and ends at 23:59 UTC. \n"
      parameters:
      - name: lat
        in: query
        description: Latitude component of location.
        schema:
          type: number
          format: double
        example: 44.48
      - name: lon
        in: query
        description: Longitude component of location.
        schema:
          type: number
          format: double
        example: 23.85
      - name: city_id
        in: query
        description: 'City ID. Example: 4487042'
        schema:
          type: string
          format: string
        example: Kansas City
      - name: city
        in: query
        description: City search.. Example - &city=Raleigh,NC or &city=Berlin,DE or city=Paris&country=FR
        schema:
          type: string
          format: string
        example: Kansas City
      - name: postal_code
        in: query
        description: 'Postal Code. Example: 28546'
        schema:
          type: string
          format: string
        example: example-value
      - name: country
        in: query
        description: Country Code (2 letter) - to be used with postal_code.
        schema:
          type: string
          format: string
        example: US
      - name: station
        in: query
        description: Station Call ID.
        schema:
          type: string
          format: string
        example: example-value
      - name: days
        in: query
        description: Number of days to return. Default 16.
        schema:
          type: number
          format: integer
        example: 29.76
      - name: units
        in: query
        description: Convert to units. Default Metric See <a target='blank' href='/api/requests'>units field description</a>
        schema:
          type: string
          format: string
          enum:
          - S
          - I
        example: S
      - name: lang
        in: query
        description: 'Language (Default: English) See <a target=''blank'' href=''/api/requests''>language field description</a>'
        schema:
          type: string
          format: string
          enum:
          - ar
          - az
          - be
          - bg
          - bs
          - ca
          - cs
          - de
          - fi
          - fr
          - el
          - es
          - et
          - hr
          - hu
          - id
          - it
          - is
          - kw
          - nb
          - nl
          - pl
          - pt
          - ro
          - ru
          - sk
          - sl
          - sr
          - sv
          - tr
          - uk
          - zh
          - zh-tw
        example: el
      - name: key
        in: query
        description: Your registered API key.
        required: true
        schema:
          type: string
          format: string
        example: abc123xyz
      responses:
        '200':
          description: A forecast object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForecastDay'
        default:
          description: No Data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Forecast:
      type: object
      properties:
        ts:
          type: number
          description: Unix Timestamp
          example: 1551718800
        timestamp_local:
          type: string
          description: Timestamp in local time
          example: 2019-03-04 12:00:00
        timestamp_utc:
          type: string
          description: Timestamp UTC
          example: 2019-03-04 17:00:00
        datetime:
          type: string
          description: Date in format "YYYY-MM-DD:HH". All datetime is in (UTC)
          example: 2019-03-04:17
        snow:
          type: number
          description: Accumulated snowfall since last forecast point - default (mm)
          example: 10.45
        precip:
          type: number
          description: Accumulated precipitation since last forecast point - default (mm)
          example: 1.1
        temp:
          type: number
          description: Temperature (Average) - default (C)
          example: 1.0
        dewpt:
          type: number
          description: Dewpoint (Average) - default (C)
          example: 1.0
        max_temp:
          type: number
          description: Maximum daily Temperature - default (C)
          example: 1.5
        min_temp:
          type: number
          description: Minimum daily Temperature - default (C)
          example: -1.23
        app_max_temp:
          type: number
          description: Apparent Maximum daily Temperature - default (C)
          example: 4.0
        app_min_temp:
          type: number
          description: Apparent Minimum daily Temperature - default (C)
          example: -2.0
        rh:
          type: integer
          description: Relative Humidity as a percentage (%)
          example: 95
        clouds:
          type: integer
          description: Cloud cover as a percentage (%)
          example: 100
        weather:
          type: object
          properties:
            icon:
              type: string
              description: Icon code for forecast image display
              example: s02n
            code:
              type: integer
              description: Weather Condition code
              example: 601
            description:
              type: string
              description: Weather Condition description
              example: Snow
        slp:
          type: number
          description: Mean Sea level pressure (mb)
          example: 1012.89
        pres:
          type: number
          description: Pressure (mb)
          example: 1005.0
        uv:
          type: number
          description: UV Index
          example: 6.5
        vis:
          type: number
          description: Average Visibility default (KM)
          example: 3.0
        pop:
          type: number
          description: Chance of Precipitation as a percentage (%)
          example: 75.0
        moon_phase:
          type: number
          description: Moon phase
          example: 0.87
        sunrise_ts:
          type: integer
          description: Sunrise unix timestamp
          example: 1530331260
        sunset_ts:
          type: integer
          description: Sunset unix timestamp
          example: 1530331260
        moonrise_ts:
          type: integer
          description: Moonrise unix timestamp
          example: 1530331260
        moonset_ts:
          type: integer
          description: Moonset unix timestamp
          example: 1530331260
        pod:
          type: string
          description: Part of the day (d = day, n = night)
          example: n
        wind_spd:
          type: number
          description: Wind Speed (default m/s)
          example: 13.85
        wind_dir:
          type: integer
          description: Wind direction
          example: 105
        wind_cdir:
          type: string
          description: Cardinal wind direction
          example: ENE
        wind_cdir_full:
          type: string
          description: Cardinal wind direction (text)
          example: East-North-East
    Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
    ForecastDay:
      type: object
      properties:
        city_name:
          type: string
          description: City Name
          example: Raleigh
        state_code:
          type: string
          description: State Abbreviation
          example: NC
        country_code:
          type: string
          description: Country Abbreviation
          example: US
        lat:
          type: number
          description: Latitude
          example: 38.25
        lon:
          type: number
          description: Longitude
          example: -78.0
        timezone:
          type: string
          description: Local IANA time zone
          example: America/New_York
        data:
          type: array
          items:
            $ref: '#/components/schemas/Forecast'