Wrapper for API call