---
title: "Get weather data"
method: GET
path: "/data/weather"
tags: ["Weather"]
---

# Get weather data

`GET /data/weather`

## Request

- Base URL: `https://api.liteapi.travel/v3.0`
- URL: `https://api.liteapi.travel/v3.0/data/weather`
- Auth: API key in header `X-API-Key`

## Overview

Get weather forecasts for specific locations. Response structure adapts based on the forecast time range (short-term vs. long-term).

## When to Use

- **Travel planning** - Show weather forecasts for destinations
- **Hotel pages** - Display weather information on hotel detail pages
- **Trip preparation** - Help users plan for weather conditions
- **Destination information** - Provide weather context for locations

## What You Get

- **Weather forecasts** - Temperature, humidity, wind, precipitation
- **Time-based structure** - Different formats for short-term (<1 week) vs. long-term forecasts
- **Detailed data** - Atmospheric pressure, conditions, and summaries
- **Date-specific** - Weather data for specific dates

## Key Features

- **Adaptive structure** - Response format changes based on time range
- **Short-term** - Detailed hourly/daily data for forecasts within one week
- **Long-term** - Daily summaries for forecasts beyond one week
- **Accuracy note** - Forecasts beyond one week have reduced accuracy

## Quick Start

Provide location coordinates (`latitude`, `longitude`) and date range. Returns weather forecasts with appropriate detail level.

## Query parameters

- `latitude` string, required
- `longitude` string, required
- `startDate` string, date, required
- `endDate` string, date, required
- `units` 'metric' | 'imperial'

## Response `200`

OK

- WeatherData
  - `detailedWeatherData` DetailedWeatherData: Represents a summarized daily weather forecast.
    - `lat` number: The latitude coordinate of the location.
    - `lon` number: The longitude coordinate of the location.
    - `timezone` string: The timezone identifier (e.g., America/New_York) for the location.
    - `timezone_offset` integer: The offset in seconds from UTC for the specified timezone.
    - `daily` DetailedDailyWeather[]: An array of daily weather details, each adhering to the DetailedDailyWeather schema.
      - `date` string: The specific date for the forecast.
      - `sunrise` string: Time of sunrise on the given date.
      - `sunset` string: Time of sunset on the given date.
      - `moonrise` string: Time when the moon rises on the specified day.
      - `moonset` string: Time when the moon sets on the specified day.
      - `moon_phase` number: A numeric value representing the current phase of the moon (0.0–1.0).
      - `summary` string: Brief textual summary of the day's weather conditions.
      - `temp` TemperatureDetail: Provides a breakdown of temperatures throughout the day.
        - `day` number: Temperature during the daytime.
        - `min` number: Minimum temperature for the day.
        - `max` number: Maximum temperature for the day.
        - `night` number: Temperature recorded at night.
        - `eve` number: Temperature recorded in the evening.
        - `morn` number: Temperature recorded in the morning.
      - `feels_like` FeelsLike: Represents perceived (feels-like) temperatures, accounting for factors like humidity and wind chill.
        - `day` number: Perceived temperature during the daytime.
        - `night` number: Perceived temperature during the night.
        - `eve` number: Perceived temperature in the evening.
        - `morn` number: Perceived temperature in the morning.
      - `pressure` integer: Atmospheric pressure in hPa.
      - `humidity` integer: Humidity percentage.
      - `dew_point` number: The temperature at which dew forms, indicating atmospheric moisture.
      - `wind_speed` number: Speed of the wind.
      - `wind_deg` integer: Direction of the wind in degrees (0–360).
      - `wind_gust` number: Speed of wind gusts, representing short bursts of higher wind.
      - `weather` Weather[]: Array of weather condition objects.
        - `id` integer: Numeric identifier of the weather condition.
        - `main` string: Short label for the weather category (e.g., Rain, Snow, Clear).
        - `description` string: More detailed textual description of the weather condition.
        - `icon` string: Identifier for an icon representing the weather condition.
      - `clouds` integer: Overall cloudiness, expressed as a percentage.
      - `pop` number: Probability of precipitation (0.0–1.0).
      - `uvi` number: UV index value, representing the intensity of ultraviolet radiation.
  - `dailyWeather` DailyWeather: Represents a summarized daily weather forecast.
    - `date` string: The date for which the weather information applies.
    - `units` string: The unit system used for measurements (e.g., metric or imperial).
    - `cloud_cover` CloudCover
      - `afternoon` number: The cloud cover measurement (often as a percentage or fraction) during the afternoon.
    - `humidity` Humidity
      - `afternoon` number: The humidity level for the afternoon, typically expressed as a percentage.
    - `precipitation` Precipitation
      - `total` number: The total amount of precipitation (for example, in millimeters or inches) recorded over the period.
    - `temperature` Temperature: Represents precipitation data.
      - `min` number: The minimum temperature recorded for the day.
      - `max` number: The maximum temperature recorded for the day.
      - `afternoon` number: The temperature measured in the afternoon.
      - `night` number: The temperature recorded during the night.
      - `evening` number: The temperature observed in the evening.
      - `morning` number: The temperature measured in the morning.
    - `pressure` Pressure: Provides atmospheric pressure details.
      - `afternoon` number: The pressure reading taken during the afternoon (commonly measured in hPa).
    - `wind` Wind: Encapsulates wind-related data.
      - `max` WindMax: Details the peak wind measurements.
        - `speed` number: The maximum wind speed observed (typically in meters per second or miles per hour).
        - `direction` number: The wind direction represented in degrees (from 0° to 360°).

## Other responses

- `204`: No Content
- `400`: Bad Request
- `401`: Unauthorized
- `500`: Internal Server Error

---

[API](https://skmtc.dev/liteapi/apis/api-hotel-data.md) - [All operations](https://skmtc.dev/liteapi/apis/api-hotel-data/llms.txt) - [OpenAPI document](https://skmtc.dev/liteapi/apis/api-hotel-data/revisions/f89f11b63949?raw)
