# Recommend Products Based on Product Name

<mark style="color:purple;">Python</mark>&#x20;

<pre class="language-python"><code class="lang-python">try:
      catalog_recommend_data = catalog.recommend(catalog_object)
<strong>      print("catalog_recommend_data----", catalog_recommend_data)
</strong>except Exception as e:
    print(f"Error fetching recommendations: {e}")
</code></pre>

<mark style="color:orange;">Example Product Name String</mark>

```json
"product_name" = "show me pink and blue saree with matching blouse under Rs 500"
```

### Example App Code

```python
catalog_object = {
    "cataloglake_id": "groclake_products_81skstvyw3",
    "product_name":"Headphone",
    "num_items":"1",
     "filters":{}

}

catalog_recommend_data = catalog.recommend(catalog_object)
print("catalog_recommend_data----", catalog_recommend_data)



#RESPONSE FROM CATALOG RECOMMEND

# {
#     "items": [
#         {
#             "product_name": "Foxin 306 Big Bass Wired Headphone Headphone Foxin  ",
#             "product_id": 2116465766.0,
#             "provider_id": "27086",
#             "provider_url": "",
#             "image_link1": "",
#             "image_link2": "",
#             "image_link3": "",
#             "product_url": "",
#             "brand": "",
#             "category_name": "Headphone",
#             "price": 1500.0,
#             "sale_price": 599.0,
#             "rating": "",
#             "weight": "0",
#             "score": 1.5418848
#         }
#     ]
# }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.groclake.ai/lakes/index-stores/cataloglake/recommend-products-based-on-product-name.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
