/location

 

Call the API with the unique ID for a hotel, restaurant, attraction or destination.  The response provides data such as:  name, address, overall traveler rating, number of reviews, link to read all reviews, link to write reviews, and additional data elements.  Some data elements may not output if they do not apply to the particular type of location.

Request

http://api.tripadvisor.com/api/partner/2.0/location/89575?key=<YOUR KEY HERE>

Query Parameters

Name Description
lang The desired language locale. Find the full list here.
currency currency code to use for request and response (should follow ISO 4217).

 

Response

{
  "address_obj": {
    "street1": "70 Rowes Wharf",
    "street2": "",
    "city": "Boston",
    "state": "Massachusetts",
    "country": "United States",
    "postalcode": "02110-3354",
    "address_string": "70 Rowes Wharf, Boston, MA 02110-3354"
  },
  "latitude": "42.356506",
  "rating": "4.5",
  "location_id": "89575",
  "trip_types": [
    {
      "name": "business",
      "value": "360",
      "localized_name": "Business"
    },
    {
      "name": "couples",
      "value": "654",
      "localized_name": "Couples"
    },
    {
      "name": "solo",
      "value": "75",
      "localized_name": "Solo travel"
    },
    {
      "name": "family",
      "value": "441",
      "localized_name": "Family"
    },
    {
      "name": "friends",
      "value": "102",
      "localized_name": "Friends getaway"
    }
  ],
  "write_review": "https://www.tripadvisor.com/UserReview-g60745-d89575-mMCID-Boston_Harbor_Hotel-Boston_Massachusetts.html",
  "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.05025",
  "hours": null,
  "percent_recommended": null,
  "hotel_booking": {
    "bookable": true,
    "booking_url": "https://www.tripadvisor.com/Hotel_Review-g60745-d89575-Reviews-mMCID-Boston_Harbor_Hotel-Boston_Massachusetts.html"
  },
  "review_rating_count": {
    "1": "18",
    "2": "22",
    "3": "63",
    "4": "269",
    "5": "1408"
  },
  "subratings": [
    {
      "rating_image_url": "https://static.tacdn.com/img2/ratings/traveler/ss5.0.gif",
      "name": "rate_location",
      "value": "5.0",
      "localized_name": "Location"
    },
    {
      "rating_image_url": "https://static.tacdn.com/img2/ratings/traveler/ss4.5.gif",
      "name": "rate_sleep",
      "value": "4.5",
      "localized_name": "Sleep Quality"
    },
    {
      "rating_image_url": "https://static.tacdn.com/img2/ratings/traveler/ss4.5.gif",
      "name": "rate_room",
      "value": "4.5",
      "localized_name": "Rooms"
    },
    {
      "rating_image_url": "https://static.tacdn.com/img2/ratings/traveler/ss5.0.gif",
      "name": "rate_service",
      "value": "5.0",
      "localized_name": "Service"
    },
    {
      "rating_image_url": "https://static.tacdn.com/img2/ratings/traveler/ss4.5.gif",
      "name": "rate_value",
      "value": "4.5",
      "localized_name": "Value"
    },
    {
      "rating_image_url": "https://static.tacdn.com/img2/ratings/traveler/ss5.0.gif",
      "name": "rate_cleanliness",
      "value": "5.0",
      "localized_name": "Cleanliness"
    }
  ],
  "ranking_data": {
    "ranking_string": "#4 of 82 hotels in Boston",
    "ranking_out_of": "82",
    "geo_location_id": "60745",
    "ranking": "4",
    "geo_location_name": "Boston"
  },
  "photo_count": "477",
  "location_string": "Boston, Massachusetts",
  "web_url": "https://www.tripadvisor.com/Hotel_Review-g60745-d89575-Reviews-mMCID-Boston_Harbor_Hotel-Boston_Massachusetts.html",
  "price_level": "$$$$",
  "rating_image_url": "http://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/4.5-MCID-5.svg",
  "awards": [
    {
      "award_type": "Certificate of Excellence",
      "year": "2016",
      "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_2016_en_US_large-MCID-5.jpg"
      },
      "categories": [],
      "display_name": "Certificate of Excellence 2016"
    }
  ],
  "name": "Boston Harbor Hotel",
  "num_reviews": "1780",
  "category": {
    "name": "hotel",
    "localized_name": "Hotel"
  },
  "subcategory": [
    {
      "name": "hotel",
      "localized_name": "Hotel"
    }
  ],
  "see_all_photos": "https://www.tripadvisor.com/Hotel_Review-g60745-d89575-mMCID-Reviews-Boston_Harbor_Hotel-Boston_Massachusetts.html#photos"
}

Properties

Field 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.
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.
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. 

Deprecated as of February 2017 for Attractions. Refer to the "groups" object for the most up to date classifications.

review_rating_count array Count of reviews for this location at each traveler rating level (1,2,3,4,5).
subratings object Users may rate accomodations and restaurants against a number of subcategories, using the same 1 (terrible) to 5 (excellent) rating scale as the overall Bubble Ratings. Please note that attractions are not further rated against any subcategories.
trip_types object Each review submitted on TripAdvisor is tagged with a trip type, as designated by the reviewer. For each POI location, a breakdown of the total review count by trip type is included in the "trip_types" object.
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.
cuisine object Description of the cuisine types of the restaurant.  A restaurant may have zero to many cuisines. (This field is only applicable for location type: restaurant.)
attraction_types object

Deprecated as of February 2017. Use the "Groups" object for attraction hierarchy. Attractions can have one or more "attraction_types". These serve primarily descriptive purposes and will not work as filters. (These fields are only applicable for location type: attraction.)

groups object Hierarchical display of Attraction Groups and Categories. (These fields are only applicable for location type: attraction.)
category_counts array Includes counts of each type of POI located in that destination, broken down by subcategory where applicable. 
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.
photo_count number The count of traveler photos for this POI published on TripAdvisor.
abbrv string Abbreviated version of the destination name if one exists (MA for Massachusetts for example). Null if not applicable.
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.
see_all_hotels URL Link to the main accomodations page for the destination on TripAdvisor.
see_all_attractions URL Link to the main attractions page for the destination on TripAdvisor.
see_all_restaurants URL Link to the main restaurants page for the destination on TripAdvisor.