WeatherAPI Connect

WeatherAPI data into your data warehouse in minutes

Collect WeatherAPI data into your data warehouse or ours. The Matatika pipelines will take care of the data collection and preparation for your analytics and BI tools.

Automate WeatherAPI from a single space with no code

WeatherAPI is a weather data provider offering current conditions, forecasts, and historical weather data for any location worldwide. It supports queries by city name, US zip code, UK postcode, latitude/longitude pairs, IP address, and more.

The tap-weatherapi extractor connects to the WeatherAPI REST API to sync weather data for one or more configured locations into your data warehouse.

Prerequisites

Obtain a free or paid API key from the WeatherAPI dashboard and set it as the API Key setting.

Available Streams

forecast

Daily forecast data for each configured location. Each record represents one forecast day per location. Synced as a full-table refresh (no replication key).

Field Description
location The query string used (zip, city, lat/lon, …) — primary key
date Calendar date (YYYY-MM-DD) — primary key
custom_id A custom identifier for the location
date_epoch Unix epoch timestamp for the date
location_name Resolved location name
location_region Region or state of the location
location_country Country of the location
location_lat Latitude of the location
location_lon Longitude of the location
location_tz_id Time zone identifier
maxtemp_c Maximum temperature in Celsius
maxtemp_f Maximum temperature in Fahrenheit
mintemp_c Minimum temperature in Celsius
mintemp_f Minimum temperature in Fahrenheit
avgtemp_c Average temperature in Celsius
avgtemp_f Average temperature in Fahrenheit
maxwind_mph Maximum wind speed in mph
maxwind_kph Maximum wind speed in kph
totalprecip_mm Total precipitation in mm
totalprecip_in Total precipitation in inches
totalsnow_cm Total snowfall in cm
avgvis_km Average visibility in km
avgvis_miles Average visibility in miles
avghumidity Average humidity percentage
daily_will_it_rain Whether it will rain (1 = yes, 0 = no)
daily_chance_of_rain Percentage chance of rain
daily_will_it_snow Whether it will snow (1 = yes, 0 = no)
daily_chance_of_snow Percentage chance of snow
condition Weather condition object with text description, icon URL, and condition code
uv UV index
sunrise Sunrise time
sunset Sunset time
moonrise Moonrise time
moonset Moonset time
moon_phase Moon phase description
moon_illumination Moon illumination percentage
hour Array of hourly weather data objects (see hourly fields below)

Hourly fields (each item in the hour array):

Field Description
time_epoch Unix epoch for the hour
time Local date and time for the hour
temp_c Temperature in Celsius
temp_f Temperature in Fahrenheit
is_day Whether it is daytime (1 = yes, 0 = no)
condition Weather condition object (text, icon, code)
wind_mph Wind speed in mph
wind_kph Wind speed in kph
wind_degree Wind direction in degrees
wind_dir Wind direction as compass bearing (e.g. NNE)
pressure_mb Atmospheric pressure in millibars
pressure_in Atmospheric pressure in inches
precip_mm Precipitation in mm
precip_in Precipitation in inches
snow_cm Snowfall in cm
humidity Humidity percentage
cloud Cloud cover percentage
feelslike_c Feels-like temperature in Celsius
feelslike_f Feels-like temperature in Fahrenheit
windchill_c Wind chill in Celsius
windchill_f Wind chill in Fahrenheit
heatindex_c Heat index in Celsius
heatindex_f Heat index in Fahrenheit
dewpoint_c Dew point in Celsius
dewpoint_f Dew point in Fahrenheit
will_it_rain Whether it will rain this hour (1 = yes, 0 = no)
chance_of_rain Percentage chance of rain this hour
will_it_snow Whether it will snow this hour (1 = yes, 0 = no)
chance_of_snow Percentage chance of snow this hour
vis_km Visibility in km
vis_miles Visibility in miles
gust_mph Wind gust speed in mph
gust_kph Wind gust speed in kph
uv UV index

historical

Historical daily weather data for each configured location. Each record represents one day per location. Synced incrementally using date as the replication key, starting from start_date. Shares the same schema as the forecast stream.

Settings

API Key

WeatherAPI key (https://www.weatherapi.com/my/)

Locations

One or more locations to fetch weather data for. Accepts city names, US zip codes, UK/Canada postcodes, lat/lon pairs, airport codes, IP addresses, and Search API IDs. See https://www.weatherapi.com/docs/#intro-request for full syntax. Use locations_file instead when syncing many locations.

Locations File

Path to a JSON file listing locations to sync. Format: [{"location": "90210", "custom_id": "beverly-hills"}, ...]. location accepts the same values as the locations setting. custom_id is optional; when provided it is passed through to each record and used to correlate bulk-request responses with the original query.

Start Date

Earliest date for historical data sync (YYYY-MM-DD).

End Date

Latest date for historical data sync, in ISO format. Defaults to yesterday's date.

Forecast Days

Number of days to include in the forecast stream (1-14).

Use Bulk Requests

Send all locations in a single POST request instead of one GET request per location. Requires a WeatherAPI Pro+, Business, or Enterprise plan. Each location in a bulk request still counts as one API call. See https://www.weatherapi.com/docs/#intro-bulk.

Bulk Request Chunk Size

Maximum number of locations per bulk POST request (5-50). When the location list exceeds this value the tap splits it into consecutive chunks of this size. Only applies when use_bulk_requests is true.


View source code

WeatherAPI data you can trust

Extract, Transform, and Load WeatherAPI data into your data warehouse or ours.

Interested in learning more?

Get in touch