custom api route for indexing