/map-hotels

Same as /map call, restricting results to a maximum of 10 hotels/accommodations.

Request

http://api.tripadvisor.com/api/partner/2.0/map/42.33141,-71.099396/hotels?key=PARTNER_KEY

Query Parameters

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.
lunit length unit (either 'mi' or 'km') which overrides the default length units used in input and output.
distance distance in miles (unless another unit is specified using lunit) defining the width and height of the bounding rectangle around the center when specified. Defaults to 10 miles. The maximum is 25 miles or 50 kilometers.

min_rating Filters results list of hotels to those with a minimum overall rating. Input numbers between 1 and 5 including half bubbles (e.g. 3.0, 3.5).

 

Response

  {
  "data": [
    {
      "see_all_photos": "http://www.tripadvisor.com/LocationPhotos-g60745-d77638-mMCID-The_Inn_at_Longwood_Medical-Boston_Massachusetts.html",
      "web_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d77638-Reviews-mMCID-The_Inn_at_Longwood_Medical-Boston_Massachusetts.html",
      "percent_recommended": null,
      "location_string": "Boston, Massachusetts",
      "location_id": "77638",
      "write_review": "http://www.tripadvisor.com/UserReview-g60745-d77638-mMCID-The_Inn_at_Longwood_Medical-Boston_Massachusetts.html",
      "price_level": "$$$",
      "api_detail_url": "http://api.tripadvisor.com/api/partner/2.0/location/77638?key=PARTNER_KEY",
      "address_obj": {
        "street1": "342 Longwood Avenue",
        "street2": "",
        "city": "Boston",
        "state": "Massachusetts",
        "country": "United States",
        "postalcode": "02115",
        "address_string": "342 Longwood Avenue, Boston, MA 02115"
      },
      "distance": ".61",
      "category": {
        "name": "hotel",
        "localized_name": "Hotel"
      },
      "awards": [],
      "subcategory": [
        {
          "name": "hotel",
          "localized_name": "Hotel"
        }
      ],
      "num_reviews": "566",
      "rating_image_url": "http://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/4.0-MCID-5.svg",
      "name": "The Inn at Longwood Medical",
      "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"
        }
      ],
      "bearing": "northwest",
      "longitude": "-71.10668",
      "rating": "4.0",
      "latitude": "42.338406",
          }
}
},
"hotel_booking":{
"bookable": true,
"booking_url": "http:www.tripadvisor.com/Hotel_Review-g60745-d77638-Reviews-mMCID-The_Inn_at_Longwood_Medical-Boston_Massachusetts.html"
},

"ranking_data"; {
"geo_location_id": "60745",
"ranking_string": "#42 of 77 hotels in Boston", "geo_location_name": "Boston", "ranking_out_of": "77", "ranking": "42" } }, { "see_all_photos": "http://www.tripadvisor.com/LocationPhotos-g60745-d3225572-mMCID-EnVision_Hotel_Boston-Boston_Massachusetts.html", "web_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d3225572-Reviews-mMCID-EnVision_Hotel_Boston-Boston_Massachusetts.html", "percent_recommended": null, "location_string": "Boston, Massachusetts", "location_id": "3225572", "write_review": "http://www.tripadvisor.com/UserReview-g60745-d3225572-mMCID-EnVision_Hotel_Boston-Boston_Massachusetts.html", "price_level": "$$$", "api_detail_url": "http://api.tripadvisor.com/api/partner/2.0/location/3225572?key=PARTNER_KEY", "address_obj": { "street1": "81 South Huntington Ave", "street2": null, "city": "Boston", "state": "Massachusetts", "country": "United States", "postalcode": "02130", "address_string": "81 South Huntington Ave, Boston, MA 02130" }, "distance": ".62", "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" } ], "subcategory": [ { "name": "hotel", "localized_name": "Hotel" } ], "num_reviews": "222", "rating_image_url": "http://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/4.5-MCID-5.svg", "name": "enVision Hotel Boston", "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" } ], "bearing": "west", "longitude": "-71.111336", "rating": "4.5", "latitude": "42.33", }
}
},
"hotel_booking":{
"bookable": true
"booking_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d3225572-Reviews-mMCID-EnVision_Hotel_Boston-Boston_Massachusetts.html"
},
"ranking_data": { "geo_location_id": "60745", "ranking_string": "#14 of 77 hotels in Boston", "geo_location_name": "Boston", "ranking_out_of": "77", "ranking": "14" } }, { "see_all_photos": "http://www.tripadvisor.com/LocationPhotos-g60745-d6485213-mMCID-The_Verb_Hotel-Boston_Massachusetts.html", "web_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d6485213-Reviews-mMCID-The_Verb_Hotel-Boston_Massachusetts.html", "percent_recommended": null, "location_string": "Boston, Massachusetts", "location_id": "6485213", "write_review": "http://www.tripadvisor.com/UserReview-g60745-d6485213-mMCID-The_Verb_Hotel-Boston_Massachusetts.html", "price_level": "$$$$", "api_detail_url": "http://api.tripadvisor.com/api/partner/2.0/location/6485213?key=PARTNER_KEY", "address_obj": { "street1": "1271 Boylston Street", "street2": null, "city": "Boston", "state": "Massachusetts", "country": "United States", "postalcode": "02215", "address_string": "1271 Boylston Street, Boston, MA 02215" }, "distance": ".94", "category": { "name": "hotel", "localized_name": "Hotel" }, "awards": [], "subcategory": [ { "name": "hotel", "localized_name": "Hotel" } ], "num_reviews": "22", "rating_image_url": "http://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/5.0-MCID-5.svg", "name": "The Verb 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" } ], "bearing": "north", "longitude": "-71.09677", "rating": "5.0", "latitude": "42.34482",
}
}
},
"hotel_booking":{
"bookable": true,
"booking_url": "http://www.tripadvisor.com/Hotel_Review-g60745-d6485213-Reviews-mMCID-TheVerb_Hotel-Boston_Massachusetts.html"
}, "ranking_data": { "geo_location_id": "60745", "ranking_string": "#10 of 77 hotels in Boston", "geo_location_name": "Boston", "ranking_out_of": "77", "ranking": "10" } } ], "paging": { "previous": null, "skipped": "0", "results": "3", "next": "http://api.tripadvisor.com/api/partner/2.0/map/42.33141,-71.099396/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.
distance number This field applies only for calls that pass in a latitude and longitude as input. It indicates the distance in the requested unit (miles or kilometers) between this location and the passed-in location. If no lunit parameter is passed in to specify the unit of measure, the default unit for the locale is used.
bearing string This field applies only for calls that pass in a latitude and longitude as input. It indicates the compass direction of this location relative to the passed-in location.