openapi: 3.0.1 info: title: Weatherbit - Interactive Swagger UI Documentation 16 Day / Daily Forecast 240 Hour / Hourly 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: 240 Hour / Hourly Forecast paths: /forecast/hourly: get: tags: - 240 Hour / Hourly Forecast summary: Weatherbit Returns an Hourly Forecast - Given a Lat/lon. description: "Returns an hourly forecast, where each point represents a one hour period. Every point has a datetime string in the format \"YYYY-MM-DD:HH\". Time is UTC. \n" parameters: - name: lat in: query description: Latitude component of location. schema: type: number format: double example: 86.82 - name: lon in: query description: Longitude component of location. schema: type: number format: double example: 7.04 - 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: units in: query description: Convert to units. Default Metric See units field description schema: type: string format: string enum: - S - I example: I - name: lang in: query description: 'Language (Default: English) See language field description' 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: fr - name: hours in: query description: Number of hours to return. schema: type: integer format: integer example: 71 - 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/ForecastHourly' default: description: No Data. content: application/json: schema: $ref: '#/components/schemas/Error' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: Error: type: object properties: code: type: integer format: int32 message: type: string ForecastHour: 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 - Default (C) example: -1.5 dewpt: type: number description: Dewpoint - Default (C) example: -4.0 app_temp: type: number description: Apparent Temperature - Default (C) example: 4.5 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: s02d 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 solar_rad: type: number description: Estimated solar radiation (W/m^2) example: 300.0 ghi: type: number description: Global horizontal solar irradiance (W/m^2) example: 1000.0 dhi: type: number description: Diffuse normal solar irradiance (W/m^2) example: 200.0 dni: type: number description: Direct normal solar irradiance (W/m^2) example: 400.0 vis: type: number description: Visibility - Default (KM) example: 1.0 pod: type: string description: Part of day (d = day, n = night) example: d pop: type: number description: Chance of Precipitation as a percentage (%) example: 75.0 wind_spd: type: number description: Wind Speed - Default (m/s) example: 13.85 wind_gust_spd: type: number description: Wind Gust Speed - Default (m/s) example: 16.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 ForecastHourly: 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/ForecastHour'