Accesses & Caching

API Accesses & Caching

When adding WeatherBlox views to your website, they will make calls to the Xweather Weather API and/or Xweather Raster Maps to obtain the required weather information. Since WeatherBlox views utilize your Xweather account for requesting data, it's important to understand that WeatherBlox view requests will also count against your maximum daily access for our data and/or maps API and that the total accesses varies depending on the view requested.

The documentation for each weather view and layout will provide information on the number of data and/or map API accesses that will be used to request and render the necessary weather data. In general, each weather view uses 1-3 data API calls to fetch and display the weather information, whereas layouts can use considerably more as they are comprised of multiple individual views.

While the two implementation methods for WeatherBlox, client-side and server-side, generally consume the same number of hits for weather data (except for Raster Maps requests which varies), caching these requests can greatly reduce the total number of accesses required that count against your daily allowed maximum for your account.

Data usage

When integrating WeatherBlox via JavaScript, all data API requests are made from the web visitor's browser. Therefore, each time a page containing WeatherBlox views is requested by a user, it will count as additional API calls. The exception to this would be any browser-based caching that is enabled, which would then cache each API request based on those requests' cache headers.

For example, if you include a single Advisories view that will consume 1 weather API access per page view. So if this page receives 10,000 views throughout the day, then there would be 10,000 API accesses against your account's limit.

Alternatively, if you include the Observations view, then 1 to 3 API accesses will be used per page view depending on options (e.g. having threats and advisories enabled). If this page receives 10,000 views per day, then up to 30,000 daily accesses to the Xweather Weather API will be required from your account.

Raster Maps usage

Many of the WeatherBlox views and layouts include weather maps utilizing Xweather Raster Maps. The total Raster Maps units consumed by these views will be highly dependent upon the configuration of the views, such as the size of the maps, total layers, and animation playback. Review the map units documentation (opens in a new tab) for more information on calculating Raster Maps usage.