Recommendations for current page

I seem to be missing the step to get the objectid of the page I am on. I want recommendations for the current page but recommendations require the objectID from the index. Do I need to first make a query to Algolia to get the objectID and then make a second query to Algolia to get recommendations?