BooksGenre/Search

Description

Gets a media genre's attributes, children genres and ancestor genres by genre id.

Resource URL

https://app.rakuten.co.jp/services/api/BooksGenre/Search/20121128

Resource Information

Auth Type App Key
Affiliation Support No

Parameters

Book genre ID (string)

Genre ID to get information from.

Root booksGenreId is 000.

App ID (string)

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

Genre path (integer)

Whether to include ancestor genres or not in the response.

0: do not include ancestors

1: include ancestors

Default Value: 0

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

booksGenreId

Book genre ID
string Required

Genre ID to get information from.

Root booksGenreId is 000.

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

Whether to include ancestor genres or not in the response.

0: do not include ancestors

1: include ancestors

Default Value: 0

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/BooksGenre/Search/20121128?applicationId=REPLACE_WITH_YOUR_APP_ID&booksGenreId=001

Response
{
  "current": {
    "booksGenreId": "001",
    "booksGenreName": "本",
    "genreLevel": 1
  },
  "children": [
    {
      "child": {
        "booksGenreId": "001001",
        "booksGenreName": "漫画(コミック)",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001002",
        "booksGenreName": "語学・学習参考書",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001003",
        "booksGenreName": "絵本・児童書・図鑑",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001004",
        "booksGenreName": "小説・エッセイ",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001005",
        "booksGenreName": "パソコン・システム開発",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001006",
        "booksGenreName": "ビジネス・経済・就職",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001007",
        "booksGenreName": "旅行・留学・アウトドア",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001008",
        "booksGenreName": "人文・思想・社会",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001009",
        "booksGenreName": "ホビー・スポーツ・美術",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001010",
        "booksGenreName": "美容・暮らし・健康・料理",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001011",
        "booksGenreName": "エンタメ・ゲーム",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001012",
        "booksGenreName": "科学・医学・技術",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001013",
        "booksGenreName": "写真集・タレント",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001016",
        "booksGenreName": "資格・検定",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001017",
        "booksGenreName": "ライトノベル",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001018",
        "booksGenreName": "楽譜",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001019",
        "booksGenreName": "文庫",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001020",
        "booksGenreName": "新書",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001021",
        "booksGenreName": "ボーイズラブ(BL)",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001022",
        "booksGenreName": "付録付き",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001023",
        "booksGenreName": "バーゲン本",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001025",
        "booksGenreName": "コミックセット",
        "genreLevel": 2
      }
    },
    {
      "child": {
        "booksGenreId": "001026",
        "booksGenreName": "カレンダー・手帳・家計簿",
        "genreLevel": 2
      }
    }
  ],
  "parents": []
}

Try It

Set the Parameters

  Show More Parameters

Request

https://app.rakuten.co.jp/services/api/BooksGenre/Search/20121128?applicationId=REPLACE_WITH_YOUR_APP_ID

Response