Home     API一覧     楽天タグ検索API

楽天市場タグ検索APIは楽天市場のタグ名・タグ構造を返すAPIです。デベロッパーはタグIDを指定することでこれらの情報を得ることができます。 タグIDは、楽天市場商品検索API、楽天市場ジャンル検索APIから取得することができます。
タグに関する詳細な説明は、Q&Aや楽天ウェブサービスのブログにて記載します。

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


https://app.rakuten.co.jp/services/api/IchibaTag/Search/20140222?[parameter]=[value]…

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

たとえば、タグID「1000317」の詳細情報を取得したい場合のリクエストURLは下記になります。(実際には改行せずに1行につなげてリクエストしてください。)

https://app.rakuten.co.jp/services/api/IchibaTag/Search/20140222?
        applicationId=[アプリID]
        &tagId=1000317

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

入力パラメーター


楽天タグ検索API 入力パラメータ version:2014-02-22

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 tagId int 必須
- タグIDは、楽天市場商品検索API、楽天市場ジャンル検索APIから取得することができます。
0を指定することはできません。
10タグIDまでカンマ(,)区切りで指定可能

出力パラメーター


楽天タグ検索API 出力パラメーター version:2014-02-22

区分:サービス固有パラメーター
1 タグ情報【NEW】 タググループ情報 - tagGroup  
2 タググループ名 tagGroupName  
3 タググループID tagGroupId  
4 タグ情報 - tags "<tags>~</tags>の中に複数の<tag>~</tag>"
5 タグID tagId  
6 タグ名 tagName  
7 親タグID parentTagId  

Error

Error messages are displayed in the form of HTTP status code and its response body

HTTP Status Code Description Response body example (JSON)
400 Parameter error (or required parameters were insufficient)

If applicationId is not set

{
    "error": "wrong_parameter",
    "error_description": "specify valid applicationId"
}

If keyword is not valid (only 1 character given, etc.)

{
    "error": "wrong_parameter",
    "error_description": "keyword parameter is not valid"
}
404 If data not found.
{
    "error": "not_found",
    "error_description": "not found"
}
429 Too many requests

This error will be displayed if the number of API requests has been exceeded.
Please try access again after an amount of time.

{
    "error": "too_many_requests",
    "error_description": "number of allowed requests has been exceeded for this API. please try again soon."
}
500 Internal error in Rakuten Web Service

An internal system error occured. If you continue seeing this message for a long period, please give your inquiry via this link

{
    "error": "system_error",
    "error_description": "api logic error"
}
503 Unavailable due to maintenance or overloaded

Maintenance (the API name will be displayed in XXX/XXX)

{
    "error": "service_unavailable",
    "error_description": "XXX/XXX is under maintenance"
}

Response body format is display in format.

format Error output example
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>