paginate locations and define api route for tags