Add API sort utility.