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.
Authorize every request with your API key, passed either as a header or as a query parameter:
X-apiKeyapiKeyThis is version v1.0 of the API.
All parameters are optional query string parameters. Pass location, lat/long, or ip to 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.
timestamp (String), temperature_2m (Float), relative_humidity_2m (Float), apparent_temperature (Float), snowfall (Float), …
Address Lookup (Object), Coordinates Lookup (Object), IP Lookup (Object)
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
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).
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
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