Travel/KeywordHotelSearch

Description

Gets up to 30 hotels by keyword.

Resource URL

https://app.rakuten.co.jp/services/api/Travel/KeywordHotelSearch/20131024

Resource Information

Auth Type App Key
Affiliation Support Yes

Parameters

Search Keyword (string)

When you specify more than one keyword separated by an space character it is considered an AND search.

Your search must contain at least 2 characters.

App ID (string)

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

Platform (integer)

Whether to return information for PC/smartphone or mobile phone.

Valid Values:

  • 0 PC / smartphone
  • 1 Mobile phones

Default Value: 0

Result page (integer)

Number of page.

Integer between 1 and 100.

Default Value: 1

How many results per page (integer)

Parameters that determines the number of results per page.

Integer from 1 to 30.

Default Value: 30

Latitude and longitude type (integer)

It specifies the latitude and longitude type of input and output parameters.

Valid Values:

  • 1 World Geodetic System.
  • 2 Japan geodetic system.

Default Value: 2

Middle class code (string)

Code specifying the prefecture.

Please get this value from the GetAreaClass API.

Search scope (integer)

Specify the target scope of the keyword search.

Valid Values:

  • 0 hotel name, the plan name or the room names
  • 1 Hotel Name Only

Default Value: 0

Hotel chain code (string)

Code for specifying the hotel chain.

If this field is specified, only hotels belonging to the specified hotel chain will be searched.

Please get the hotel chain list from the GetHotelChainList API.

This field allows you to specify up to 5 hotel chains separated by commas.

Example: hotelChainCode=JL,NK

Hotel Thumbnail Size (integer)

Specify the image size of the hotel image thumbnail URL of the output parameters.

Valid Values:

  • 1 Small
  • 2 Medium
  • 3 Large

Default Value: 2

Response Type (string)

Specify the amount of information returned in the response:

Valid Values:

  • small minimum amount of information
  • middle standard amount of information
  • large all the information

Default Value: middle

Sort (string)

Valid Values:

  • standard keyword predictive value in descending order
  • +roomCharge Best Available Rate (Low to High)
  • -roomCharge Best Available Rate (high order)

Default Value: standard

Affiliate ID (string)

If this endpoint supports affiliation, here you can enter your affiliate ID. If you do, the links in the API response will include your affiliate ID.

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

keyword

Search Keyword
string Required

When you specify more than one keyword separated by an space character it is considered an AND search.

Your search must contain at least 2 characters.

applicationId

App ID
string Required

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

carrier

Platform
integer Optional

Whether to return information for PC/smartphone or mobile phone.

Valid Values:

  • 0 PC / smartphone
  • 1 Mobile phones

Default Value: 0

page

Result page
integer Optional

Number of page.

Integer between 1 and 100.

Default Value: 1

hits

How many results per page
integer Optional

Parameters that determines the number of results per page.

Integer from 1 to 30.

Default Value: 30

datumType

Latitude and longitude type
integer Optional

It specifies the latitude and longitude type of input and output parameters.

Valid Values:

  • 1 World Geodetic System.
  • 2 Japan geodetic system.

Default Value: 2

middleClassCode

Middle class code
string Optional

Code specifying the prefecture.

Please get this value from the GetAreaClass API.

searchField

Search scope
integer Optional

Specify the target scope of the keyword search.

Valid Values:

  • 0 hotel name, the plan name or the room names
  • 1 Hotel Name Only

Default Value: 0

hotelChainCode

Hotel chain code
string Optional

Code for specifying the hotel chain.

If this field is specified, only hotels belonging to the specified hotel chain will be searched.

Please get the hotel chain list from the GetHotelChainList API.

This field allows you to specify up to 5 hotel chains separated by commas.

Example: hotelChainCode=JL,NK

hotelThumbnailSize

Hotel Thumbnail Size
integer Optional

Specify the image size of the hotel image thumbnail URL of the output parameters.

Valid Values:

  • 1 Small
  • 2 Medium
  • 3 Large

Default Value: 2

responseType

Response Type
string Optional

Specify the amount of information returned in the response:

Valid Values:

  • small minimum amount of information
  • middle standard amount of information
  • large all the information

Default Value: middle

sort

Sort
string Optional

Valid Values:

  • standard keyword predictive value in descending order
  • +roomCharge Best Available Rate (Low to High)
  • -roomCharge Best Available Rate (high order)

Default Value: standard

affiliateId

Affiliate ID
string Optional

If this endpoint supports affiliation, here you can enter your affiliate ID. If you do, the links in the API response will include your affiliate ID.

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

Try It

Set the Parameters

  Show More Parameters

Request

https://app.rakuten.co.jp/services/api/Travel/KeywordHotelSearch/20131024?applicationId=REPLACE_WITH_YOUR_APP_ID

Response