Travel/SimpleHotelSearch

Description

Gets up to 30 hotels by area class code, hotel number or coordinates.

Resource URL

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

Resource Information

Auth Type App Key
Affiliation Support Yes

Parameters

App ID (string)

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

Large class code (string)

Code specifying the country.

Please get this value from the GetAreaClass API.

Middle class code (string)

Code specifying the prefecture.

Please get this value from the GetAreaClass API.

Small class code (string)

Code specifying the city.

Please get this value from the GetAreaClass API.

Detail class code (string)

Code specifying stations or areas.

Please get this value from the GetAreaClass API.

Hotel Number (integer)

Hotel number.

This field allows you to specify up to 15 numbers (using commas as separator).

Example: hotelNo=12345,54321

Latitude (decimal)

Japan datum (Tokyo Datum), in seconds, milliseconds can be specified within two decimal places.

Example: 128,216.17

However, if you specify 1 to datumType is,

World Geodetic System, the unit be specified in degrees.

Example: 35.6065914

Longitude (decimal)

Japan datum (Tokyo Datum), in seconds, milliseconds can be specified within two decimal places.

Example: 503,259.29

However, if you specify 1 to datumType is,

World Geodetic System, the unit be specified in degrees.

Example: 139.7513225

Search Radius (integer)

Distance in km around latitude and longitude search.

Please set a value between 0.1 and 3.0.

Default Value: 1

Narrowing Conditions (string)

This field allows you to specify more than one, using commas as separator.

Example: a non smoking room in hot spring inn: squeezeCondition=kinen,onsen

Valid Values:

  • kinen non smoking rooms
  • internet Internet in the room
  • daiyoku public bath
  • onsen Onsen

Platform (integer)

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

Valid Values:

  • 0 PC / smartphone
  • 1 Mobile phones

Default Value: 0

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

Result page (integer)

Number of page.

Integer between 1 and 100.

* 1) If the allReturnFlag was specified by the latitude and longitude search,

Default Value: 1

How many results per page (integer)

Parameters that determines the number of results per page.

Integer from 1 to 30.

(* 1) If the allReturnFlag was specified by the latitude and longitude search,

page and the hits parameters will not be used.

Default Value: 30

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)

(* 1) About "recommended order":

- In case of a search by facility number,

standard: facilities numerical order

- In case of search by longitude and latitude,

standard: order closest to farest from the specified coordinates

Valid Values:

  • standard Recommended order (* 1)
  • +roomCharge Best Available Rate (Low to High)
  • -roomCharge Best Available Rate (high order)

Default Value: standard

All return flag (integer)

Flag for returning all results. (* 1) (* 2)

1: return all results

(* 1) only valid for latitude and longitude search.

(* 2) If the allReturnFlag has been specified, page hits and is disabled.

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

applicationId

App ID
string Required

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

largeClassCode

Large class code
string At least one is required

Code specifying the country.

Please get this value from the GetAreaClass API.

middleClassCode

Middle class code
string At least one is required

Code specifying the prefecture.

Please get this value from the GetAreaClass API.

smallClassCode

Small class code
string At least one is required

Code specifying the city.

Please get this value from the GetAreaClass API.

detailClassCode

Detail class code
string At least one is required

Code specifying stations or areas.

Please get this value from the GetAreaClass API.

hotelNo

Hotel Number
integer At least one is required

Hotel number.

This field allows you to specify up to 15 numbers (using commas as separator).

Example: hotelNo=12345,54321

latitude

Latitude
decimal At least one is required

Japan datum (Tokyo Datum), in seconds, milliseconds can be specified within two decimal places.

Example: 128,216.17

However, if you specify 1 to datumType is,

World Geodetic System, the unit be specified in degrees.

Example: 35.6065914

longitude

Longitude
decimal At least one is required

Japan datum (Tokyo Datum), in seconds, milliseconds can be specified within two decimal places.

Example: 503,259.29

However, if you specify 1 to datumType is,

World Geodetic System, the unit be specified in degrees.

Example: 139.7513225

