Building an API / JSON based route for searching