/location-hotels

Call the API with the unique ID for a destination.  The response will provide a maximum list of top 10 hotels along with data for each hotel in the list. Alternatively, call the API with a comma-separated list of hotel location ids, get data for the hotels in your list.

Request

http://api.tripadvisor.com/api/partner/2.0/location/60745/hotels?key=PARTNER_KEY

Options

Name Description
lang The desired language locale. 
currency currency code to use for request and response (should follow ISO 4217).
subcategory Filters results list of hotels based on subcategory. Valid subcategories are: hotel, bb, specialty.

Response

  {
  "data": [
    {
      "see_all_photos": "http://www.tripadvisor.com/LocationPhotos-g60745-d258705-mMCID-Hotel_Commonwealth-Boston_Massachusetts.html",
      "web_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d258705-Reviews-mMCID-Hotel_Commonwealth-Boston_Massachusetts.html",
      "percent_recommended": null,
      "location_string": "Boston, Massachusetts",
      "location_id": "258705",
      "write_review": "http://www.tripadvisor.com/UserReview-g60745-d258705-mMCID-Hotel_Commonwealth-Boston_Massachusetts.html",
      "price_level": "$$$$",
      "api_detail_url": "http://api.tripadvisor.com/api/partner/2.0/location/258705?key=PARTNER_KEY",
      "address_obj": {
        "street1": "500 Commonwealth Avenue",
        "street2": null,
        "city": "Boston",
        "state": "Massachusetts",
        "country": "United States",
        "postalcode": "02215",
        "address_string": "500 Commonwealth Avenue, Boston, MA 02215"
      },
      "category": {
        "name": "hotel",
        "localized_name": "Hotel"
      },
      "awards": [
        {
          "award_type": "Traveler's Choice",
          "year": "2014",
          "images": {
            "small": "http://www.tripadvisor.com/img/cdsi/img2/awards/tchotel_2014_L_R-MCID-5.svg",
            "large": "http://www.tripadvisor.com/img2/awards/TC_2014_downloadable_L_R.jpg"
          },
          "categories": [
            "Top Hotels"
          ],
          "display_name": "Traveler's Choice"
        },
        {
          "award_type": "Certificate of Excellence",
          "year": "2014",
          "images": {
            "small": "http://www.tripadvisor.com/img/cdsi/img2/awards/CERTIFICATE_OF_EXCELLENCE_small-MCID-5.jpg",
            "large": "http://www.tripadvisor.com/img/cdsi/img2/awards/CERTIFICATE_OF_EXCELLENCE_2014_en_US_large-MCID-5.jpg"
          },
          "categories": [],
          "display_name": "Certificate of Excellence 2014"
        }
      ],
      "num_reviews": "2583",
      "subcategory": [
        {
          "name": "hotel",
          "localized_name": "Hotel"
        }
      ],
      "rating_image_url": "http://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/5.0-MCID-5.svg",
      "name": "Hotel Commonwealth",
      "ancestors": [
        {
          "abbrv": null,
          "level": "City",
          "name": "Boston",
          "location_id": "60745"
        },
        {
          "abbrv": "MA",
          "level": "State",
          "name": "Massachusetts",
          "location_id": "28942"
        },
        {
          "abbrv": null,
          "level": "Country",
          "name": "United States",
          "location_id": "191"
        }
      ],
      "longitude": "-71.0952",
      "latitude": "42.34879",
      "rating": "5.0",
      } 
}
}
},
"hotel_booking":{
"bookable": true,
"booking_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d258705-Reviews-mMCID-Hotel_Commonwealth-Boston_Massachusetts.html"
},
"ranking_data": { "geo_location_id": "60745", "ranking_string": "#1 of 77 hotels in Boston", "geo_location_name": "Boston", "ranking_out_of": "77", "ranking": "1" } }, { "see_all_photos": "http://www.tripadvisor.com/LocationPhotos-g60745-d89575-mMCID-Boston_Harbor_Hotel-Boston_Massachusetts.html", "web_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d89575-Reviews-mMCID-Boston_Harbor_Hotel-Boston_Massachusetts.html", "percent_recommended": null, "location_string": "Boston, Massachusetts", "location_id": "89575", "write_review": "http://www.tripadvisor.com/UserReview-g60745-d89575-mMCID-Boston_Harbor_Hotel-Boston_Massachusetts.html", "price_level": "$$$$", "api_detail_url": "http://api.tripadvisor.com/api/partner/2.0/location/89575?key=PARTNER_KEY", "address_obj": { "street1": "70 Rowes Wharf", "street2": "", "city": "Boston", "state": "Massachusetts", "country": "United States", "postalcode": "02110", "address_string": "70 Rowes Wharf, Boston, MA 02110" }, "category": { "name": "hotel", "localized_name": "Hotel" }, "awards": [ { "award_type": "Certificate of Excellence", "year": "2014", "images": { "small": "http://www.tripadvisor.com/img/cdsi/img2/awards/CERTIFICATE_OF_EXCELLENCE_small-MCID-5.jpg", "large": "http://www.tripadvisor.com/img/cdsi/img2/awards/CERTIFICATE_OF_EXCELLENCE_2014_en_US_large-MCID-5.jpg" }, "categories": [], "display_name": "Certificate of Excellence 2014" } ], "num_reviews": "1071", "subcategory": [ { "name": "hotel", "localized_name": "Hotel" } ], "rating_image_url": "http://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/4.5-MCID-5.svg", "name": "Boston Harbor Hotel", "ancestors": [ { "abbrv": null, "level": "City", "name": "Boston", "location_id": "60745" }, { "abbrv": "MA", "level": "State", "name": "Massachusetts", "location_id": "28942" }, { "abbrv": null, "level": "Country", "name": "United States", "location_id": "191" } ], "longitude": "-71.04995", "latitude": "42.356094", "rating": "4.5",
}
  }       
}
    },
      "hotel_booking": {       
"bookable": true,       
"booking_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d94330-Reviews-mMCID-Seaport_Boston_Hotel-Boston_Massachusetts.html" 
    },
