Skip to main content
The Bought together API returns the products your customers most often bought in the same order as a given product, counted from your real orders. It powers <molin-bought-together>, and you can call it directly to build your own “frequently bought together” block. The endpoint is public, read-only, and needs no API key: the widget ID identifies the shop, and shoppers call it straight from the browser.
Call widget.molin.ai, never molin.ai. Keeping every widget request on one origin means you don’t have to add another origin to your Content Security Policy.
Shopify, Shoprenter, UNAS, and Shoper shops: ask Molin support to enable order syncing. Recommendations use your synced orders from the last 60 days. A companion only appears once it was bought with the product in at least two orders.

GET /v1/bought-together

string
required
Your widget ID, which selects the shop.
string
required
The product page URL. Tracking parameters and fragments are ignored, and the page is matched to your catalog by URL, or by gtin or sku when given.
string
The product’s GTIN, when your storefront URL differs from the product feed URL.
string
The product’s SKU, when your storefront URL differs from the product feed URL.
number
default:"3"
Products to return, from 1 through 12.
'0' | '1'
default:"0"
1 adds an AI-written paragraph explaining why these products go with the one on the page.
string
Language tag the explanation is written in, such as hu or en-US. Defaults to your widget’s language.

Response

object | null
The page’s own product, so you can show it at the head of the set the way a “frequently bought together” row does. null when the page is not a known product, or when nothing was bought with it.
array
Companions, strongest first, each once even when it sits in several sets. coOrders is how many orders held both this product and the page product. originalPrice is empty when the source didn’t provide a price before the discount. Only products that can still be bought are returned.
number | null
The price as a number, with priceCurrency as its ISO code, on the page product and on every companion. Use them to add a bundle total up rather than parsing the display price. priceAmount is null when the source price could not be read as a number.
string
The AI-written paragraph when explain=1 was given and the text could be written, otherwise empty.
An unknown product, or one nobody has bought anything with yet, answers 200 with an empty products list rather than an error.

Caching and limits

Responses are cached for one hour. Requests are rate limited per IP.

Errors

The endpoint answers 400 for a missing or unknown widget ID, a missing url, and a limit outside the range described earlier, with no body. Treat a rejection as a bug in the request rather than something to retry.