openapi: 3.0.1
servers:
  - url: https://weather.visualcrossing.com
info:
  contact:
    email: info@visualcrossing.com
    name: Visual Crossing Corporation
    url: https://www.visualcrossing.com/weather-api
    x-twitter: visualcrossing
  description: Weather Forecast and Historical Weather Data via RESTful API.
  license:
    name: Visual Crossing Weather API
    url: https://www.visualcrossing.com/weather-api
  termsOfService: https://www.visualcrossing.com/weather-services-terms
  title: Visual Crossing Weather API
  version: "4.6"
  x-apisguru-categories:
    - location
  x-logo:
    url: https://twitter.com/visualcrossing/profile_image?size=original
  x-origin:
    - format: openapi
      url: https://www.visualcrossing.com/weather/specs/visualcrossing-weather-api-openapi.json
      version: "3.0"
  x-providerName: visualcrossing.com
  x-serviceName: weather
externalDocs:
  description: Full Timeline Weather API Documentation
  url: https://www.visualcrossing.com/resources/documentation/weather-api/timeline-weather-api/
paths:
  "/VisualCrossingWebServices/rest/services/timeline/{location}":
    get:
      description: Seamless access to daily and hourly historical and forecast weather data plus weather alerts, events and current conditions.
      parameters:
        - description: Locaton of interest as an address, partial address or decimal latitude,longtude value
          example: London,UK
          in: path
          name: location
          required: true
          schema:
            type: string
        - description: data format of the output either json or CSV
          example: json
          in: query
          name: contentType
          schema:
            type: string
        - example: us
          in: query
          name: unitGroup
          schema:
            type: string
        - description: data to include in the output (required for CSV format - days,hours,alerts,current,events )
          example: days
          in: query
          name: include
          schema:
            type: string
        - description: Language to use for weather descriptions
          example: us
          in: query
          name: lang
          schema:
            type: string
        - example: INSERT_YOUR_KEY
          in: query
          name: key
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Auto generated using Swagger Inspector
      servers:
        - url: https://weather.visualcrossing.com
      summary: Historical and Forecast Weather API
      tags:
        - Timeline Weather API (15-day forecast request)
    servers:
      - url: https://weather.visualcrossing.com
  "/VisualCrossingWebServices/rest/services/timeline/{location}/{startdate}":
    get:
      description: Seamless access to daily and hourly historical and forecast weather data plus weather alerts, events and current conditions.
      parameters:
        - example: London,UK
          in: path
          name: location
          required: true
          schema:
            type: string
        - example: 2022-02-01T00:00:00.000Z
          in: path
          name: startdate
          required: true
          schema:
            type: string
        - description: data format of the output either json or CSV
          example: json
          in: query
          name: contentType
          schema:
            type: string
        - example: us
          in: query
          name: unitGroup
          schema:
            type: string
        - description: data to include in the output (required for CSV format - days,hours,alerts,current,events )
          example: days
          in: query
          name: include
          schema:
            type: string
        - description: Language to use for weather descriptions
          example: us
          in: query
          name: lang
          schema:
            type: string
        - example: INSERT_YOUR_KEY
          in: query
          name: key
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Auto generated using Swagger Inspector
      servers:
        - url: https://weather.visualcrossing.com
      summary: Historical and Forecast Weather API
      tags:
        - Timeline Weather API (single date request)
    servers:
      - url: https://weather.visualcrossing.com
  "/VisualCrossingWebServices/rest/services/timeline/{location}/{startdate}/{enddate}":
    get:
      description: Seamless access to daily and hourly historical and forecast weather data plus weather alerts, events and current conditions.
      parameters:
        - example: London,UK
          in: path
          name: location
          required: true
          schema:
            type: string
        - example: 2022-02-01T00:00:00.000Z
          in: path
          name: startdate
          required: true
          schema:
            type: string
        - example: 2022-03-01T00:00:00.000Z
          in: path
          name: enddate
          required: true
          schema:
            type: string
        - description: data format of the output either json or CSV
          example: json
          in: query
          name: contentType
          schema:
            type: string
        - example: us
          in: query
          name: unitGroup
          schema:
            type: string
        - description: data to include in the output (required for CSV format - days,hours,alerts,current,events )
          example: days
          in: query
          name: include
          schema:
            type: string
        - description: Language to use for weather descriptions
          example: us
          in: query
          name: lang
          schema:
            type: string
        - example: INSERT_YOUR_KEY
          in: query
          name: key
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Auto generated using Swagger Inspector
      servers:
        - url: https://weather.visualcrossing.com
      summary: Historical and Forecast Weather API
      tags:
        - Timeline Weather API (date range request)
    servers:
      - url: https://weather.visualcrossing.com
  /VisualCrossingWebServices/rest/services/weatherdata/forecast:
    get:
      description: Provides access to weather forecast information. The forecast is available for up to 15 days at the hourly, 12 hour and daily summary level.
      parameters:
        - example: "false"
          in: query
          name: sendAsDatasource
          schema:
            type: boolean
        - example: "false"
          in: query
          name: allowAsynch
          schema:
            type: boolean
        - example: "false"
          in: query
          name: shortColumnNames
          schema:
            type: boolean
        - example: Sterling%2C%20VA%2C%20US
          in: query
          name: locations
          schema:
            type: string
        - example: "24"
          in: query
          name: aggregateHours
          schema:
            type: string
        - example: json
          in: query
          name: contentType
          schema:
            type: string
        - example: us
          in: query
          name: unitGroup
          schema:
            type: string
        - example: INSERT_YOUR_KEY
          in: query
          name: key
          schema:
            type: string
      responses:
        "200":
          description: Auto generated using Swagger Inspector
      servers:
        - url: https://weather.visualcrossing.com
      summary: Weather Forecast API
      tags:
        - Weather Forecast
    servers:
      - url: https://weather.visualcrossing.com
  /VisualCrossingWebServices/rest/services/weatherdata/history:
    get:
      description: The weather history data is suitable for retrieving hourly or daily historical weather records.
      parameters:
        - example: "-1"
          in: query
          name: maxDistance
          schema:
            type: string
        - example: "false"
          in: query
          name: shortColumnNames
          schema:
            type: boolean
        - example: 2020-02-04T00%3A00%3A00
          in: query
          name: endDateTime
          schema:
            type: string
        - example: "24"
          in: query
          name: aggregateHours
          schema:
            type: string
        - example: "false"
          in: query
          name: collectStationContributions
          schema:
            type: boolean
        - example: 2020-01-28T00%3A00%3A00
          in: query
          name: startDateTime
          schema:
            type: string
        - example: "-1"
          in: query
          name: maxStations
          schema:
            type: string
        - example: "false"
          in: query
          name: allowAsynch
          schema:
            type: boolean
        - example: Sterling%2C%20VA%2C%20US
          in: query
          name: locations
          schema:
            type: string
        - example: "false"
          in: query
          name: includeNormals
          schema:
            type: boolean
        - example: json
          in: query
          name: contentType
          schema:
            type: string
        - example: us
          in: query
          name: unitGroup
          schema:
            type: string
        - example: INSERT_YOUR_KEY
          in: query
          name: key
          schema:
            type: string
      responses:
        "200":
          description: Auto generated using Swagger Inspector
      servers:
        - url: https://weather.visualcrossing.com
      summary: Retrieves hourly or daily historical weather records.
      tags:
        - Historical Weather
    servers:
      - url: https://weather.visualcrossing.com
