---
title: "基本的なrecommendationsを得る"
slug: "getting-basic-recommendations"
abstract: "Searchと推薦書APIを使って簡単なrecommendationsのリクエストを作成しSitecore Search。"
---
# 基本的なrecommendationsを得る

recommendationsの最も基本的なリクエストは、空のrecommendations.contentオブジェクトをSitecore Search送ることです。これは管理者がSearchで設定した内容、recommendationウィジェットのレシピに基づいてrecommendationsされます。

完全なデータモデルについては、[Search and Recommendation APIリファレン](https://doc.sitecore.com/search/en/developers/search-and-recommentation-api/index.html)スを参照してください。

以下は*、コンテンツ*エンティティに対して*5*つのrecommendationsを得るためのサンプルリクエストです:

{
 "context": {
 "locale": "en-us",
 "page": {
 "uri": "/content/Using-fresh-flowers-to -decorate"
 }
 },
 "source": "12345",
 "widget": {
 "items": 
 {
 "entity": "content",
 "rfk\_id": "rfkid\_1",
 "recommendations": {
 "content": {},
 "limit": 5
 }
 }
 
 }
}

以下はサンプルの回答です:

{
 "widgets": 
 {
 "rfk\_id": "rfkid\_2000",
 "type": "recommendation",
 "used\_in": "page",
 "entity": "content",
 "content": 
 {
 "title": "Decorating Your Home with Fragrances",
 "description": "Discover ways to make your home smell wonderful with our guide to using room sprays, diffusers, and scented candles.",
 "image\_url": "//assets.example.com/content/decorating\_your\_home\_with\_fragrances.jpg",
 "content\_url": "/content/decorating-your-home-with-fragrances",
 "author": "Jane Doe",
 "publication\_date": "2024-04-01",
 "category": "Home Decor"
 },
 {
 "title": "The Benefits of Aromatherapy",
 "description": "Learn about the benefits of aromatherapy and how different scents can improve your health and mood.",
 "image\_url": "//assets.example.com/content/benefits\_of\_aromatherapy.jpg",
 "content\_url": "/content/benefits-of-aromatherapy",
 "author": "John Smith",
 "publication\_date": "2024-03-15",
 "category": "Wellness"
 }
 ...
 ,
 "total\_item": 5,
 "limit": 5,
 "offset": 0
 }
 ,
 "dt": 133,
 "ts": 1714507825540
}