Custom Connector

WeatherAPI Connector

Global

The WeatherAPI Connector provides a robust interface to WeatherAPI’s services — current conditions, forecasts, historical weather, astronomy data, and more. It supports detailed weather information, location search, alerts, sports forecasts, time zones, and IP-based location lookups.

Type
Virtual machines, Single VM, BYOL
Runs on
Google Compute Engine
Last update
24 Oct 2024
Category
Big data, Analytics, DevOps
Overview

WeatherAPI Connector Overview

This document provides a comprehensive guide for each endpoint, its purpose, configuration, and workflow support using the WeatherAPI Connector. The connector forwards HTTP GET requests to WeatherAPI. Configure the base URL via CONNECTOR_ENV_WEATHERAPI_BASE_URL and include the WeatherAPI key in the request header.

  • get_current_weather. Retrieves current weather conditions.
  • get_forecast_weather. Retrieves weather forecasts for specified days.
  • get_historical_weather. Retrieves past weather data for a given date.
  • get_future_weather. Retrieves future weather predictions.
  • get_marine_weather. Retrieves marine-related weather forecasts.
  • get_astronomy_data. Retrieves astronomy data like sunrise, sunset, and moon phases.
  • search_locations. Searches locations by name or query string.
  • get_alerts. Retrieves active weather alerts.
  • get_sports_weather. Retrieves weather data for sporting events or venues.
  • get_timezone_info. Retrieves time zone information for a location.
  • get_ip_lookup. Performs IP-based geolocation lookup.
Documentation

Detailed Integration Documentation

Current Weather Retrieval

Actionget_current_weather
PurposeRetrieves current weather conditions for a specified location.
ConfigurationConfigure the base URL via CONNECTOR_ENV_WEATHERAPI_BASE_URL; include the WeatherAPI key in the request header.
ParametersRequired:
q – location query (e.g. “London”, “90210”, or “latitude,longitude”). Optional:
lang – language code (e.g. en, fr).
OutputSuccessful: JSON with temperature, wind speed, humidity, and condition text. Failure: 400/401/404/500.
Workflow exampleExecute a GET request to /current.json?q=London and display current conditions.

Forecast Weather Retrieval

Actionget_forecast_weather
PurposeRetrieves forecasted weather data for the specified location and days.
ParametersRequired:
q – location query. days – number of forecast days. Optional:
alerts (boolean), aqi (boolean).
Workflow exampleGET /forecast.json?q=London&days=3&alerts=yes&aqi=yes

Historical Weather Retrieval

Actionget_historical_weather
PurposeRetrieves historical weather data for a given location and date.
ParametersRequired:
q – location query. dt – date (YYYY-MM-DD).
Workflow exampleGET /history.json?q=London&dt=2024-09-01

Future Weather Retrieval

Actionget_future_weather
PurposeRetrieves future (experimental) weather forecasts.
Parametersq – location query. dt – date in the future (YYYY-MM-DD).
Workflow exampleGET /future.json?q=London&dt=2025-09-01

Marine Weather Retrieval

Actionget_marine_weather
PurposeRetrieves marine weather forecasts for oceans or seas.
ParametersRequired:
q – marine location coordinates (latitude,longitude).
Workflow exampleGET /marine.json?q=36.7783,-119.4179

Astronomy Data Retrieval

Actionget_astronomy_data
PurposeRetrieves astronomy data (sunrise, sunset, moon phases) for a location and date.
ParametersRequired:
q – location query. dt – date (optional, defaults to current).
Workflow exampleGET /astronomy.json?q=London&dt=2024-09-23

Location Search

Actionsearch_locations
PurposeSearches for locations matching a query string.
ParametersRequired:
q – location name or query string.
Workflow exampleGET /search.json?q=Paris

Alerts Retrieval

Actionget_alerts
PurposeRetrieves active weather alerts for a location.
ParametersRequired:
q – location query.
Workflow exampleGET /alerts.json?q=London

Sports Weather Retrieval

Actionget_sports_weather
PurposeRetrieves weather data for sports venues or events.
ParametersOptional:
q – location or venue query.
Workflow exampleGET /sports.json?q=London

Timezone Info Retrieval

Actionget_timezone_info
PurposeRetrieves time zone information for a location.
ParametersRequired:
q – location query.
Workflow exampleGET /timezone.json?q=London

IP Lookup

Actionget_ip_lookup
PurposePerforms IP-based location lookup to retrieve location and time zone data.
ParametersRequired:
q – IP address or auto:ip.
Workflow exampleGET /ip.json?q=auto:ip

Example Workflow: Forecast and Alerts Integration

Retrieve forecastExecute get_forecast_weather with q=London&days=3 and display a 3-day forecast.
Retrieve alertsExecute get_alerts with q=London and display alerts alongside forecast data.
Show astronomyExecute get_astronomy_data with q=London and display sunrise/sunset times.
Time zone infoExecute get_timezone_info with q=London and adjust time displays accordingly.
Support

For technical support, contact custom-connectors-support@isolutions.sa.

free consultation

Schedule a Free Consultation With Our Specialists

Book a free demo
request

Begin Your Adventure With Experienced Professionals

Send request
help desk

Do You Have Questions or Want More Information? Call Now.

Contact support