searchRadius

Search Radius
integer Optional

Distance in km around latitude and longitude search.

Please set a value between 0.1 and 3.0.

Default Value: 1

squeezeCondition

Narrowing Conditions
string Optional

This field allows you to specify more than one, using commas as separator.

Example: a non smoking room in hot spring inn: squeezeCondition=kinen,onsen

Valid Values:

  • kinen non smoking rooms
  • internet Internet in the room
  • daiyoku public bath
  • onsen Onsen

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

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

page

Result page
integer Optional

Number of page.

Integer between 1 and 100.

* 1) If the allReturnFlag was specified by the latitude and longitude search,

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.

(* 1) If the allReturnFlag was specified by the latitude and longitude search,

page and the hits parameters will not be used.

Default Value: 30

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

(* 1) About "recommended order":

- In case of a search by facility number,

standard: facilities numerical order

- In case of search by longitude and latitude,

standard: order closest to farest from the specified coordinates

Valid Values:

  • standard Recommended order (* 1)
  • +roomCharge Best Available Rate (Low to High)
  • -roomCharge Best Available Rate (high order)

Default Value: standard

allReturnFlag

All return flag
integer Optional

Flag for returning all results. (* 1) (* 2)

1: return all results

(* 1) only valid for latitude and longitude search.

(* 2) If the allReturnFlag has been specified, page hits and is disabled.

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

Response Example

Request

https://app.rakuten.co.jp/services/api/Travel/SimpleHotelSearch/20131024?applicationId=REPLACE_WITH_YOUR_APP_ID&latitude=125994.28&longitude=488781.51&hits=3

