IchibaGenre/Search

Description

Gets a genre's attributes, tag groups, children genres, brother genres and ancestor genres by genre id.

Resource URL

https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20120723

Resource Information

Auth Type App Key
Affiliation Support No

Parameters

Genre ID (integer)

Use genreId=0 to search from the genre root

App ID (string)

The Application ID that identifies your application. You can get it from https://webservice.rakuten.co.jp/.

Genre path (integer)

0: Exclude ancester genres

1: Display ancester genres

Ancestor genres are a set of genres in the upper levels (parent, grandparent, etc.)

Default Value: 1

Response format (string)

Format for the response output.

You can set this parameter to json or xml. JSON is usually the best option.

If you choose JSON, you can also set the callback parameter in order to use JSONP.

Valid Values:

  • json
  • xml

Default Value: json

Callback function name (string)

Function name to be used with the JSONP output

Please make sure you enter a UTF-8 URL encoded string, containing only a combination of alphanumeric characters, periods and underscores.

Choosing output fields (string)

By default API will return all the fields. You can specify what fields should be returned by using this parameter.

If you want to specify more than one parameter, please use comma (,) as separator.

For example, following request will only return itemName, itemPrice and itemUrl.

elements=itemName,itemPrice,itemUrl

Format version (integer)

Response format version.

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

In case of formatVersion=1:

The API response will return an array using the following format.

For example, 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:

The API response will return an array using the following format.

For example, you would use the notation items[0].itemName to access the itemName parameter.

{"items": [

{

"itemName": "a",

"itemPrice": 10

},

{

"itemName": "b",

"itemPrice": 20

}

]}

Valid Values:

  • 1
  • 2

Default Value: 1

genreId

Genre ID
integer Required

Use genreId=0 to search from the genre root

applicationId

App ID
string Required

The Application ID that identifies your application. You can get it from https://webservice.rakuten.co.jp/.

genrePath

Genre path
integer Optional

0: Exclude ancester genres

1: Display ancester genres

Ancestor genres are a set of genres in the upper levels (parent, grandparent, etc.)

Default Value: 1

format

Response format
string Optional

Format for the response output.

You can set this parameter to json or xml. JSON is usually the best option.

If you choose JSON, you can also set the callback parameter in order to use JSONP.

Valid Values:

  • json
  • xml

Default Value: json

callback

Callback function name
string Optional

Function name to be used with the JSONP output

Please make sure you enter a UTF-8 URL encoded string, containing only a combination of alphanumeric characters, periods and underscores.

elements

Choosing output fields
string Optional

By default API will return all the fields. You can specify what fields should be returned by using this parameter.

If you want to specify more than one parameter, please use comma (,) as separator.

For example, following request will only return itemName, itemPrice and itemUrl.

elements=itemName,itemPrice,itemUrl

formatVersion

Format version
integer Optional

Response format version.

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

In case of formatVersion=1:

The API response will return an array using the following format.

For example, 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:

The API response will return an array using the following format.

For example, you would use the notation items[0].itemName to access the itemName parameter.

{"items": [

{

"itemName": "a",

"itemPrice": 10

},

{

"itemName": "b",

"itemPrice": 20

}

]}

Valid Values:

  • 1
  • 2

Default Value: 1

Response Example

Request

https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20120723?applicationId=REPLACE_WITH_YOUR_APP_ID&genreId=101164

Response
{
  "parents": [],
  "current": {
    "genreId": 101164,
    "genreName": "おもちゃ・ホビー・ゲーム",
    "genreLevel": 1
  },
  "children": [
    {
      "child": {
        "genreId": 101189,
        "genreName": "おもちゃ",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 112203,
        "genreName": "フィギュア",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 101165,
        "genreName": "趣味・コレクション",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 101205,
        "genreName": "テレビゲーム",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 213731,
        "genreName": "パーティー・イベント用品・販促品",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 112132,
        "genreName": "占い・開運・風水・パワーストーン",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 101222,
        "genreName": "アート・美術品・骨董品・民芸品",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 206324,
        "genreName": "囲碁・将棋・麻雀・チェス",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "genreId": 112928,
        "genreName": "その他",
        "genreLevel": 2
      }
    }
  ]
}

Try It

Set the Parameters

  Show More Parameters

Request

https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20120723?applicationId=REPLACE_WITH_YOUR_APP_ID

Response