"ranking_data": { "geo_location_id": "60745", "ranking_string": "#2 of 77 hotels in Boston", "geo_location_name": "Boston", "ranking_out_of": "77", "ranking": "2" } }, { "see_all_photos": "http://www.tripadvisor.com/LocationPhotos-g60745-d94330-mMCID-Seaport_Boston_Hotel-Boston_Massachusetts.html", "web_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d94330-Reviews-mMCID-Seaport_Boston_Hotel-Boston_Massachusetts.html", "percent_recommended": null, "location_string": "Boston, Massachusetts", "location_id": "94330", "write_review": "http://www.tripadvisor.com/UserReview-g60745-d94330-mMCID-Seaport_Boston_Hotel-Boston_Massachusetts.html", "price_level": "$$$$", "api_detail_url": "http://api.tripadvisor.com/api/partner/2.0/location/94330?key=PARTNER_KEY", "address_obj": { "street1": "1 Seaport Lane", "street2": "", "city": "Boston", "state": "Massachusetts", "country": "United States", "postalcode": "02210", "address_string": "1 Seaport Lane, Boston, MA 02210" }, "category": { "name": "hotel", "localized_name": "Hotel" }, "awards": [ { "award_type": "Certificate of Excellence", "year": "2014", "images": { "small": "http://www.tripadvisor.com/img/cdsi/img2/awards/CERTIFICATE_OF_EXCELLENCE_small-MCID-5.jpg", "large": "http://www.tripadvisor.com/img/cdsi/img2/awards/CERTIFICATE_OF_EXCELLENCE_2014_en_US_large-MCID-5.jpg" }, "categories": [], "display_name": "Certificate of Excellence 2014" } ], "num_reviews": "1813", "subcategory": [ { "name": "hotel", "localized_name": "Hotel" } ], "rating_image_url": "http://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/4.5-MCID-5.svg", "name": "Seaport Boston Hotel", "ancestors": [ { "abbrv": null, "level": "City", "name": "Boston", "location_id": "60745" }, { "abbrv": "MA", "level": "State", "name": "Massachusetts", "location_id": "28942" }, { "abbrv": null, "level": "Country", "name": "United States", "location_id": "191" } ], "longitude": "-71.0413", "latitude": "42.349503", "rating": "4.5", "ranking_data": { "geo_location_id": "60745", "ranking_string": "#3 of 77 hotels in Boston", "geo_location_name": "Boston", "ranking_out_of": "77", "ranking": "3" } } ], "paging": { "previous": null, "skipped": "0", "results": "3", "next": "http://api.tripadvisor.com/api/partner/2.0/location/60745/hotels?key=PARTNER_KEY&limit=3&offset=3", "total_results": "10" } }

