If you are using InstantSearch's Recommend widgets (or the deprecated recommend-js UI library), you can pass multiple objectIDs to the objectIDs parameter. When you do this, Algolia returns a single set of aggregated results, ordered by their score.
At the moment, this behavior is only supported for the following Recommend models:
Each objectID included in the array counts toward the
number
of
requests in your pricing plan.
If you are using the Recommend API get recommendations method to retrieve recommendations, the objectID parameter doesn’t accept an array in the same way as the Recommend widgets.
To retrieve recommendations for multiple product IDs, a suggested workaround is:
Send multiple requests.
Include a single
objectIDper request.Aggregate the responses on your side.
Display the merged results as a single recommendation set in your frontend.
The apply this workaround to display one set of recommendations on your front end, you can add the helper function's logic used by the Recommend widgets to your own implementation.