Improve API performance by reducing DB calls