# Recommendations API

> The shopper's size for up to 25 products from your server or a headless storefront, from a sealed handle the browser SDK issues.

Source: https://docs.tryyoursize.com/products/recommendations-api/

For server-rendered and headless storefronts, search results and carts: your server asks for the shopper's size for up to 25 products at once, in your size labels.

1. In the browser, [`tys.recommendationHandle()`](https://docs.tryyoursize.com/reference/web/client-recommendation-handle.md) returns an opaque, encrypted **handle** (valid for an hour). Your page cannot read anything in it.
2. Your page sends the handle to your server with its request.
3. Your server calls [`POST /v1/recommendations`](https://docs.tryyoursize.com/api/reference/operations/createrecommendations.md) with a secret or restricted key (`fit_checks:read`).

```ts
const { data } = await tys.recommendations.create({ handle, products: ["SKU-123", "SKU-456"] });
```

Each answer is `ready` (with `size` and `wearable_sizes`), `computing`, `none` or `unavailable`. The call never starts a simulation and never returns measurements.

- [Server-side recommendations](https://docs.tryyoursize.com/guides/server-side-recommendations.md): The full guide, with caching and errors.
- [Node.js reference](https://docs.tryyoursize.com/reference/node/recommendations-create.md): tys.recommendations.create()
- [Python reference](https://docs.tryyoursize.com/reference/python/recommendations-create.md): tys.recommendations.create()
