refactor api call to only specify API_KEY once