api integrated and saves to db