Home      ;API一覧     ;楽天レシピカテゴリ別ランキングAPI

楽天レシピカテゴリ別ランキングAPIは楽天レシピのカテゴリ別ランキングを返すAPIです。デベロッパーはカテゴリIDを指定することでこれらの情報を得ることができます。

リクエストURL(REST/JSON形式の場合)


https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/20170426?[parameter]=[value]…

※JSONP形式は、JSON形式で入力パラメーターにcallbackを指定することで出力されます。

たとえば、レシピカテゴリ別ランキングを取得したい場合のリクエストURLは下記になります。(実際には改行せずに1行につなげてリクエストしてください。)

https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/20170426?
        applicationId=[アプリID]&
        categoryId=10

※短い時間の間に大量に、同一のリクエストURLへアクセスすると、一定時間利用できなくなる場合がございます。テストの際にはご注意ください。

入力パラメーター


楽天レシピカテゴリ別ランキングAPI 入力パラメータ version:2017-04-26

ID 項目名 パラメーター 型(括弧内は最大バイト数) 必須 デフォルト 備考
Division: Shared parameters
1 App ID applicationId String 必須 - Check here
2 Affiliate ID affiliateId String - - Check here
3 Response format format String - json Either JSON or XML
When JSON is specified the callback parameter can also be set in order to use JSONP.
4 Callback function name callback String - - Function name to be used with the JSONP output
(UTF-8 URL encoded string)
Alphanumeric characters, periods, or underscores
5 Choosing output fields elements String - - By default, API response all of the fields. You can change response fields by this parameter.
This parameter's data is separated by comma(,).
For example, following request will response only itemName, itemPrice and itemUrl.
elements=itemName,itemPrice,itemUrl
6 Format version formatVersion int - 1

Response format version.

If formatVersion=2 is set, the response format (JSON) will be improved.

In case of formatVersion=1 :
Our API response will be returned in Array format as the followings.
You would need to use notation items[0].item.itemName To access itemName parameter.

{"items": [
    {"item": {
        "itemName": "a",
        "itemPrice": 10
    }},
    {"item": {
        "itemName": "b",
        "itemPrice": 20
    }}
]}

In case of formatVersion=2 :
Our API response will be returned in Array format as the followings.
You can use notation items[0].itemName To access itemName parameter.

{"items": [
    {
        "itemName": "a",
        "itemPrice": 10
    },
    {
        "itemName": "b",
        "itemPrice": 20
    }
]}
区分:サービス固有パラメーター
1 カテゴリID categoryId String - - 省略時の場合は総合ランキング
指定する場合は
例:
categoryId=10 (大カテゴリ)
categoryId=10-276 (中カテゴリ)
categoryId=10-276-824 (小カテゴリ)
※中、小カテゴリのみ、ハイフンでつないでください。

出力パラメーター


楽天レシピカテゴリ別ランキングAPI 出力パラメーター version:2017-04-26

ID 大分類 項目名 パラメーター 備考
区分:サービス固有パラメーター
1 全体情報
(全体:<result> ~ </result>)
レシピID recipeId
2 レシピタイトル recipeTitle
3 レシピURL recipeUrl httpsではじまるレシピURLとなります
4 画像のURL(サイズ:一般) foodImageUrl httpsではじまる画像のURLとなります
5 画像のURL(サイズ:中) mediumImageUrl httpsではじまる商品画像(100x100ピクセル)のURL
6 画像のURL(サイズ:小) smallImageUrl httpsではじまる商品画像(70x70ピクセル)のURL
7 ピックアップレシピ
(編集部おすすめレシピ)
pickup 0:通常レシピ
1:編集部おすすめレシピ
8 ユーザー区分 shop 0:一般
2:楽天市場店舗
9 レシピ投稿者 nickname
10 レシピを考えた人のコメント recipeDescription
11 材料名の一覧 recipeMaterial
12 調理時間目安 recipeIndication 以下のいずれかが返却される
5分以内
約10分
約15分
約30分
約1時間
1時間以上
指定なし
13 費用の目安 recipeCost 以下のいずれかが返却される
100円以下
300円前後
500円前後
1,000円前後
2,000円前後
3,000円前後
5,000円前後
10,000円以上
指定なし
14 レシピ公開日 recipePublishday
15 ランキング順位 rank 最大4位まで取得します

エラー


エラーはHTTPステータスコードで判別してください。

HTTPステータスコード 内容
400 パラメーターエラー
401 不正なトークンによるエラー
403 許可スコープが十分でない場合
503 APIメンテンス
500 APIトラブル
format エラー時出力パラメーター例
json {
"error": "wrong_parameter",
"error_description": "page must be a number"
}
xml <?xml version="1.0" encoding="UTF-8"?>
<root>
<error>wrong_parameter</error>
<error_description>page must be a number</error_description>
</root>