Weather API
A free, fast, keyless weather API. Get current conditions, hourly data, air quality, and up to 16 day forecasts as clean JSON.
Quickstart
Three steps to fetch weather data for any location on Earth.
- 1Find coordinates using the search endpoint, or supply your own.
- 2Call
/weather,/hourly, or/forecastwith the latitude and longitude. - 3Parse the JSON response. All times use the location's local timezone.
Base URL
All endpoints are served over HTTPS from a single root.
https://weather-api.site
Search
Look up coordinates for a city by name. Returns up to 10 matches ordered by relevance. Optionally filter by country.
GET /search?q={city}&country={code}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | yes | City name or partial name |
country | string | no | ISO 3166-1 alpha-2 code (e.g. GB, US) or full country name to filter results |
Example Request
curl "https://weather-api.site/search?q=London&country=GB"
Example Response
{
"results": [
{
"name": "London",
"latitude": 51.5074,
"longitude": -0.1278,
"country": "United Kingdom",
"country_code": "GB",
"region": "England"
}
]
}
Reverse Lookup
Resolve a coordinate pair into the nearest named place. Useful after capturing a device's GPS position.
GET /reverse?lat={lat}&lon={lon}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | float | yes | Latitude |
lon | float | yes | Longitude |
Example Response
{
"name": "Telford",
"region": "England",
"country": "United Kingdom",
"country_code": "GB",
"postcode": "TF3 4HB",
"latitude": 52.6766,
"longitude": -2.4453
}
Current Weather
Real time conditions for a coordinate pair.
GET /weather?lat={lat}&lon={lon}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | float | yes | Latitude, range -90 to 90 |
lon | float | yes | Longitude, range -180 to 180 |
Example Request
curl "https://weather-api.site/weather?lat=51.5074&lon=-0.1278"
Example Response
{
"latitude": 51.5,
"longitude": -0.12,
"timezone": "Europe/London",
"current": {
"time": "2026-05-27T14:00",
"temperature": 18.4,
"feels_like": 17.1,
"humidity": 62,
"wind_speed": 14,
"wind_direction": 245,
"wind_direction_text": "WSW",
"pressure": 1013,
"visibility": 24,
"precipitation": 0.0,
"cloud_cover": 45,
"uv_index": 4,
"is_day": 1,
"condition_code": 3,
"condition": "Overcast"
}
}
Hourly Forecast
Hour by hour predictions for up to 48 hours ahead.
GET /hourly?lat={lat}&lon={lon}&hours={hours}
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
lat | float | required | Latitude |
lon | float | required | Longitude |
hours | integer | 24 | Hours to return, range 1 to 48 |
Example Response
{
"hourly": [
{
"time": "2026-05-27T14:00",
"temperature": 18.4,
"condition_code": 3,
"condition": "Overcast",
"is_day": 1,
"precipitation_probability": 10
}
]
}
Daily Forecast
Daily highs, lows, sunrise, sunset, precipitation, and UV index.
GET /forecast?lat={lat}&lon={lon}&days={days}
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
lat | float | required | Latitude |
lon | float | required | Longitude |
days | integer | 7 | Days to return, range 1 to 16 |
Example Response
{
"daily": [
{
"date": "2026-05-27",
"condition_code": 3,
"condition": "Overcast",
"temp_max": 19.2,
"temp_min": 11.3,
"sunrise": "05:12",
"sunset": "21:04",
"precipitation": 0.0,
"uv_index": 5
}
]
}
Air Quality
Current US AQI with a readable category and the major pollutant concentrations. Also reachable at /aqi.
GET /air-quality?lat={lat}&lon={lon}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | float | yes | Latitude |
lon | float | yes | Longitude |
Example Response
{
"latitude": 51.5,
"longitude": -0.12,
"timezone": "Europe/London",
"current": {
"time": "2026-05-28T12:00",
"us_aqi": 43,
"category": "Good",
"pm2_5": 8.0,
"pm10": 17.0,
"nitrogen_dioxide": 8.0,
"ozone": 69.0,
"sulphur_dioxide": 1.2,
"carbon_monoxide": 142.0
}
}
Bundle
Current conditions, hourly outlook and the daily forecast in a single request. Saves three round trips when you need the full picture.
GET /bundle?lat={lat}&lon={lon}&hours={hours}&days={days}
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
lat | float | required | Latitude |
lon | float | required | Longitude |
hours | integer | 24 | Hourly entries, range 1 to 48 |
days | integer | 7 | Daily entries, range 1 to 16 |
Example Response
{
"latitude": 51.5,
"longitude": -0.12,
"timezone": "Europe/London",
"current": { "temperature": 23.1, "condition": "Mainly Clear", "condition_code": 1, "is_day": 1 },
"hourly": [ { "time": "2026-05-28T12:00", "temperature": 23.1, "condition_code": 1 } ],
"daily": [ { "date": "2026-05-28", "temp_max": 25.0, "temp_min": 14.2, "condition_code": 1 } ]
}
Condition Codes
Numeric codes mapped to human readable conditions. Use these for icon lookups.
| Code | Condition |
|---|---|
| 0 | Clear |
| 1 | Mainly Clear |
| 2 | Partly Cloudy |
| 3 | Overcast |
| 45 | Fog |
| 48 | Rime Fog |
| 51 | Light Drizzle |
| 53 | Drizzle |
| 55 | Heavy Drizzle |
| 56 | Freezing Drizzle |
| 57 | Freezing Drizzle |
| 61 | Light Rain |
| 63 | Rain |
| 65 | Heavy Rain |
| 66 | Freezing Rain |
| 67 | Freezing Rain |
| 71 | Light Snow |
| 73 | Snow |
| 75 | Heavy Snow |
| 77 | Snow Grains |
| 80 | Light Showers |
| 81 | Showers |
| 82 | Heavy Showers |
| 85 | Snow Showers |
| 86 | Snow Showers |
| 95 | Thunderstorm |
| 96 | Thunderstorm |
| 99 | Thunderstorm |
Status Codes
Standard HTTP status codes. The body always contains a JSON object.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Missing or invalid parameters |
| 404 | Location not found |
| 429 | Rate limit exceeded |
| 500 | Server error |
Full Example
Fetch current weather in London, England.
curl "https://weather-api.site/weather?lat=51.5074&lon=-0.1278"