test nearest API