Loading
Loading
Retrieve real-time weather conditions for any location worldwide. Supports lookup by city name or address, GPS coordinates, or IP address. Each response includes temperature, humidity, wind, air quality (AQI), and astronomical data in a single call.
The Live Weather API delivers current conditions including temperature at 2 m, apparent temperature, precipitation (rain, showers, snowfall), cloud cover, pressure at MSL and surface, wind speed and gusts at 10 m, WMO weather code, and full astronomical and air quality sub-objects. When no parameter is supplied the API auto-detects the requesting IP address.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
All parameters are optional query string parameters. Pass location, lat/long, or ipto specify a target. If none are provided the API resolves weather for the calling machine's IP address. Use timezone to override the default timezone of the resolved location.
locationoptionalstringSpecifies the target location. Accepts a city name, place name, or full address (e.g., "Lahore", "Paris, France", "1600 Amphitheatre Parkway, Mountain View, CA").
latoptionalfloatSpecifies the latitude coordinate of the target location. Must be used together with the "long" parameter.
longoptionalfloatSpecifies the longitude coordinate of the target location. Must be used together with the "lat" parameter.
ipoptionalstringIPv4 or IPv6 address used for location-based lookup. If not provided, the requester's public IP is used by default.
timezoneoptionalstringSpecifies the timezone for the returned data. Defaults to the timezone of the resolved location.
A successful request returns a 200 OK response with a JSON object. The top-level object always contains location and current. The shape of location varies by lookup method. See the response preview on the right for the full JSON structure.
locationLocation information including coordinates, timezone, and geographic details.
currentCurrent weather conditions including temperature, precipitation, wind, astronomy, and air quality.
When a lookup is performed using the 'location' parameter, the location object includes the following fields:
location_stringOriginal location query string as submitted, including full address or place name.
country_nameResolved country name derived from the geocoded location query.
state_provState, province, or primary administrative division identified from the location.
cityCity or municipal area name extracted from the geocoded location.
localitySpecific locality, neighborhood, suburb, or village within the geocoded area.
latitudeGeocoded latitude coordinate in decimal degrees, ranging from -90 to +90.
longitudeGeocoded longitude coordinate in decimal degrees, ranging from -180 to +180.
elevationElevation above mean sea level in meters at the geocoded coordinates.
timezoneIANA timezone database identifier for the geocoded location (e.g., America/Los_Angeles).
timezone_abbreviationCurrent timezone abbreviation for the location based on local offset (e.g., PDT, CET).
When a lookup is performed using 'lat'/'long' parameters, the location object includes the following fields:
latitudeGeographic latitude coordinate in decimal degrees, ranging from -90 (South Pole) to +90 (North Pole).
longitudeGeographic longitude coordinate in decimal degrees, ranging from -180 (West) to +180 (East).
country_nameFull name of the country corresponding to the provided coordinates.
state_provState, province, or primary administrative division name for the location.
cityCity or municipal area name associated with the coordinate location.
localitySpecific locality, neighborhood, district, or village name within the broader area.
elevationHeight above mean sea level in meters for the specified coordinates.
timezoneIANA timezone database identifier for the location (e.g., America/New_York, Europe/London).
timezone_abbreviationAbbreviated timezone representation based on current offset (e.g., EST, GMT, PST).
When a lookup is performed using the 'ip' parameter (or auto-detected), the location object includes the following fields:
continent_codeTwo-letter continent code (e.g., NA for North America, EU for Europe, AS for Asia).
continent_nameFull name of the continent where the IP address is registered.
country_code2ISO 3166-1 alpha-2 two-letter country code (e.g., US, GB, FR).
country_code3ISO 3166-1 alpha-3 three-letter country code (e.g., USA, GBR, FRA).
country_nameCommon name of the country associated with the IP address.
country_name_officialOfficial long-form country name as recognized internationally (e.g., United States of America).
is_euBoolean flag indicating whether the country is a member state of the European Union.
state_provState, province, or primary administrative division associated with the IP location.
state_codeISO 3166-2 subdivision code for the state or province (e.g., CA for California).
districtDistrict, county, or secondary administrative division within the region.
cityCity or urban area name where the IP address is geographically registered.
zipcodePostal code or ZIP code for the approximate location of the IP address.
latitudeGeographic latitude in decimal degrees for the IP geolocation, ranging from -90 to +90.
longitudeGeographic longitude in decimal degrees for the IP geolocation, ranging from -180 to +180.
localitySpecific locality, neighborhood, or small area designation within the city.
elevationElevation above mean sea level in meters for the IP geolocation.
timezoneIANA timezone database identifier for the IP location (e.g., America/Chicago, Asia/Tokyo).
timezone_abbreviationCurrent timezone abbreviation based on local offset (e.g., CST, JST, UTC).
The current object contains the following weather observation fields:
timestampISO 8601 formatted timestamp of the current weather observation.
temperature_2mCurrent air temperature (°C) measured at 2 meters above ground.
relative_humidity_2mCurrent relative humidity percentage at 2 meters above ground.
apparent_temperatureCurrent apparent temperature (°C) accounting for wind chill and humidity.
snowfallCurrent snowfall accumulation in centimeters.
rainCurrent rainfall accumulation in millimeters.
showersCurrent shower precipitation in millimeters.
precipitationTotal precipitation (mm) including rain, showers, and snowfall.
weather_codeWMO weather condition code representing current conditions.
cloud_coverCurrent percentage of sky covered by clouds.
pressure_mslCurrent atmospheric pressure (hPa) adjusted to mean sea level.
surface_pressureCurrent atmospheric pressure (hPa) at surface level.
wind_speed_10mCurrent wind speed (km/h) at 10 meters above ground.
wind_direction_10mCurrent wind direction in degrees at 10 meters above ground.
wind_gusts_10mCurrent wind gust speed (km/h) at 10 meters above ground.
astronomyAstronomical information including sunrise, sunset, and moon phases for the current date.
air_qualityAir quality metrics including pollutant concentrations and AQI values.
The astronomy sub-object contains the following fields:
dateCalendar date in YYYY-MM-DD format for the astronomical data.
mid_nightTime of true solar midnight in HH:MM format.
night_endTime when astronomical twilight ends and dawn begins in HH:MM format.
sunriseTime when the Sun becomes visible above the horizon in HH:MM format.
solar_noonTime when the Sun reaches its highest point in the sky in HH:MM format.
sunsetTime when the Sun disappears below the horizon in HH:MM format.
night_beginTime when astronomical twilight begins and night starts in HH:MM format.
day_lengthTotal duration of daylight in HH:MM format.
sun_statusCurrent position of the Sun relative to the horizon (above_horizon, below_horizon, or -).
moon_phaseCurrent lunar phase (NEW_MOON, WAXING_CRESCENT, FULL_MOON, WANING_GIBBOUS, etc.).
moonriseTime when the Moon becomes visible above the horizon in HH:MM format.
moonsetTime when the Moon disappears below the horizon in HH:MM format.
moon_statusCurrent visibility status of the Moon (visible, not_visible, or -).
The air_quality sub-object contains the following fields:
timestampISO 8601 formatted timestamp of the air quality observation.
european_aqiConsolidated European Air Quality Index. Ranges: 0-20 (good), 20-40 (fair), 40-60 (moderate), 60-80 (poor), 80-100 (very poor), >100 (extremely poor).
us_aqiConsolidated U.S. Air Quality Index. Ranges: 0-50 (good), 51-100 (moderate), 101-150 (unhealthy for sensitive groups), 151-200 (unhealthy), 201-300 (very unhealthy), 301-500 (hazardous).
pm10Particulate matter with diameter less than 10 micrometers (μg/m³) measured at 10 meters above ground.
pm2_5Particulate matter with diameter less than 2.5 micrometers (μg/m³) measured at 10 meters above ground.
carbon_monoxideAtmospheric carbon monoxide gas concentration (μg/m³) at 10 meters above ground.
nitrogen_dioxideAtmospheric nitrogen dioxide gas concentration (μg/m³) at 10 meters above ground.
sulphur_dioxideAtmospheric sulphur dioxide gas concentration (μg/m³) at 10 meters above ground.
ozoneAtmospheric ozone gas concentration (μg/m³) at 10 meters above ground.
dustSaharan dust particle concentration (μg/m³) at 10 meters above ground.
uv_indexUltraviolet radiation intensity index accounting for cloud coverage.
aerosol_optical_depthAerosol optical depth at 550 nm wavelength indicating atmospheric haze levels.
uv_index_clear_skyUltraviolet radiation intensity index assuming cloud-free conditions.
The API uses standard HTTP status codes to indicate the success or failure of requests. For common status codes like 429 (Too Many Requests), refer to the general API documentation.
Invalid latitude or longitude values. Latitude must be between -90 and 90, and longitude must be between -180 and 180
Check whether your input value is correct; timezone = NotATimezone
Invalid IP address
Location not found
Reference for the weather_code field values returned in the current object. Codes follow the WMO standard for weather interpretation.
0Clear sky — completely clear with no cloud coverage.
1, 2, 3Mainly clear, partly cloudy, and overcast — varying cloud coverage levels.
45, 48Fog — standard fog (45) and depositing rime fog (48).
51, 53, 55Drizzle — light (51), moderate (53), and dense intensity (55).
56, 57Freezing drizzle — light (56) and dense/heavy intensity (57).
61, 63, 65Rain — slight (61), moderate (63), and heavy intensity (65).
66, 67Freezing rain — light (66) and heavy intensity (67).
71, 73, 75Snowfall — slight (71), moderate (73), and heavy intensity (75).
77Snow grains — small, white, opaque ice particles.
80, 81, 82Rain showers — slight (80), moderate (81), and violent intensity (82).
85, 86Snow showers — slight (85) and heavy intensity (86).
95Thunderstorm — slight or moderate intensity.
96, 99Thunderstorm with hail — slight hail (96) and heavy hail (99).