Grablo Help Grablo Help
  • User Manual
  • Tips
  • News
  • Go to
    • Grablo Home
    • Grablo App
  • 한국어
Grablo Help Grablo Help
문의하기
Grablo Help Grablo Help
  • User Manual
  • Tips
  • News
  • Go to
    • Grablo Home
    • Grablo App
  • 한국어
loading
  1. Home
  2. Tips
  3. IoT
  4. Getting Data from WeatherAPI.com
Updated on August 11, 2025

Tips

  • Folder icon closed Folder open iconBasics
    • Bits and Bytes
    • Digital Input/Output
    • Digital/Analog Signals
    • Calculating LED Resistor Values
    • Pull-up/down Resistors
    • 3.3V ↔ 5V Conversion
    • Serial Communication (UART)
    • DC Motor, Servo Motor, Stepper Motor
    • Multi Thread
    • Relay
  • Folder icon closed Folder open iconHardware
    • Raspberry Pi
      • GPIO
      • Installing Operating System
      • How to Change 1-Wire Pin
      • How to Find I2C Device Addresses
      • Raspberry Pi vs Arduino
      • Serial (UART) Port
      • Using Desktop Environment with VNC
    • Beagle Bone
      • GPIO
      • Installing Operating System
    • Jetson Nano
      • GPIO
      • Installing Operating System
    • GPIO Expander
      • FT232H/FT2232H/FT4232H
      • MCP2221A
      • NUMATO USB-GPIO
  • Folder icon closed Folder open iconLinux
    • Linux Directory Structure
    • Configuring Linux Auto Login
    • Installing Linux on Windows (Virtual Machine)
    • Installing Linux on macOS (Virtual Machine)
    • Installing SSH Server
    • Finding Your Controller’s IP Address
    • Connecting via SSH
    • Transferring Files Between PC and Controller
    • Fixing “User is not in the sudoers file” Error
  • Folder icon closed Folder open iconAudio/Video
    • Fixing Audio Stuttering and Latency Issues
    • Playing Audio Through Bluetooth Speakers
    • Selecting Instruments from SoundFont Files
    • Fixing “Failed to create new vlc instance” Error
  • Folder icon closed Folder open iconDatabase
    • Setting Up Firebase Database
  • Folder icon closed Folder open iconIoT
    • Setting Up Google Cloud TTS/STT
    • Setting Up OpenAI TTS/STT
    • Setting Up ElevenLabs TTS
    • Setting Up Telegram Bot
    • Getting Data from WeatherAPI.com

Getting Data from WeatherAPI.com

Estimated reading: 3 minutes 136 views

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

  1. Sign up for WeatherAPI.com
  2. 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
  • 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 name
  • region: Region name
  • country: Country
  • tz_id: Time zone
  • localtime: Local time


current (Current Weather)

  • temp_c: Current temperature (Celsius)
  • is_day: Day/night indicator (1: day, 0: night)
  • condition.text: Current weather description
  • wind_kph: Wind speed (kilometers/hour)
  • humidity: Humidity (%)


forecast.forecastday[] (Weather Forecast)

  • date: Date
  • day.maxtemp_c: Maximum temperature
  • day.mintemp_c: Minimum temperature
  • day.condition.text: Weather description
  • astro.sunrise, astro.sunset: Sunrise/sunset times
  • hour[]: Hourly weather information

찾으시는 내용이 없나요? 문의하기

문의하기

공유하기

Getting Data from WeatherAPI.com

Or copy link

Clipboard Icon
콘탠츠

ㅤ

Grablo Inc.
support@grablo.co

Site Links

  • Grablo Home
  • Grablo App

이 사이트의 모든 컨텐츠는 저작권법에 보호받는 저작물로서, 무단으로 복제, 배포하는 경우에는 저작권법에 의하여 처벌을 받을 수 있습니다. Copyright 2024 grablo.co. All Rights Reserved.