Response
{
  "pagingInfo": {
    "recordCount": 154,
    "pageCount": 52,
    "page": 1,
    "first": 1,
    "last": 3
  },
  "hotels": [
    {
      "hotel": [
        {
          "hotelBasicInfo": {
            "hotelNo": 136197,
            "hotelName": "葵 KYOTO STAY",
            "hotelInformationUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/dQ4dX/?f_no=136197",
            "planListUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/cHNRi/?f_no=136197&f_flg=PLAN",
            "dpPlanListUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/TDZXm/?noTomariHotel=136197",
            "reviewUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/RmfmX/?f_hotel_no=136197",
            "hotelKanaName": "あおい きょうと すてい",
            "hotelSpecial": "川面のきらめく光。選び抜かれた骨董が古き良き時代へ誘います。ライブラリーで読書、川床テラスでお茶を。",
            "hotelMinCharge": 14800,
            "latitude": 125994.28,
            "longitude": 488781.51,
            "postalCode": "600-8013",
            "address1": "京都府",
            "address2": "京都市下京区木屋町通仏光寺上る天王町145-1 (オフィス)※町家は別の場所になります。",
            "telephoneNo": "075-354-7770",
            "faxNo": "075-354-7772",
            "access": "京阪「清水五条駅」徒歩5分/阪急「河原町駅」、京阪「祇園四条駅」徒歩10分/JR「京都駅」タクシーで10分",
            "parkingInformation": "無し:お近くのコインパーキングをご案内致します。",
            "nearestStation": null,
            "hotelImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/136197/136197.jpg",
            "hotelThumbnailUrl": "http://img.travel.rakuten.co.jp/HIMG/90/136197.jpg",
            "roomImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/136197/136197_1f.jpg",
            "roomThumbnailUrl": "http://img.travel.rakuten.co.jp/HIMG/INTERIOR/136197.jpg",
            "hotelMapImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/136197/136197map.gif",
            "reviewCount": null,
            "reviewAverage": null,
            "userReview": null
          }
        },
        {
          "hotelRatingInfo": {
            "serviceAverage": null,
            "locationAverage": null,
            "roomAverage": null,
            "equipmentAverage": null,
            "bathAverage": null,
            "mealAverage": null
          }
        }
      ]
    },
    {
      "hotel": [
        {
          "hotelBasicInfo": {
            "hotelNo": 147867,
            "hotelName": "葵 HOTEL KYOTO",
            "hotelInformationUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/dQ4dX/?f_no=147867",
            "planListUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/cHNRi/?f_no=147867&f_flg=PLAN",
            "dpPlanListUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/TDZXm/?noTomariHotel=147867",
            "reviewUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/RmfmX/?f_hotel_no=147867",
            "hotelKanaName": "あおい ほてる きょうと",
            "hotelSpecial": "京都の伝統と革新。そして旅の喜びと癒し。ユニークでここにしかないラグジュアリーホテルが鴨川沿いに誕生",
            "hotelMinCharge": 14000,
            "latitude": 125994.03,
            "longitude": 488781.43,
            "postalCode": "600-8013",
            "address1": "京都府",
            "address2": "京都市下京区木屋町通仏光寺上る天王町146",
            "telephoneNo": "075-354-7770",
            "faxNo": "075-354-7772",
            "access": "阪急 河原町駅より徒歩",
            "parkingInformation": "無し",
            "nearestStation": "河原町(京都)",
            "hotelImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/147867/147867.jpg",
            "hotelThumbnailUrl": "http://img.travel.rakuten.co.jp/HIMG/90/147867.jpg",
            "roomImageUrl": null,
            "roomThumbnailUrl": null,
            "hotelMapImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/147867/147867map.gif",
            "reviewCount": null,
            "reviewAverage": null,
            "userReview": null
          }
        },
        {
          "hotelRatingInfo": {
            "serviceAverage": null,
            "locationAverage": null,
            "roomAverage": null,
            "equipmentAverage": null,
            "bathAverage": null,
            "mealAverage": null
          }
        }
      ]
    },
    {
      "hotel": [
        {
          "hotelBasicInfo": {
            "hotelNo": 136898,
            "hotelName": "京乃宿 はなしおり",
            "hotelInformationUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/dQ4dX/?f_no=136898",
            "planListUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/cHNRi/?f_no=136898&f_flg=PLAN",
            "dpPlanListUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/TDZXm/?noTomariHotel=136898",
            "reviewUrl": "http://img.travel.rakuten.co.jp/image/tr/api/hs/RmfmX/?f_hotel_no=136898",
            "hotelKanaName": "きょうのやど はなしおり",
            "hotelSpecial": "【2012年3月オープン】一日一組様貸しきり高瀬川沿いのお宿。お宿までお届けの朝食付でごゆっくり♪",
            "hotelMinCharge": 9000,
            "latitude": 125993.63,
            "longitude": 488780.05,
            "postalCode": "600-8018",
            "address1": "京都府",
            "address2": "京都市下京区西木屋町仏光寺上がる市之町260-19",
            "telephoneNo": "090-5063-1500",
            "faxNo": "075-592-3596",
            "access": "阪急 河原町駅 京都マルイ出口2番 又は 木屋町南出入口1番より徒歩にて3分/京阪 祇園四条駅 出口3番より徒歩にて5分",
            "parkingInformation": "契約駐車場 1台あり (一日料金2000円、前日までに要予約)",
            "nearestStation": "河原町(京都)",
            "hotelImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/136898/136898.jpg",
            "hotelThumbnailUrl": "http://img.travel.rakuten.co.jp/HIMG/90/136898.jpg",
            "roomImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/136898/136898_wa.jpg",
            "roomThumbnailUrl": "http://img.travel.rakuten.co.jp/HIMG/INTERIOR/136898.jpg",
            "hotelMapImageUrl": "http://img.travel.rakuten.co.jp/share/HOTEL/136898/136898map.gif",
            "reviewCount": 33,
            "reviewAverage": 4.91,
            "userReview": null
          }
        },
        {
          "hotelRatingInfo": {
            "serviceAverage": 0,
            "locationAverage": 0,
            "roomAverage": 0,
            "equipmentAverage": 0,
            "bathAverage": 0,
            "mealAverage": 0
          }
        }
      ]
    }
  ]
}

Try It

Set the Parameters

  Show More Parameters

Request

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

Response