### GET /current Source: https://www.weatherapi.com/docs Retrieve real-time weather data for a specific location. ```APIDOC ## GET /current.json ### Description Returns the current weather conditions for a requested location. ### Method GET ### Endpoint http://api.weatherapi.com/v1/current.json ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **q** (string) - Required - Location query (e.g., city name, zip code, IP address) ``` -------------------------------- ### GET /weather/conditions Source: https://www.weatherapi.com/docs/weather_conditions.csv Retrieves a list of weather conditions including day/night descriptions and icon identifiers. ```APIDOC ## GET /weather/conditions ### Description Retrieves a list of weather conditions including day/night descriptions and icon identifiers. ### Method GET ### Endpoint /weather/conditions ### Response #### Success Response (200) - **day** (string) - Description of weather during the day - **night** (string) - Description of weather during the night - **icon** (integer) - Icon identifier #### Response Example [ { "day": "Moderate or heavy snow with thunder", "night": "Moderate or heavy snow with thunder", "icon": 395 } ] ``` -------------------------------- ### cURL Example for Bulk Weather Request Source: https://www.weatherapi.com/docs This cURL command demonstrates how to send a POST request to the WeatherAPI for bulk data retrieval. Ensure you replace 'YOUR_API_KEY' with your actual API key and format the JSON body correctly. ```curl curl --location --request POST 'http://api.weatherapi.com/v1/current.json?key=YOUR_API_KEY&q=bulk' \ --header 'Content-Type: application/json' \ --data '{ \ "locations": [ \ { "q": "53,-0.12", "custom_id": "my-id-1" }, { "q": "London", "custom_id": "any-internal-id" }, { "q": "90201", "custom_id": "us-zipcode-id-765" } ] }' ``` -------------------------------- ### GET /search Source: https://www.weatherapi.com/docs Search or autocomplete for location data. ```APIDOC ## GET /search.json ### Description Provides search or autocomplete functionality for location queries. ### Method GET ### Endpoint http://api.weatherapi.com/v1/search.json ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **q** (string) - Required - Location query ``` -------------------------------- ### GET /forecast Source: https://www.weatherapi.com/docs Retrieve weather forecast data for a specific location. ```APIDOC ## GET /forecast.json ### Description Returns weather forecast data for a requested location. ### Method GET ### Endpoint http://api.weatherapi.com/v1/forecast.json ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **q** (string) - Required - Location query ``` -------------------------------- ### Bulk Weather Response Example Source: https://www.weatherapi.com/docs This JSON structure represents a bulk response from the WeatherAPI, containing weather data for multiple locations. Each entry in the 'bulk' array corresponds to a single query, including its custom ID, query parameters, location details, and current weather conditions. ```json { "bulk": [ { "query": { "custom_id": "my-id-1", "q": "53,-0.12", "location": { "name": "Boston", "region": "Lincolnshire", "country": "United Kingdom", "lat": 53.0, "lon": -0.12, "tz_id": "Europe/London", "localtime_epoch": 1673620218, "localtime": "2023-01-13 14:30" }, "current": { "last_updated_epoch": 1673620200, "last_updated": "2023-01-13 14:30", "temp_c": 8.7, "temp_f": 47.7, "is_day": 1, "condition": { "text": "Partly cloudy", "icon": "//cdn.weatherapi.com/weather/64x64/day/116.png", "code": 1003 }, "wind_mph": 24.2, "wind_kph": 38.9, "wind_degree": 260, "wind_dir": "W", "pressure_mb": 1005.0, "pressure_in": 29.68, "precip_mm": 0.0, "precip_in": 0.0, "humidity": 74, "cloud": 75, "feelslike_c": 4.4, "feelslike_f": 39.9, "vis_km": 10.0, "vis_miles": 6.0, "uv": 2.0, "gust_mph": 33.1, "gust_kph": 53.3 } } }, { "query": { "custom_id": "any-internal-id", "q": "London", "location": { "name": "London", "region": "City of London, Greater London", "country": "United Kingdom", "lat": 51.52, "lon": -0.11, "tz_id": "Europe/London", "localtime_epoch": 1673620218, "localtime": "2023-01-13 14:30" }, "current": { "last_updated_epoch": 1673620200, "last_updated": "2023-01-13 14:30", "temp_c": 11.0, "temp_f": 51.8, "is_day": 1, "condition": { "text": "Partly cloudy", "icon": "//cdn.weatherapi.com/weather/64x64/day/116.png", "code": 1003 }, "wind_mph": 23.0, "wind_kph": 37.1, "wind_degree": 270, "wind_dir": "W", "pressure_mb": 1010.0, "pressure_in": 29.83, "precip_mm": 0.0, "precip_in": 0.0, "humidity": 58, "cloud": 75, "feelslike_c": 8.1, "feelslike_f": 46.5, "vis_km": 10.0, "vis_miles": 6.0, "uv": 2.0, "gust_mph": 22.4, "gust_kph": 36.0 } } }, { "query": { "custom_id": "us-zipcode-id-765", "q": "90201", "location": { "name": "Bell", "region": "California", "country": "USA", "lat": 33.97, "lon": -118.17, "tz_id": "America/Los_Angeles", "localtime_epoch": 1673620220, "localtime": "2023-01-13 6:30" }, "current": { "last_updated_epoch": 1673620200, "last_updated": "2023-01-13 06:30", "temp_c": 10.0, "temp_f": 50.0, "is_day": 0, "condition": { "text": "Clear", "icon": "//cdn.weatherapi.com/weather/64x64/night/113.png", "code": 1000 }, "wind_mph": 2.2, "wind_kph": 3.6, "wind_degree": 10, "wind_dir": "N", "pressure_mb": 1020.0, "pressure_in": 30.13, "precip_mm": 0.0, "precip_in": 0.0, "humidity": 74, "cloud": 0, "feelslike_c": 10.3, "feelslike_f": 50.5, "vis_km": 16.0, "vis_miles": 9.0, "uv": 1.0, "gust_mph": 3.6 } } } ] } ``` -------------------------------- ### Realtime Weather API Source: https://www.weatherapi.com/docs Get up-to-date current weather information for a given city. The data is returned as a Current Object. ```APIDOC ## Realtime Weather API ### Description Allows a user to get up to date current weather information in JSON and XML format. The data is returned as a Current Object. ### Method GET ### Endpoint `/v1/current` (example endpoint, actual may vary) ### Parameters #### Query Parameters - **key** (string) - Required - Your API key. - **q** (string) - Required - City name, for example: London, New York, Paris. - **aqi** (string) - Optional - yes/no. Include or exclude air quality data in the response. - **lang** (string) - Optional - Language code for the condition text. Example: en, fr, es. ### Response #### Success Response (200) - **location** (object) - Location details. - **current** (object) - Current weather information. #### Response Example ```json { "location": { "name": "London", "region": "City of London, Greater London", "country": "United Kingdom", "lat": 51.52, "lon": -0.11, "tz_id": "Europe/London", "localtime_epoch": 1678889400, "localtime": "2023-03-15 15:50" }, "current": { "last_updated_epoch": 1678888800, "last_updated": "2023-03-15 15:45", "temp_c": 10.0, "temp_f": 50.0, "is_day": 1, "condition": { "text": "Partly cloudy", "icon": "//cdn.weatherapi.com/weather/64x64/day/116.png", "code": 1003 }, "wind_kph": 11.2, "wind_degree": 250, "wind_dir": "W", "pressure_mb": 1012.0, "pressure_in": 29.88, "precip_mm": 0.0, "precip_in": 0.0, "humidity": 60, "cloud": 50, "feelslike_c": 8.5, "feelslike_f": 47.3, "windchill_c": 8.5, "windchill_f": 47.3, "heatindex_c": 9.0, "heatindex_f": 48.2, "dewpoint_c": 5.0, "dewpoint_f": 41.0, "uv": 3.0, "gust_kph": 18.0 } } ``` ``` -------------------------------- ### Forecast Weather API Source: https://www.weatherapi.com/docs Get up to 14-day weather forecast and weather alerts for a given city. The data is returned as a Forecast Object. ```APIDOC ## Forecast Weather API ### Description Returns up to 14-day weather forecast and weather alerts as JSON or XML, depending on your subscription plan. The data is returned as a Forecast Object. ### Method GET ### Endpoint `/v1/forecast` (example endpoint, actual may vary) ### Parameters #### Query Parameters - **key** (string) - Required - Your API key. - **q** (string) - Required - City name, for example: London, New York, Paris. - **days** (int) - Required - Number of days to forecast. (e.g., 3, 7, 14) - **aqi** (string) - Optional - yes/no. Include or exclude air quality data in the response. - **alerts** (string) - Optional - yes/no. Include or exclude weather alerts in the response. - **lang** (string) - Optional - Language code for the condition text. Example: en, fr, es. ### Response #### Success Response (200) - **location** (object) - Location details. - **current** (object) - Current weather information. - **forecast** (object) - Forecast information. - **forecastday** (array) - Array of forecast days. - **date** (string) - Forecast date. - **day** (object) - Day weather forecast details. - **astro** (object) - Astronomy data (sunrise, sunset, moonrise, moonset). - **hour** (array) - Hourly forecast data. #### Response Example ```json { "location": { "name": "London", "region": "City of London, Greater London", "country": "United Kingdom", "lat": 51.52, "lon": -0.11, "tz_id": "Europe/London", "localtime_epoch": 1678889400, "localtime": "2023-03-15 15:50" }, "current": { "last_updated_epoch": 1678888800, "last_updated": "2023-03-15 15:45", "temp_c": 10.0, "temp_f": 50.0, "is_day": 1, "condition": { "text": "Partly cloudy", "icon": "//cdn.weatherapi.com/weather/64x64/day/116.png", "code": 1003 }, "wind_kph": 11.2, "wind_degree": 250, "wind_dir": "W", "pressure_mb": 1012.0, "pressure_in": 29.88, "precip_mm": 0.0, "precip_in": 0.0, "humidity": 60, "cloud": 50, "feelslike_c": 8.5, "feelslike_f": 47.3, "windchill_c": 8.5, "windchill_f": 47.3, "heatindex_c": 9.0, "heatindex_f": 48.2, "dewpoint_c": 5.0, "dewpoint_f": 41.0, "uv": 3.0, "gust_kph": 18.0 }, "forecast": { "forecastday": [ { "date": "2023-03-15", "date_epoch": 1678838400, "day": { "maxtemp_c": 12.0, "maxtemp_f": 53.6, "mintemp_c": 5.0, "mintemp_f": 41.0, "avgtemp_c": 8.5, "avgtemp_f": 47.3, "maxwind_mph": 15.0, "maxwind_kph": 24.1, "totalprecip_mm": 0.1, "totalprecip_in": 0.0, "avgvis_km": 10.0, "avgvis_miles": 6.0, "avghumidity": 70, "daily_will_it_rain": 1, "daily_chance_of_rain": 60, "daily_will_it_snow": 0, "daily_chance_of_snow": 0, "condition": { "text": "Patchy rain possible", "icon": "//cdn.weatherapi.com/weather/64x64/day/176.png", "code": 1063 }, "uv": 3.0 }, "astro": { "sunrise": "06:15 AM", "sunset": "06:00 PM", "moonrise": "07:00 AM", "moonset": "07:00 PM", "moon_phase": "Waxing Crescent", "moon_illumination": "30" }, "hour": [ { "time_epoch": 1678838400, "time": "2023-03-15 00:00", "temp_c": 6.0, "temp_f": 42.8, "is_day": 0, "condition": { "text": "Clear", "icon": "//cdn.weatherapi.com/weather/64x64/night/113.png", "code": 1000 }, "wind_kph": 5.0, "wind_degree": 200, "wind_dir": "SSW", "pressure_mb": 1015.0, "pressure_in": 29.97, "precip_mm": 0.0, "precip_in": 0.0, "humidity": 80, "cloud": 10, "feelslike_c": 4.0, "feelslike_f": 39.2, "windchill_c": 4.0, "windchill_f": 39.2, "heatindex_c": 6.0, "heatindex_f": 42.8, "dewpoint_c": 3.0, "dewpoint_f": 37.4, "uv": 1.0, "gust_kph": 10.0 } ] } ] } } ``` ``` -------------------------------- ### Astronomy API Source: https://www.weatherapi.com/docs Retrieves up-to-date information for sunrise, sunset, moonrise, moonset, moon phase, and illumination. ```APIDOC ## Astronomy API ### Description Allows a user to get up to date information for sunrise, sunset, moonrise, moonset, moon phase and illumination. ### Response - **sunrise** (string) - Sunrise local time - **sunset** (string) - Sunset local time - **moonrise** (string) - Moonrise local time - **moonset** (string) - Moonset local time - **moon_phase** (string) - Moon phases (e.g., New Moon, Full Moon) - **moon_illumination** (int) - Moon illumination - **is_moon_up** (int) - 1 = Yes or 0 = No - **is_sun_up** (int) - 1 = Yes or 0 = No ``` -------------------------------- ### WeatherAPI Query Parameters Source: https://www.weatherapi.com/docs This section details the query parameters available for the WeatherAPI. These parameters allow for customization of the weather data returned, including location, date, and specific data fields. ```APIDOC ## WeatherAPI Query Parameters ### Description This endpoint allows you to retrieve various weather data by specifying query parameters. ### Method GET ### Endpoint /websites/weatherapi ### Parameters #### Query Parameters - **key** (string) - Required - API Key - **q** (string) - Required - Query parameter based on which data is sent back. It could be following: * Latitude and Longitude (Decimal degree) e.g: q=48.8567,2.3508 * city name e.g.: q=Paris * US zip e.g.: q=10001 * UK postcode e.g: q=SW1 * Canada postal code e.g: q=G2J * metar: e.g: q=metar:EGLL * iata:<3 digit airport code> e.g: q=iata:DXB * auto:ip IP lookup e.g: q=auto:ip * IP address (IPv4 and IPv6 supported) e.g: q=100.0.0.1 * By ID returned from Search API. e.g: q=id:2801268 * bulk New - **days** (integer) - Required only with forecast API method. Number of days of forecast required. days parameter value ranges between 1 and 14. e.g: days=5. If no days parameter is provided then only today's weather is returned. - **dt** (string) - Required for History and Future API. Restrict date output for Forecast and History API method. For history API 'dt' should be on or after 1st Jan, 2010 in yyyy-MM-dd format (i.e. dt=2010-01-01). For forecast API 'dt' should be between today and next 14 day in yyyy-MM-dd format (i.e. dt=2010-01-01). For future API 'dt' should be between 14 days and 300 days from today in the future in yyyy-MM-dd format (i.e. dt=2023-01-01). - **unixdt** (integer) - Optional - Unix Timestamp used by Forecast and History API method. unixdt has same restriction as 'dt' parameter. Please either pass 'dt' or 'unixdt' and not both in same request. e.g.: unixdt=1490227200 - **end_dt** (string) - Optional (Available for History API) - Restrict date output for History API method. For history API 'end_dt' should be on or after 1st Jan, 2010 in yyyy-MM-dd format (i.e. dt=2010-01-01). 'end_dt' should be greater than 'dt' parameter and difference should not be more than 30 days between the two dates. Only works for API on Pro plan and above. - **unixend_dt** (integer) - Optional - Unix Timestamp used by History API method. unixend_dt has same restriction as 'end_dt' parameter. Please either pass 'end_dt' or 'unixend_dt' and not both in same request. e.g.: unixend_dt=1490227200 - **hour** (integer) - Optional - Restricting forecast or history output to a specific hour in a given day. Must be in 24 hour. For example 5 pm should be hour=17, 6 am as hour=6 - **alerts** (string) - Optional - Disable alerts in forecast API output. alerts=yes or alerts=no - **aqi** (string) - Optional - Enable/Disable Air Quality data in forecast API output. aqi=yes or aqi=no - **pollen** (string) - Optional (New) - Enable/Disable Pollen data in realtime, forecast, future and history API output. pollen=yes or pollen=no - **tides** (string) - Optional (New) - Enable/Disable Tide data in Marine API output. tides=yes or tides=no - **tp** (string) - Optional - Get 15 min interval data for Forecast and History API. Available for Enterprise clients only. tp=15 - **current_fields** (string) - Optional (New) - Pass field names as comma seperated which should be returned in the current element. current_fields=temp_c,wind_mph - **day_fields** (string) - Optional (New) - Pass field names as comma seperated which should be returned in the Forecast or History API day element. day_fields=temp_c,wind_mph - **hour_fields** (string) - Optional (New) - Pass field names as comma seperated which should be returned in the Forecast or History API hour element. hour_fields=temp_c,wind_mph - **solar** (string) - Optional (Enterprise) (New) - Enable solar irradiance data in History API. Available for Enterprise clients only. solar=yes - **et0** (string) - Optional - Enable Evapotranspiration data in Forecast and History API. Available for Business and Enterprise clients only. et0=yes - **wind100mph** (string) - Optional (Enterprise) (New) - Enable wind data and return wind speed in mph at 100mt height in History API. Available for Enterprise clients only. wind100mph=yes - **wind100kph** (string) - Optional (Enterprise) (New) - Enable wind data and return wind speed in kmph at 100mt height in History API. Available for Enterprise clients only. wind100kph=yes - **lang** (string) - Optional - Returns 'condition:text' field in API in the desired language. Please pass 'lang code' from below table. e.g.: lang=fr ### Language Codes | Language | lang code | |---|---| | Arabic | ar | | Bengali | bn | | Bulgarian | bg | | Chinese Simplified | zh | | Chinese Traditional | zh_tw | | Czech | cs | | Danish | da | | Dutch | nl | | Finnish | fi | | French | fr | | German | de | | Greek | el | | Hindi | hi | | Hungarian | hu | | Italian | it | | Japanese | ja | | Javanese | jv | | Korean | ko | | Mandarin | zh_cmn | | Marathi | mr | | Polish | pl | | Portuguese | pt | | Punjabi | pa | | Romanian | ro | | Russian | ru | | Serbian | sr | | Sinhalese | si | | Slovak | sk | | Spanish | es | | Swedish | sv | | Tamil | ta | | Telugu | te | | Turkish | tr | | Ukrainian | uk | | Urdu | ur | | Vietnamese | vi | | Wu (Shanghainese) | zh_wuu | | Xiang | zh_hsn | | Yue (Cantonese) | zh_yue | | Zulu | zu | ### Request Example ```json { "example": "GET /websites/weatherapi?key=YOUR_API_KEY&q=London&days=5&aqi=no" } ``` ### Response #### Success Response (200) - **data** (object) - Contains the weather data. #### Response Example ```json { "example": "{\"location\":{\"name\":\"London\",\"region\":\"Greater London\",\"country\":\"United Kingdom\",\"lat\":51.52,\"lon\":-0.11,\"tz_id\":\"Europe/London\",\"localtime_epoch\":1678889400,\"localtime\":\"2023-03-15 13:30\"},\"current\":{\"last_updated_epoch\":1678888800,\"last_updated\":\"2023-03-15 13:15\",\"temp_c\":10.0,\"temp_f\":50.0,\"is_day\":1,\"condition\":{\"text\":\"Partly cloudy\",\"icon\":\"//cdn.weatherapi.com/weather/64x64/day/116.png\",\"code\":1003},\"wind_mph\":10.0,\"wind_kph\":16.1,\"wind_degree\":240,\"wind_dir\":\"WSW\",\"pressure_mb\":1015.0,\"pressure_in\":29.97,\"precip_mm\":0.0,\"precip_in\":0.0,\"humidity\":60,\"cloud\":50,\"feelslike_c\":8.5,\"feelslike_f\":47.3,\"vis_km\":10.0,\"vis_miles\":6.0,\"uv\":3.0}}" } ``` ``` -------------------------------- ### Weather Condition Codes and Translations Source: https://www.weatherapi.com/docs/conditions.json This section details specific weather condition codes, their English descriptions for day and night, and provides translations in multiple languages. ```APIDOC ## Weather Condition Codes and Translations ### Description This section details specific weather condition codes, their English descriptions for day and night, and provides translations in multiple languages. ### Endpoint `/websites/weatherapi` ### Parameters This endpoint does not appear to have explicit parameters documented in the provided text. ### Request Body Not applicable for this documentation snippet. ### Response #### Success Response (200) - **code** (integer) - A numerical code representing the weather condition. - **day** (string) - English description of the weather condition during the day. - **night** (string) - English description of the weather condition during the night. - **icon** (integer) - An icon identifier for the weather condition. - **languages** (array) - A list of language objects, each containing translations for the weather condition. - **lang_name** (string) - The name of the language. - **lang_iso** (string) - The ISO language code. - **day_text** (string) - The translated weather description for the day. - **night_text** (string) - The translated weather description for the night. #### Response Example ```json { "code": 1240, "day": "Light rain shower", "night": "Light rain shower", "icon": 353, "languages": [ { "lang_name": "Arabic", "lang_iso": "ar", "day_text": "زخَات خفيفة من الأمطار", "night_text": "زخَات خفيفة من الأمطار" }, { "lang_name": "Bengali", "lang_iso": "bn", "day_text": "হাল্কা স্বল্পস্থায়ী বৃষ্টিপাত", "night_text": "হাল্কা স্বল্পস্থায়ী বৃষ্টিপাত" } // ... other languages ] } ``` ## Weather Condition Code 1243 ### Description Details for weather condition code 1243, representing 'Moderate or heavy rain shower'. ### Method Not specified ### Endpoint `/websites/weatherapi` ### Parameters Not specified ### Request Body Not specified ### Response #### Success Response (200) - **code** (integer) - 1243 - **day** (string) - Moderate or heavy rain shower - **night** (string) - Moderate or heavy rain shower - **icon** (integer) - 356 - **languages** (array) - Translations for 'Moderate or heavy rain shower'. - **lang_name** (string) - Name of the language. - **lang_iso** (string) - ISO language code. - **day_text** (string) - Translated day description. - **night_text** (string) - Translated night description. #### Response Example ```json { "code": 1243, "day": "Moderate or heavy rain shower", "night": "Moderate or heavy rain shower", "icon": 356, "languages": [ { "lang_name": "Arabic", "lang_iso": "ar", "day_text": "زخَات معتدلة أو شديدة من الأمطار", "night_text": "زخَات معتدلة أو شديدة من الأمطار" }, { "lang_name": "Bengali", "lang_iso": "bn", "day_text": "মাঝারি ও ভারী স্বল্পস্থায়ী বৃষ্টিপাত", "night_text": "মাঝারি ও ভারী স্বল্পস্থায়ী বৃষ্টিপাত" } // ... other languages ] } ``` ``` -------------------------------- ### POST /v1/current.json (Bulk Locations) Source: https://www.weatherapi.com/docs This endpoint allows you to request current weather data for multiple locations in a single API call. The request body should be a JSON object containing a 'locations' array, where each element specifies a location's query parameter 'q' and an optional 'custom_id'. ```APIDOC ## POST /v1/current.json ### Description Retrieves current weather data for multiple specified locations in a single request. ### Method POST ### Endpoint `/v1/current.json?key=YOUR_API_KEY&q=bulk` ### Parameters #### Query Parameters - **key** (string) - Required - Your WeatherAPI key. - **q** (string) - Required - Set to `bulk` for bulk requests. #### Request Body - **locations** (array) - Required - An array of location objects. - **q** (string) - Required - Location query. Can be lat/lon, zipcode, city name, etc. - **custom_id** (string) - Optional - A custom identifier to be returned in the response. ### Request Example ```json { "locations": [ { "q": "53,-0.12", "custom_id": "my-id-1" }, { "q": "London", "custom_id": "any-internal-id" }, { "q": "90201", "custom_id": "us-zipcode-id-765" } ] } ``` ### Response #### Success Response (200) - **location** (object) - Details about the location. - **current** (object) - Current weather conditions. - **custom_id** (string) - The `custom_id` provided in the request, if any. ``` -------------------------------- ### Weather Condition Codes and Translations Source: https://www.weatherapi.com/docs/conditions.json This section details the weather condition codes, their English descriptions for day and night, and provides translations in multiple languages. ```APIDOC ## Weather Condition Codes and Translations This API provides a comprehensive list of weather condition codes, their English descriptions, and localized text for various languages. ### Data Structure Each weather condition object contains: - `code` (integer): A unique identifier for the weather condition. - `day` (string): The English description of the weather condition during the day. - `night` (string): The English description of the weather condition during the night. - `icon` (integer): An icon identifier associated with the weather condition. - `languages` (array): A list of objects, where each object represents a translation for the weather condition in a specific language. - `lang_name` (string): The full name of the language. - `lang_iso` (string): The ISO language code. - `day_text` (string): The localized description for the day. - `night_text` (string): The localized description for the night. ### Example Data #### Freezing drizzle (Code: 281) ```json { "code": 281, "day": "Freezing drizzle", "night": "Freezing drizzle", "icon": 281, "languages": [ { "lang_name": "Arabic", "lang_iso": "ar", "day_text": "رذاذ متجمِد", "night_text": "رذاذ متجمِد" }, { "lang_name": "Bengali", "lang_iso": "bn", "day_text": "হাল্কা গুড়ি গুড়ি হিম শীতল বৃষ্টিপাত", "night_text": "হাল্কা গুড়ি গুড়ি হিম শীতল বৃষ্টিপাত" } // ... other languages ] } ``` #### Heavy freezing drizzle (Code: 284) ```json { "code": 284, "day": "Heavy freezing drizzle", "night": "Heavy freezing drizzle", "icon": 284, "languages": [ { "lang_name": "Arabic", "lang_iso": "ar", "day_text": "رذاذ متجمِد شديد", "night_text": "رذاذ متجمِد شديد" }, { "lang_name": "Bengali", "lang_iso": "bn", "day_text": "ভারী গুড়ি গুড়ি হিম শীতল বৃষ্টিপাত", "night_text": "ভারী গুড়ি গুড়ি হিম শীতল বৃষ্টিপাত" } // ... other languages ] } ``` ### Available Languages The API supports translations for the following languages (this is a partial list): - Arabic (ar) - Bengali (bn) - Bulgarian (bg) - Chinese Simplified (zh) - Chinese Traditional (zh_tw) - Czech (cs) - Dutch (nl) - Finnish (fi) - French (fr) - German (de) - Greek (el) - Hindi (hi) - Hungarian (hu) - Italian (it) - Japanese (ja) - Javanese (jv) - Korean (ko) - Mandarin (zh_cmn) - Marathi (mr) - Polish (pl) - Portuguese (pt) - Punjabi (pa) - Romanian (ro) - Russian (ru) - Serbian (sr) - Sinhalese (si) - Slovak (sk) - Spanish (es) - Swedish (sv) - Tamil (ta) - Telugu (te) - Turkish (tr) - Ukrainian (uk) - Urdu (ur) - Vietnamese (vi) - Wu (Shanghainese) (zh_wuu) - Xiang (zh_hsn) - Yue (Cantonese) (zh_yue) - Zulu (zu) ``` -------------------------------- ### Weather Alerts Source: https://www.weatherapi.com/docs Details on how to retrieve and interpret weather alerts and warnings issued by government agencies. ```APIDOC ## Weather Alerts ### Description Forecast and Alerts APIs return government-issued alerts as an array. By default, alerts are not returned; set the parameter `alerts=yes` in the Forecast API to include them. ### Fields - **headline** (string) - Alert headline - **msgType** (string) - Type of alert - **severity** (string) - Severity of alert - **urgency** (string) - Urgency - **areas** (string) - Areas covered - **category** (string) - Category - **certainty** (string) - Certainty - **event** (string) - Event - **note** (string) - Note - **effective** (date) - Effective - **expires** (string) - Expires - **desc** (string) - Description - **instruction** (string) - Instruction ``` -------------------------------- ### Weather Data Elements Source: https://www.weatherapi.com/docs This section details the data fields available for different weather forecast components. ```APIDOC ## Weather API Data Elements This documentation describes the data fields available for various weather forecast components. ### Day Element This element provides a daily summary of weather conditions. #### Fields - **maxtemp_c** (decimal) - Maximum temperature in celsius for the day. - **maxtemp_f** (decimal) - Maximum temperature in fahrenheit for the day. - **mintemp_c** (decimal) - Minimum temperature in celsius for the day. - **mintemp_f** (decimal) - Minimum temperature in fahrenheit for the day. - **avgtemp_c** (decimal) - Average temperature in celsius for the day. - **avgtemp_f** (decimal) - Average temperature in fahrenheit for the day. - **maxwind_mph** (decimal) - Maximum wind speed in miles per hour. - **maxwind_kph** (decimal) - Maximum wind speed in kilometer per hour. - **totalprecip_mm** (decimal) - Total precipitation in milimeter. - **totalprecip_in** (decimal) - Total precipitation in inches. - **totalsnow_cm** (decimal) - Total snowfall in centimeters. - **avgvis_km** (decimal) - Average visibility in kilometer. - **avgvis_miles** (decimal) - Average visibility in miles. - **avghumidity** (int) - Average humidity as percentage. - **condition:text** (string) - Weather condition text. - **condition:icon** (string) - Weather condition icon. - **condition:code** (int) - Weather condition code. - **uv** (decimal) - UV Index. - **daily_will_it_rain** (int) - 1 = Yes, 0 = No. Indicates if rain is expected. - **daily_will_it_snow** (int) - 1 = Yes, 0 = No. Indicates if snow is expected. - **daily_chance_of_rain** (int) - Chance of rain as percentage. - **daily_chance_of_snow** (int) - Chance of snow as percentage. ### Astro Element This element provides astronomical information for the day. #### Fields - **sunrise** (string) - Sunrise time. - **sunset** (string) - Sunset time. - **moonrise** (string) - Moonrise time. - **moonset** (string) - Moonset time. - **moon_phase** (string) - Moon phases (e.g., New Moon, Waxing Crescent, Full Moon). - **moon_illumination** (decimal) - Moon illumination as a percentage. - **is_moon_up** (int) - 1 = Yes, 0 = No. Indicates if the moon is currently up. - **is_sun_up** (int) - 1 = Yes, 0 = No. Indicates if the sun is currently up. ### Hour Element This element provides detailed weather information for each hour. #### Fields - **time_epoch** (int) - Time as epoch. - **time** (string) - Date and time. - **temp_c** (decimal) - Temperature in celsius. - **temp_f** (decimal) - Temperature in fahrenheit. - **condition:text** (string) - Weather condition text. - **condition:icon** (string) - Weather condition icon. - **condition:code** (int) - Weather condition code. - **wind_mph** (decimal) - Maximum wind speed in miles per hour. - **wind_kph** (decimal) - Maximum wind speed in kilometer per hour. - **wind_degree** (int) - Wind direction in degrees. - **wind_dir** (string) - Wind direction as a 16-point compass (e.g., NSW). - **pressure_mb** (decimal) - Pressure in millibars. - **pressure_in** (decimal) - Pressure in inches. - **precip_mm** (decimal) - Precipitation amount in millimeters. - **precip_in** (decimal) - Precipitation amount in inches. - **snow_cm** (decimal) - Snowfall in centimeters. - **humidity** (int) - Humidity as percentage. - **cloud** (int) - Cloud cover as percentage. - **feelslike_c** (decimal) - Feels like temperature in celsius. - **feelslike_f** (decimal) - Feels like temperature in fahrenheit. - **windchill_c** (decimal) - Windchill temperature in celsius. - **windchill_f** (decimal) - Windchill temperature in fahrenheit. - **heatindex_c** (decimal) - Heat index in celsius. - **heatindex_f** (decimal) - Heat index in fahrenheit. - **dewpoint_c** (decimal) - Dew point in celsius. - **dewpoint_f** (decimal) - Dew point in fahrenheit. - **will_it_rain** (int) - 1 = Yes, 0 = No. Indicates if rain is expected. - **will_it_snow** (int) - 1 = Yes, 0 = No. Indicates if snow is expected. - **is_day** (int) - 1 = Yes, 0 = No. Indicates if it's day or night. - **vis_km** (decimal) - Visibility in kilometer. - **vis_miles** (decimal) - Visibility in miles. - **chance_of_rain** (int) - Chance of rain as percentage. - **chance_of_snow** (int) - Chance of snow as percentage. - **gust_mph** (decimal) - Wind gust in miles per hour. - **gust_kph** (decimal) - Wind gust in kilometer per hour. - **uv** (decimal) - UV Index. - **short_rad** (decimal) - (Available for paid plan users only) Shortwave solar radiation or Global horizontal irradiation (GHI) W/m². - **diff_rad** (decimal) - (Available for paid plan users only) Diffuse Horizontal Irradiation (DHI) W/m². - **dni** (decimal) - (Available for paid plan users only) Direct Normal Irradiance (DNI) W/m². - **gti** (decimal) - (Available for paid plan users only) Global Tilted Irradiance (GTI) W/m². - **et0** (decimal) - (Business plan and above) Evapotranspiration. - **air_quality** (element) - See aqi element. - **pollen** (element) - See pollen element. ```