adding /api/search endpoint