Properties

Name Type Description
location_id number Unique Tripadvisor location ID of the destination or POI.
name string Name of the POI as listed on Tripadvisor.
rating number

Overall rating for this POI. Not applicable to geographic locations. Rating levels are defined as follows:


5

Excellent

4

Very good

3

Average

2

Poor

1

Terrible

rating_image_url URL URL to the bubble rating image for this location. As noted in the Display Guidelines, overall Bubble Ratings must be displayed using the Tripadvisor bubble rating image with the owl icon.
num_reviews number Count of total reviews published for this location.
percent_recommended number

Deprecated as of March 2015. Value will display as 'null.' 

write_review URL Link to the review form for this specific POI on Tripadvisor. Link will be localized to the correct domain if language other than English is requested.
description string Description of the POI, if available. Null if not available. For a majority of POIs, a description is only available in English and it is excluded from the response if a different language is requested.
location_string string Destination location for the POI. Most commonly written as city, state or city, province/region. In cases where state/province/region is not relevant, then it would be city, country. This string is localized if a language other than English is requested.
ranking_data object Describes a POI's Popularity Index ranking on Tripadvisor, which compares places of interest (accomodations, restaurants, and attractions) within the same destination based on their popularity. This is measured by the quality, quantity, and recency of their review content on Tripadvisor.
hotel_booking object

Includes whether a hotel is bookable on Tripadvisor and booking url.

category object Each POI on Tripadvisor is classified under a "category" and "subcategory", which is included in the API response. Categories and subcategories may also be used to filter the /location method when a destination (geo) location ID is used.
subcategory object Listings that are accommodations/hotels or restaurants are assigned a single subcategory. Attractions may belong to one or more subcategories, and may also be further classified under "types" which are even more specific.
awards object Returns a list of all of the awards for this location, which includes Certificate of Excellence, Travelers' Choice, and Green Leader. For each award, a small and large image will be returned as well.
latitude number The latitude of this location in degrees. Null if unavailable.
longitude number The longitude of this location in degrees. Null if unavailable.
price_level string The relative price level for the POI. Not available for all POIs. This string is localized into select other currency symbols (e.g. ££££ or €€€€) if a language other than English (en_US) is requested or if a specific currency is selected.
web_url URL Link to the POI detail page on Tripadvisor. Link will be localized to the correct domain if a language other than English is requested.
ancestors object Ancestors describe where the POI or destination lives within the Tripadvisor destination or geo hierarchy. From this, you can derive the city where a POI is located, as well as state/province/region and country.
address_obj object Object containing address data for this location.
see_all_photos URL Link to open all traveler photos posted for this POI in a photo viewer on Tripadvisor. Link will be localized to the correct domain if language other than English is requested.
api_detail_url URL Link to the API url that shows details about one individual location in the list.
paging object Information required to browse the next and previous sets of locations in the list, if they were not all returned as part of the current call.