Uses fetch to access the specified API