Updated getAPI method