Getting Data from WeatherAPI.com
Pricing Plans and Free Tier
WeatherAPI offers both free and paid plans. The free plan is sufficient for simple IoT projects, personal apps, and testing purposes. (As of 2025-05-22)
- Free Plan
- 1,000 requests per day
- Current weather and up to 3-day forecast available
- Includes hourly data and language settings (
lang
) - Commercial use not allowed (testing and non-commercial apps only)
- View detailed pricing plans
API Key Registration
- Sign up for WeatherAPI.com
- After logging in, check your API Key in the Dashboard

HTTP Request
https://api.weatherapi.com/v1/forecast.data_type?key=API_KEY&q=location&days=forecast_days&lang=language_code
- data_type: json or xml
- API_KEY: Your issued API key
- location: City name, coordinates, or other location information
- Examples:
Seoul
,Busan
,Incheon
,Daegu
,Daejeon
,Gwangju
,Ulsan
,Jeju
(Korean major cities in English) - International cities also supported (e.g.,
Tokyo
,London
,New York
) - Latitude/longitude (
37.5665,126.9780
) or IP address (auto:ip
) also available
- Examples:
- forecast_days: Number of forecast days (1-10 days possible, free plan limited to 3 days)
- language_code: Response language setting
- en: English, ko: Korean, ja: Japanese, etc.
Example
https://api.weatherapi.com/v1/forecast.json?key=1234567890abcdef&q=Seoul&days=3&lang=ko
HTTP Response
When the request is successful, JSON with the following structure is returned.
{
"location": {
"name": "Seoul",
"country": "South Korea",
"localtime": "2025-05-22 14:00",
...
},
"current": {
"temp_c": 22.3,
"condition": {
"text": "부분적으로 흐림"
},
...
},
"forecast": {
"forecastday": [
{
"date": "2025-05-22",
"day": {
"maxtemp_c": 24.0,
"mintemp_c": 15.3,
"condition": {
"text": "대체로 맑음"
},
"daily_chance_of_rain": 0,
"hour": [ ... ],
...
}
},
{
"date": "2025-05-23",
"day": {
"maxtemp_c": 25.1,
"mintemp_c": 16.0,
"condition": {
"text": "가끔 비"
},
"daily_chance_of_rain": 80,
"hour": [ ... ]
...
}
},
{
"date": "2025-05-24",
"day": {
"maxtemp_c": 23.5,
"mintemp_c": 14.8,
"condition": {
"text": "흐림"
},
"daily_chance_of_rain": 20,
"hour": [ ... ],
...
}
}
]
}
}
location (Location Information)
name
: City nameregion
: Region namecountry
: Countrytz_id
: Time zonelocaltime
: Local time
current (Current Weather)
temp_c
: Current temperature (Celsius)is_day
: Day/night indicator (1: day, 0: night)condition.text
: Current weather descriptionwind_kph
: Wind speed (kilometers/hour)humidity
: Humidity (%)
forecast.forecastday[] (Weather Forecast)
date
: Dateday.maxtemp_c
: Maximum temperatureday.mintemp_c
: Minimum temperatureday.condition.text
: Weather descriptionastro.sunrise
,astro.sunset
: Sunrise/sunset timeshour[]
: Hourly weather information