Make API call before page load

Thanks @aaronksaunders - that is exactly what I was looking for!