FAQ content

Hours: Retrieve weekly hours data in JSON or XML format

In this article

The Weekly Data API allows you to retrieve the hours for your libraries and departments, in either JSON or XML format. This is a helpful option if you want to build your own script for displaying library hours, interfacing with automated signage, etc.

Note: to conserve server resources, all widget requests are cached. As a result, you may not immediately see changes made to your hours until the cache has cleared, which occurs every 1 hour.

Getting there

To create hours widgets, go to Admin > Hours and click on the Widgets tab.

Navigating to the Hours Widgets page

Obtaining a Weekly Data request URL

  1. Click on the Weekly Data tab.
  2. In the # Weeks to Show, enter the number of weeks you want to retrieve. You can enter any value between 1 and 52.
  3. From the Request Format dropdown, select whether you want to retrieve the hours in JSON or XML format.
  4. Click the Generate/Update Code button.
    1. A preview of the response data will appear.
  5. Click on the Embed Code to highlight it and copy it by either:
    • Pressing CTRL + C on your keyboard
    • Right-clicking on it and selecting "Copy"

Example of the weekly data API