API query works in preview but not on live public site

@victoria same issue