API module to get data and HTML to construct a popup