Enable Algolia Recommend in your dashboard and confirm your plan includes recommendation models.
Send conversion events (e.g., purchase events) using the Insights API so the model can train; the frequently-bought-together model requires at least some conversion data before generating recommendations.
Once the model has trained (visible in the Recommend dashboard), call the getRecommendations method from an Algolia client library or POST to the Recommend REST endpoint at https://{APP_ID}-dsn.algolia.net/1/indexes/*/recommendations, passing modelType: 'bought-together', indexName, and the source objectID.
Parse the JSON response; each hit includes the recommended objectID and a score. Enforce a maxRecommendations cap (default model generates up to 30).
Display results in a 'Frequently Bought Together' widget; use the same userToken for both search queries and events so personalization and analytics remain consistent.
Known gotchas
The model requires real conversion event history — without sufficient purchase events it will return zero results. Use the 'strict' model variant only when you need exact co-purchase pairs; the default 'relaxed' variant uses collaborative filtering and tolerates sparser data.
Recommendation models are retrained periodically; newly added products will not appear in results immediately.
The Recommend API uses its own base URL ({APP_ID}-dsn.algolia.net) and requires an API key with the search ACL, not a write-only key.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp