> ## Documentation Index
> Fetch the complete documentation index at: https://arnaud.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Current Weather Data API

> Reference for the Current Weather Data API endpoint.

Use this endpoint to fetch current weather conditions for a given location.


## OpenAPI

````yaml get /weather
openapi: 3.1.0
info:
  title: Current Weather Data API
  description: Get the current weather for any location worldwide.
  license:
    name: CC BY-SA 4.0 Deed - Attribution-ShareAlike 4.0 International
    url: https://creativecommons.org/licenses/by-sa/4.0/
  version: 2.5.0
  contact:
    name: OpenWeather
    url: https://openweathermap.org/
    email: info@openweathermap.org
servers:
  - url: https://api.openweathermap.org/data/2.5
security:
  - ApiKey: []
tags:
  - name: Weather
    description: Operations related to weather data
paths:
  /weather:
    get:
      tags:
        - Weather
      summary: Get current weather data
      description: |
        Retrieve the current weather conditions for a specified location
        using latitude and longitude coordinates.
      operationId: getCurrentWeather
      parameters:
        - $ref: '#/components/parameters/appid'
        - $ref: '#/components/parameters/lat'
        - $ref: '#/components/parameters/lon'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/units'
        - $ref: '#/components/parameters/lang'
      responses:
        '200':
          description: Successful response - Current weather data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WeatherDataJson'
              examples:
                ParisWeather:
                  summary: Weather Data for Paris, France
                  value:
                    coord:
                      lon: 2.3488
                      lat: 48.8534
                    weather:
                      - id: 803
                        main: Clouds
                        description: broken clouds
                        icon: 04d
                    base: stations
                    main:
                      temp: 289.28
                      feels_like: 288.7
                      temp_min: 288.21
                      temp_max: 291.69
                      pressure: 1022
                      humidity: 67
                    visibility: 10000
                    wind:
                      speed: 2.57
                      deg: 40
                    clouds:
                      all: 75
                    dt: 1717406455
                    sys:
                      type: 2
                      id: 2041230
                      country: FR
                      sunrise: 1717386622
                      sunset: 1717444055
                    timezone: 7200
                    id: 2988507
                    name: Paris
                    cod: 200
            application/xml:
              schema:
                $ref: '#/components/schemas/WeatherDataXml'
            text/html:
              schema:
                type: string
                description: >-
                  HTML representation of the weather data, with values formatted
                  for display. This output is a preformatted widget snippet and
                  may include HTTP asset links.
        '400':
          description: Bad Request - Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidParameters:
                  $ref: '#/components/examples/InvalidParameters'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidParameters:
                  $ref: '#/components/examples/InvalidParameters'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidApiKey:
                  $ref: '#/components/examples/InvalidApiKey'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidApiKey:
                  $ref: '#/components/examples/InvalidApiKey'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    appid:
      name: appid
      in: query
      description: API key for authentication
      required: true
      schema:
        type: string
    lat:
      name: lat
      in: query
      description: Latitude of the desired location
      required: true
      schema:
        type: number
        format: float
        minimum: -90
        maximum: 90
    lon:
      name: lon
      in: query
      description: Longitude of the desired location
      required: true
      schema:
        type: number
        format: float
        minimum: -180
        maximum: 180
    mode:
      name: mode
      in: query
      description: |
        Response format.

        Default is `json` if you don't use the `mode` parameter.
      required: false
      schema:
        type: string
        enum:
          - html
          - json
          - xml
    units:
      name: units
      in: query
      description: >
        Units of measurement:


        * `standard`: Kelvin for temperature, meters per second for wind speed
        and wind gust

        * `metric`: Celsius for temperature, meters per second for wind speed
        and wind gust

        * `imperial`: Fahrenheit for temperature, miles per hour for wind speed
        and wind gust


        Default is `standard` if you don't use the `units` parameter.
      required: false
      schema:
        type: string
        enum:
          - standard
          - metric
          - imperial
    lang:
      name: lang
      in: query
      description: >
        Output language for weather description (`weather.description`) and city
        name (`name`) fields in the API response.


        Available options:


        * `sq`: Albanian

        * `af`: Afrikaans

        * `ar`: Arabic

        * `az`: Azerbaijani

        * `eu`: Basque

        * `be`: Belarusian

        * `bg`: Bulgarian

        * `ca`: Catalan

        * `zh_cn`: Chinese Simplified

        * `zh_tw`: Chinese Traditional

        * `hr`: Croatian

        * `cz`: Czech

        * `da`: Danish

        * `nl`: Dutch

        * `en`: English

        * `fi`: Finnish

        * `fr`: French

        * `gl`: Galician

        * `de`: German

        * `el`: Greek

        * `he`: Hebrew

        * `hi`: Hindi

        * `hu`: Hungarian

        * `is`: Icelandic

        * `id`: Indonesian

        * `it`: Italian

        * `ja`: Japanese

        * `kr`: Korean

        * `ku`: Kurmanji (Kurdish)

        * `la`: Latvian

        * `lt`: Lithuanian

        * `mk`: Macedonian

        * `no`: Norwegian

        * `fa`: Persian (Farsi)

        * `pl`: Polish

        * `pt`: Portuguese

        * `pt_br`: Português Brasil

        * `ro`: Romanian

        * `ru`: Russian

        * `sr`: Serbian

        * `sk`: Slovak

        * `sl`: Slovenian

        * `sp`, `es`: Spanish

        * `sv`, `se`: Swedish

        * `th`: Thai

        * `tr`: Turkish

        * `ua`, `uk`: Ukrainian

        * `vi`: Vietnamese

        * `zu`: Zulu


        Default is English if you don't use the `lang` parameter.
      required: false
      schema:
        type: string
  schemas:
    WeatherDataJson:
      type: object
      properties:
        coord:
          $ref: '#/components/schemas/Coord'
        weather:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                description: Weather condition identifier
              main:
                type: string
                description: Group of weather parameters (Rain, Snow, Clouds etc.)
              description:
                type: string
                description: Weather condition within the group
              icon:
                type: string
                description: Weather icon identifier
        base:
          type: string
          description: Internal parameter
        main:
          type: object
          properties:
            temp:
              type: number
              description: Temperature
            feels_like:
              type: number
              description: Temperature accounting for human perception
            pressure:
              type: integer
              description: Atmospheric pressure at sea level (hPa)
            humidity:
              type: integer
              description: Humidity (%)
            temp_min:
              type: number
              description: >-
                Minimum temperature at the moment (only for large cities and
                urban areas)
            temp_max:
              type: number
              description: >-
                Maximum temperature at the moment (only for large cities and
                urban areas)
            sea_level:
              type: integer
              description: Atmospheric pressure at sea level (hPa)
            grnd_level:
              type: integer
              description: Atmospheric pressure at ground level (hPa)
        visibility:
          type: integer
          description: Visibility (meters)
        wind:
          type: object
          properties:
            speed:
              type: number
              description: Wind speed
            deg:
              type: integer
              description: Wind direction, degrees (meteorological)
            gust:
              type: number
              description: Wind gust
        clouds:
          type: object
          properties:
            all:
              type: integer
              description: Cloudiness (in percentage)
        rain:
          $ref: '#/components/schemas/Precipitation'
        snow:
          $ref: '#/components/schemas/Precipitation'
        dt:
          type: integer
          description: Time of data calculation, in Unix time (UTC)
        sys:
          type: object
          properties:
            type:
              type: integer
              description: Internal parameter
            id:
              type: integer
              description: Internal parameter
            message:
              type: number
              description: Internal parameter
            country:
              type: string
              description: Country code. For example, `FR` for France.
            sunrise:
              type: integer
              description: Sunrise time, in Unix time (UTC)
            sunset:
              type: integer
              description: Sunset time, in Unix time (UTC)
        timezone:
          type: integer
          description: Shift in seconds from UTC
        id:
          type: integer
          description: City identifier
        name:
          type: string
          description: City name
        cod:
          type: integer
          description: API response status code
    WeatherDataXml:
      type: object
      xml:
        name: current
      properties:
        city:
          type: object
          xml:
            name: city
          properties:
            id:
              type: integer
              description: City identifier
              xml:
                attribute: true
            name:
              type: string
              description: City name
              xml:
                attribute: true
            coord:
              $ref: '#/components/schemas/Coord'
            country:
              type: string
              description: Country code. For example, `FR` for France.
            timezone:
              type: integer
              description: Shift in seconds from UTC
            sun:
              type: object
              properties:
                rise:
                  type: string
                  description: Sunrise time, in ISO 8601 format
                  xml:
                    attribute: true
                set:
                  type: string
                  description: Sunset time, in ISO 8601 format
                  xml:
                    attribute: true
        temperature:
          type: object
          properties:
            value:
              type: number
              description: Temperature
              xml:
                attribute: true
            min:
              type: number
              description: >-
                Minimum temperature at the moment (only for large cities and
                urban areas)
              xml:
                attribute: true
            max:
              type: number
              description: >-
                Maximum temperature at the moment (only for large cities and
                urban areas)
              xml:
                attribute: true
            unit:
              type: string
              description: Unit of measurement for temperature
              xml:
                attribute: true
        feels_like:
          type: object
          properties:
            value:
              type: number
              description: Temperature accounting for human perception
              xml:
                attribute: true
            unit:
              type: string
              description: Unit of measurement for feels_like temperature
              xml:
                attribute: true
        humidity:
          type: object
          properties:
            value:
              type: integer
              description: Humidity (%)
              xml:
                attribute: true
            unit:
              type: string
              description: Unit of measurement for humidity
              xml:
                attribute: true
        pressure:
          type: object
          properties:
            value:
              type: integer
              description: Atmospheric pressure at sea level (hPa)
              xml:
                attribute: true
            unit:
              type: string
              description: Unit of measurement for pressure
              xml:
                attribute: true
        wind:
          type: object
          properties:
            speed:
              type: object
              properties:
                value:
                  type: number
                  description: Wind speed
                  xml:
                    attribute: true
                unit:
                  type: string
                  description: Unit of measurement for wind speed
                  xml:
                    attribute: true
                name:
                  type: string
                  description: Wind speed name
                  xml:
                    attribute: true
            gusts:
              type:
                - object
                - 'null'
              description: >
                Wind gust data. This element may be empty or omitted when gust
                data is unavailable.
              properties:
                value:
                  type: integer
                  description: Wind gust
                  xml:
                    attribute: true
            direction:
              type: object
              properties:
                value:
                  type: integer
                  description: Wind direction, degrees (meteorological)
                  xml:
                    attribute: true
                code:
                  type: string
                  description: Wind direction code
                  xml:
                    attribute: true
                name:
                  type: string
                  description: Wind direction name
                  xml:
                    attribute: true
        clouds:
          type: object
          properties:
            value:
              type: integer
              description: Cloudiness (in percentage)
              xml:
                attribute: true
            name:
              type: string
              description: Cloudiness name
              xml:
                attribute: true
        visibility:
          type: object
          properties:
            value:
              type: integer
              description: Visibility (meters)
              xml:
                attribute: true
        precipitation:
          type: object
          properties:
            mode:
              type: string
              enum:
                - 'no'
                - rain
                - snow
              description: Precipitation mode
              xml:
                attribute: true
        weather:
          type: object
          properties:
            number:
              type: integer
              description: Weather condition identifier
              xml:
                attribute: true
            value:
              type: string
              description: Weather condition within the group
              xml:
                attribute: true
            icon:
              type: string
              description: Weather icon identifier
              xml:
                attribute: true
        lastupdate:
          type: object
          properties:
            value:
              type: string
              description: Time of data calculation, in ISO 8601 format
              xml:
                attribute: true
    Error:
      type: object
      xml:
        name: ClientError
      properties:
        cod:
          type: integer
          description: API response error code
        message:
          type: string
          description: Description of the error code
    Coord:
      type: object
      properties:
        lon:
          type: number
          description: Longitude of the location
          xml:
            attribute: true
        lat:
          type: number
          description: Latitude of the location
          xml:
            attribute: true
    Precipitation:
      type:
        - object
        - 'null'
      properties:
        1h:
          type: number
          description: Precipitation volume for the last 1 hour (mm)
        3h:
          type: number
          description: Precipitation volume for the last 3 hours (mm)
  examples:
    InvalidParameters:
      summary: Invalid input parameters
      value:
        cod: 400
        message: Nothing to geocode
    InvalidApiKey:
      summary: Invalid API key
      value:
        cod: 401
        message: >-
          Invalid API key. Please see https://openweathermap.org/faq#error401
          for more info.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: query
      name: appid

````