> ## Documentation Index
> Fetch the complete documentation index at: https://www.algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recommended for you

> Surface items personalized to your users.

export const AlgoliaRecommend = () => <svg xmlns="http://www.w3.org/2000/svg" className="inline" viewBox="0 0 80 80" width="20" height="20" fill="none" role="presentation" ariaLabel="Algolia Recommend">
    <path d="m50 65-4 12H34l-4-12h20Z" fill="#36395A"></path>
    <path d="M68 32c0 15.464-12.536 28-28 28S12 47.464 12 32 24.536 4 40 4s28 12.536 28 28Z" fill="#FF2A6A"></path>
    <path d="M43 34V17L26 34h17Z" fill="#fff"></path>
    <path d="M37 30v17l17-17H37Z" fill="#fff"></path>
  </svg>;

export const SearchRequest = () => <Tooltip tip="A search request is a single HTTP call to the Algolia Search API that can run one or more search operations. It can include multiple queries, for example, when querying several indices at once.">
    search request
  </Tooltip>;

export const Application = () => <Tooltip tip="An Algolia application is a self-contained environment with its own indices, configuration, and API keys. Applications don't share data or settings with each other.">
    application
  </Tooltip>;

Recommended for you surfaces items that best align with users' interests based on their [affinities](/doc/guides/personalization/classic-personalization/what-is-personalization/in-depth/how-personalization-works#translate-user-behavior-into-affinities-through-events). It can be added to various pages, such as the homepage or category pages, to provide a personalized shopping experience.

<Callout icon="flask-conical" color="#14b8a6">
  This is a **beta feature** according to [Algolia's Terms of Service ("Beta Services")](https://www.algolia.com/policies/terms/).
</Callout>

Recommended for you is compatible with both Classic and Advanced Personalization.

## Before you begin

<Callout icon="credit-card" color="#c084fc">
  This feature isn't available on every plan.
  Refer to your [pricing plan](https://www.algolia.com/pricing) to see if it's included.
</Callout>

Set up [Classic](/doc/guides/personalization/classic-personalization/what-is-personalization) or [Advanced](/doc/guides/personalization/advanced-personalization/what-is-advanced-personalization) Personalization.

## How recommended for you works

Recommended for you ranks items by each user's affinities, which are derived from their interactions and preferences.
To learn how affinities shape Recommend results, see [How personalized recommendations work](/doc/guides/algolia-recommend/how-to/personalized-recommendations#how-personalized-recommendations-work).

## Enable recommended for you

1. Go to the [Algolia dashboard](https://dashboard.algolia.com/explorer/browse) and select your Algolia <Application />.
2. On the left sidebar, select <AlgoliaRecommend /> **Recommend**.
3. Select **Recommended for you** and click **Activate**.

   <img src="https://mintcdn.com/algolia/QUuhkPGiow1bP-ae/images/guides/recommend/recommended-for-you-model-card.png?fit=max&auto=format&n=QUuhkPGiow1bP-ae&q=85&s=cd6f75a370ceb6e3ef4934efcb2f7bc4" alt="Screenshot of a &#x22;Recommended for you&#x22; section with an &#x22;Activate&#x22; button and a note that the Personalization feature needs to be trained." width="298" height="427" data-path="images/guides/recommend/recommended-for-you-model-card.png" />

## Add Recommended for you to your app

You can add Recommended for you to your app using the [Recommend API client](/doc/libraries/sdk/methods/recommend/get-recommendations).

In the <SearchRequest />,
`queryParameters` can include any valid [search parameters](/doc/api-reference/api-parameters) such as [`facetFilters`](/doc/api-reference/api-parameters/facetFilters) or [`hitsPerPage`](/doc/api-reference/api-parameters/hitsPerPage).
A [`userToken`](/doc/api-reference/api-parameters/userToken) is required.
Send the same token you send with your click and conversion events.

<CodeGroup>
  ```js JavaScript theme={"system"}
  const response = await client.getRecommendations({
    requests: [
      {
        model: "recommended-for-you",
        indexName: "INDEX_NAME",
        threshold: 0,
        queryParameters: {
          userToken: "user-1234",
        },
      },
    ],
  });
  ```

  ```python Python theme={"system"}
  response = client.get_recommendations(
      get_recommendations_params={
          "requests": [
              {
                  "model": "recommended-for-you",
                  "indexName": "INDEX_NAME",
                  "threshold": 0,
                  "queryParameters": {
                      "userToken": "user-1234",
                  },
              },
          ],
      },
  )
  ```

  ```php PHP theme={"system"}
  $response = $client->getRecommendations(
      ['requests' => [
          ['model' => 'recommended-for-you',
              'indexName' => 'INDEX_NAME',
              'threshold' => 0,
              'queryParameters' => [
                  'userToken' => 'user-1234',
              ],
          ],
      ],
      ],
  );
  ```
</CodeGroup>

<Note>
  InstantSearch doesn't support the Recommended for you model. Use the API client instead.
</Note>
