b2btripadvisor

Implementing tripadvisor traveller rating


my goal is to show TripAdvisor score rank inside my app alongside other ranking system. Keep in mind that my application is a B2B app, not B2C.

What i can not understand even after reading the developer documentation is what kind of API should i eventually ask for. The Content API is only for B2C purposes...but, apparently, it is the only one that send me in response the actual TripAdvisor rating (the only thing i actually want from all TripAdvisor information).

Has anyone implemented TripAdvisor in an OTA (online travel agency) application and can guide me on which APIs to request?

Thank you in advice


Solution

  • I have not implemented TripAdvisor ratings in a B2B system, but helped on a B2C project that used Tripadvisor data.

    Your findings regarding Content API is correct, this is the only API where you find ratings.

    Rating is TripAdvisor "selling point", so this data protected and can only be used by following their presentation terms. Check out how here: https://developer-tripadvisor.com/content-api/display-requirements/

    You have 6 months implementation time and have to get Tripadvisor approval, or they cancel your API key. By using their API you commit not to store any data retrieved from their API.

    Quick guide to use their API: https://developer-tripadvisor.com/content-api/documentation/

    1. Call the locator_mapper to get possible location_id(s) http://api.tripadvisor.com/api/partner/2.0/location_mapper/42.344978,-71.119030?key=[YOUR_KEY_HERE]-mapper&category=hotels&q=Beacon%20Townhouse%20Inn%201023

    It returns a JSON with possible locations,

    {
    "data": [
    {
      "location_id": "89575",
    

    Then call location with the id to get ratings: http://api.tripadvisor.com/api/partner/2.0/location/89575?key=[YOUR_KEY_HERE]

    "review_rating_count": {
    "1": "18",
    "2": "22",
    "3": "63",
    "4": "269",
    "5": "1408"
    },
    

    Use this data, together with the presentation and links back to tripadvisor to comply with their license.