The JSON Partner API provides provide dynamic access to Tripadvisor airline reviews. Partners can integrate the content into their websites and applications by calling the API, parsing the response, and displaying the data from the response on their site or in their app.
Access levels to the API and its content is dependent on the terms of use agreement between Tripadvisor and each individual partner. You may not have access to all calls, fields, and functionality. Contact your Account Manager with any questions.
Terminology: Tripadvisor uses the term “location” or “location ID” to refer to all individual businesses with reviews on Tripadvisor. For example, an individual airline, restaurant or hotel would have a “location ID” which is a unique and individual values. A “location ID” for an airline would look like: 8729081 (Germania Airlines) for example.
API calls made with a Tripadvisor ID (or Partner ID) will return the following:
Business Details – this function is most appropriate for OTA and others displaying information on multiple airlines;
API calls made with a Tripadvisor ID (or Partner ID) will return the following, if available:
To access data through the Tripadvisor API, you can make calls in the format below. API calls should always reference api.tripadvisor.com even if you wish to use a different language code.
http://api.tripadvisor.com/api/partner/2.0/location/8729081?key=PARTNER_KEY
/location |
Call the API with the unique ID for an airline. The response provides data such as: name, address, overall traveler rating, number of reviews, link to read all reviews, link to write reviews, recent review snippets, along with additional data elements. |
/location-reviews |
Call the API with the unique ID for an airline. The response will return recent reviews associated with this location. |
/location
Call the API with the unique location ID for an airline. The response provides data such as: name, address, overall traveler rating, number of reviews, link to read all reviews, link to write reviews, recent review snippets, along with additional data elements. Some data elements may not output if they are an optional field for the airline review form, such as flight number.
Request
tripadvisor.com/api/partner/2.0/location/8729081?key=PARTNER_KEY
Query Parameters
Name |
Description |
lang |
The desired language locale. |
fulltext |
When fulltext=true, the output of recent reviews will contain the full text of each review, the management response if one exists, and subratings. Otherwise, will output a review snippet truncated at 200 characters (no management response or subratings). If the API key does not have access to full text reviews the parameter will be ignored. Subratings are the 8 ratings for features such as Legroom, Customer Service, Food & Beverage, etc. |
Response
{ "address_obj": { "street1": "Germania Fluggesellschaft mbH Riedemannweg 58", "street2": null, "city": null, "state": null, "country": null, "postalcode": "13627", "address_string": "Germania Fluggesellschaft mbH Riedemannweg 58, 13627" }, "hours": null, "percent_recommended": null, "latitude": "0.0", "rating": "4.5", "location_id": "8729081", "review_rating_count": { "1": "15", "2": "14", "3": "44", "4": "162", "5": "268" }, "ranking_data": null, "photo_count": "51", "location_string": "World", "trip_types": [ { "name": "Leisure", "value": "465", "localized_name": "Leisure" }, { "name": "Business", "value": "8", "localized_name": "Business" }, { "name": "LeisureAndBusiness", "value": "12", "localized_name": "Both" } ], "web_url": "https://www.tripadvisor.com/Airline_Review-d8729081-Reviews-Cheap-Flights-Germania-Airlines", "reviews": [ { "id": "465830528", "lang": "en", "location_id": "8729081", "published_date": "2017-03-09T07:08:13-0500", "rating": 5, "helpful_votes": "0", "rating_image_url": "https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/s5.0-MCID-5.svg", "url": "https://www.tripadvisor.com/ShowUserReviews-g1-d8729081-r465830528-mMCID-Germania_Airlines-World.html#review465830528", "trip_type": { "name": "Leisure", "localized_name": "Leisure" }, "travel_date": "2017-03", "text": "This was a very good flight, to and from Norway. We were on a charter flight booked through Trailfinders.\nThe seats were very comfortable and I seemed to have plenty of legroom. \nWe were offered soft...", "user": { "username": "Rebecca S", "user_location": { "name": "Fareham, United Kingdom", "id": "503828" } }, "title": "Really comfy seats!", "flying_from": "LGW", "flying_to": "TOS", "class_service": { "name": "Business", "localized_name": "Business Class" }, "flight_number": null, "recommend_airline": "10", "legroom": "4", "seat_comfort": "5", "entertainment": "3", "customer_service": "5", "value_money": null, "cleanliness": "4", "checkin_boarding": "3", "food_beverage": "3", "pay_legroom": null, "pay_legroom_recc": null, "pay_addon": null, "pay_addon_recc": null, "children": null, "children_recc": null, "tip": "" }, { "id": "462781700", "lang": "en", "location_id": "8729081", "published_date": "2017-02-25T12:23:47-0500", "rating": 4, "helpful_votes": "0", "rating_image_url": "https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/s4.0-MCID-5.svg", "url": "https://www.tripadvisor.com/ShowUserReviews-g1-d8729081-r462781700-mMCID-Germania_Airlines-World.html#review462781700", "trip_type": { "name": "Leisure", "localized_name": "Leisure" }, "travel_date": "2016-07", "text": "Good flight with friendly cabin crew. The seats are among some of the most comfortable airplane seats, and in flight entertainment was also provided. Took this as a charter flight from Norwich...", "user": { "username": "NathanShoesmith", "user_location": { "name": null, "id": null } }, "title": "Great flight", "flying_from": "NWI", "flying_to": "CFU", "class_service": { "name": "Business", "localized_name": "Business Class" }, "flight_number": null, "recommend_airline": "8", "legroom": "4", "seat_comfort": "4", "entertainment": "4", "customer_service": "4", "value_money": "4", "cleanliness": "4", "checkin_boarding": "4", "food_beverage": "4", "pay_legroom": false, "pay_legroom_recc": null, "pay_addon": false, "pay_addon_recc": null, "children": true, "children_recc": true, "tip": "" }, { "id": "460801650", "lang": "en", "location_id": "8729081", "published_date": "2017-02-17T18:19:50-0500", "rating": 5, "helpful_votes": "0", "rating_image_url": "https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/s5.0-MCID-5.svg", "url": "https://www.tripadvisor.com/ShowUserReviews-g1-d8729081-r460801650-mMCID-Germania_Airlines-World.html#review460801650", "trip_type": { "name": "LeisureAndBusiness", "localized_name": "Both" }, "travel_date": "2017-02", "text": "It has been a very pleasant and cheap flight! A long flight like beirut stockholm turns very pleasant with this company. Ticket is fairly cheap and also meal is included. Off block time has been...", "user": { "username": "italiansinchicago", "user_location": { "name": "Viterbo, Italy", "id": "194950" } }, "title": "Great flight!", "flying_from": "BEY", "flying_to": "ARN", "class_service": { "name": "Business", "localized_name": "Business Class" }, "flight_number": null, "recommend_airline": "10", "legroom": "4", "seat_comfort": "5", "entertainment": "4", "customer_service": "5", "value_money": "5", "cleanliness": null, "checkin_boarding": null, "food_beverage": null, "pay_legroom": null, "pay_legroom_recc": null, "pay_addon": null, "pay_addon_recc": null, "children": null, "children_recc": null, "tip": null } ], "rating_image_url": "https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/4.5-MCID-5.svg", "awards": [], "name": "Germania Airlines", "num_reviews": "503", "write_review": "https://www.tripadvisor.com/UserReview-g1-d8729081-mMCID-Germania_Airlines-World.html", "category": { "name": "airline", "localized_name": "Airline" }, "subcategory": [], "ancestors": [], "see_all_photos": "https://www.tripadvisor.com/Airline_Review-d8729081-mMCID-Reviews-Cheap-Flights-Germania-Airlines#photos", "longitude": "0.0" }
Properties
Field |
Type |
Description |
address_obj |
Object |
Address information for Airline Headquarters |
hours |
N/A |
Not applicable for Airlines |
latitude |
N/A |
Not applicable for Airlines |
rating |
Array |
Overall rating of Airline (1-5) |
description |
Object |
Descriptive text of airline |
review_rating_count |
Array |
Breakdown of review ratings (1-5) |
1 |
Number |
# |
2 |
Number |
# |
3 |
Number |
# |
4 |
Number |
# |
5 |
Number |
# |
ranking_data |
N/A |
## not applicable for Airlines |
photo_count |
Number |
## count of photos currently live for the airline |
location_string |
N/A |
"World" – Disregard for Airlines |
trip_type |
Object |
Each review submitted on Tripadvisor is tagged with a trip type, as designated by the reviewer. For airline, a breakdown of the total review count by trip type is included in the "trip_types" object. Options include: “Business”, “Leisure” or “Both” in English and localized_name translation based on locale. |
num_reviews |
Number |
Number of reviews live for this airline |
write_review |
Object |
URL to Write a Review for this airline |
see_all_photos |
Object |
URL to Photo page for Airline on Tripadvisor |
/location-reviews
Access to review content is dependent on the terms of use agreement between Tripadvisor and each individual partner. You may not have access to all calls, fields, and functionality. Contact your Account Manager with any questions.
Full text recent reviews can be retrieved from the /location-reviews call. If the review includes a management response, it will be outputted in the response. You can specify the desired language in the query parameter.
http://api.tripadvisor.com/api/partner/2.0/location/258705/reviews?lang=en_US&key=PARTNER_KEY
{ "data": [ { "id": "465830528", "lang": "en", "location_id": "8729081", "published_date": "2017-03-09T07:08:13-0500", "rating": 5, "helpful_votes": "0", "rating_image_url": "https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/s5.0-MCID-5.svg", "url": "https://www.tripadvisor.com/ShowUserReviews-g1-d8729081-r465830528-mMCID-Germania_Airlines-World.html#review465830528", "trip_type": { "name": "Leisure", "localized_name": "Leisure" }, "travel_date": "2017-03", "text": "This was a very good flight, to and from Norway. We were on a charter flight booked through Trailfinders.\nThe seats were very comfortable and I seemed to have plenty of legroom. \nWe were offered soft drinks and a sandwich at no extra cost.\nFriendly staff on board.\nMy only complaint would be there were only 2 check in staff available on our return flight, there were 150 people all arriving at the same time so it took quite a while.", "user": { "username": "Rebecca S", "user_location": { "name": "Fareham, United Kingdom", "id": "503828" } }, "title": "Really comfy seats!", "owner_response": null, "flying_from": "LGW", "flying_to": "TOS", "class_service": { "name": "Business", "localized_name": "Business Class" }, "flight_number": null, "recommend_airline": "10", "legroom": "4", "seat_comfort": "5", "entertainment": "3", "customer_service": "5", "value_money": null, "cleanliness": "4", "checkin_boarding": "3", "food_beverage": "3", "pay_legroom": null, "pay_legroom_recc": null, "pay_addon": null, "pay_addon_recc": null, "children": null, "children_recc": null, "tip": "" }, { "id": "462781700", "lang": "en", "location_id": "8729081", "published_date": "2017-02-25T12:23:47-0500", "rating": 4, "helpful_votes": "0", "rating_image_url": "https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/s4.0-MCID-5.svg", "url": "https://www.tripadvisor.com/ShowUserReviews-g1-d8729081-r462781700-mMCID-Germania_Airlines-World.html#review462781700", "trip_type": { "name": "Leisure", "localized_name": "Leisure" }, "travel_date": "2016-07", "text": "Good flight with friendly cabin crew. The seats are among some of the most comfortable airplane seats, and in flight entertainment was also provided. Took this as a charter flight from Norwich - being a German airline the crew had very strong accents that were sometimes difficult to understand but there were also English cabin crew aboard. Can't fault the service, overall a very good flight.", "user": { "username": "NathanShoesmith", "user_location": { "name": null, "id": null } }, "title": "Great flight", "owner_response": null, "flying_from": "NWI", "flying_to": "CFU", "class_service": { "name": "Business", "localized_name": "Business Class" }, "flight_number": null, "recommend_airline": "8", "legroom": "4", "seat_comfort": "4", "entertainment": "4", "customer_service": "4", "value_money": "4", "cleanliness": "4", "checkin_boarding": "4", "food_beverage": "4", "pay_legroom": false, "pay_legroom_recc": null, "pay_addon": false, "pay_addon_recc": null, "children": true, "children_recc": true, "tip": "" }, { "id": "460801650", "lang": "en", "location_id": "8729081", "published_date": "2017-02-17T18:19:50-0500", "rating": 5, "helpful_votes": "0", "rating_image_url": "https://www.tripadvisor.com/img/cdsi/img2/ratings/traveler/s5.0-MCID-5.svg", "url": "https://www.tripadvisor.com/ShowUserReviews-g1-d8729081-r460801650-mMCID-Germania_Airlines-World.html#review460801650", "trip_type": { "name": "LeisureAndBusiness", "localized_name": "Both" }, "travel_date": "2017-02", "text": "It has been a very pleasant and cheap flight! A long flight like beirut stockholm turns very pleasant with this company. Ticket is fairly cheap and also meal is included. Off block time has been perfectly on time and cruise has been wonderful.", "user": { "username": "italiansinchicago", "user_location": { "name": "Viterbo, Italy", "id": "194950" } }, "title": "Great flight!", "owner_response": null, "flying_from": "BEY", "flying_to": "ARN", "class_service": { "name": "Business", "localized_name": "Business Class" }, "flight_number": null, "recommend_airline": "10", "legroom": "4", "seat_comfort": "5", "entertainment": "4", "customer_service": "5", "value_money": "5", "cleanliness": null, "checkin_boarding": null, "food_beverage": null, "pay_legroom": null, "pay_legroom_recc": null, "pay_addon": null, "pay_addon_recc": null, "children": null, "children_recc": null, "tip": null } ], "paging": { "next": null, "previous": null, "results": "3", "total_results": "3", "skipped": "0" } }
Parameter |
Description |
web_url |
URL to the review page of the Airline |
id |
ID number of the review |
lang |
Language of the review |
location_id |
Location ID of the Airline (airline identification code) |
published_date |
YYYY-MM-DD Time date review was published |
rating |
Overall rating of the airline given by reviewer |
helpful_votes |
# of helpful votes as voted by other Tripadvisor members |
rating_image_URL |
URL to images of the review |
trip_type |
{ |
name |
Type of trip: Leisure, Business or Both |
localized_name |
Type of trip translated from English based on locale |
travel_date |
YYYY-MM – Year and Month of flight experience |
text |
Body of review text |
user |
{ |
username |
Name of Tripadvisor member |
user_location |
{ |
name |
Location of Tripadvisor member (may be blank) |
id |
ID number of Tripadvisor member |
title |
Title of Review |
flying_from |
IATA Airport code Origin city |
flying_to |
IATA Airport code Destination city |
class_service |
Class of service flown |
localized_name |
Repetition of Class of Service flown |
flight_number |
Flight number of reviewed flight (may be blank) |
recommend_airline |
likelihood to recommend airline 0-10 |
legroom |
Rating 1-5 of this service factor (may be blank) |
seat_comfort |
Rating 1-5 of this service factor (may be blank) |
entertainment |
Rating 1-5 of this service factor (may be blank) |
customer_service |
Rating 1-5 of this service factor (may be blank) |
value_money |
Rating 1-5 of this service factor (may be blank) |
cleanliness |
Rating 1-5 of this service factor (may be blank) |
checkin_boarding |
Rating 1-5 of this service factor (may be blank) |
food_beverage |
Rating 1-5 of this service factor (may be blank) |
pay_legroom |
False/True – Indicates if reviewer purchase extra legroom option for economy class (if applicable) |
pay_legroom_recc |
True/False – indicates if extra legroom option was purchased, would reviewer recommend this ancillary service to another passenger |
pay_addon |
False/True – Indicates if reviewer purchased priority boarding or other ancillary services for economy class (if applicable) |
pay_addon_recc |
True/False – indicates if priority boarding or other ancillary services were purchased, would reviewer recommend this ancillary service to another passenger |
children |
False/True – indicates if reviewer travelled with a Child |
children_recc |
True/False – indicates if a reviewer travelled with a Child, would they recommend this airline for travelling with children |
tip |
Text for tips on this airline |
Parameter |
Description |
helpful_votes |
## Number of votes review has received as 'helpful' by other Tripadvisor members |
id |
Review ID number |
id |
This is the GEO code for the location of the reviewer from their profile |
lang |
Language of review code |
location_id |
Location ID of Airline |
name |
This field appears to be pulling in the location of the member from their profile which may be the field for 'user_location' |
published_date |
YYYY-MM-DD Date review published |
rating_image_URL |
URL to images for review |
text |
Body of review |
travel_date |
This is not working for Airlines in the API and should include the data from the Airline Review "MM-YYYY" - the reviewer's date of travel |
trip_type |
This is not working for Airlines in the API and should include the data from the Airline Review "Business", "Leisure" or "Both" |
url |
URL to review on website |
user |
{ |
user_location |
{ |
username |
Name of Tripadvisor member |
web_url |
|
Reviews can be collected in Partnerships with Tripadvisor using the Review Collection Platform. To retrieve jointly collected reviews from the API, append the [ all_shared=true] query parameter to the api call.
You can specify the language in the query parameters.
You can retrieve jointly collected reviews OR you can retrieve recent 5 reviews as detailed above. You cannot retrieve both types in the same API call.
Data elements returnef for recent reviews are also returned for jointly collected reviews. Two additional data elements are outputted for jointly collected reviews: partner_crawlable and mcid
http://api.tripadvisor.com/api/partner/2.0/location/3736728/reviews?lang=en_us&all_shared=true&key=PARTNER_KEY
Name |
Type |
Description |
mcid |
number |
Marketing campaign ID for shared reviews. |
partner_crawlable |
bool |
If true, review is not indexed on Tripadvisor, and may be search engine crawlable on the partner site. (Applies to a limited set of review collection platform partners.) |
Recent review snippets, 200 characters in length, are returned as a “reviews” array object in the main /location call (not the /location-reviews call) Management responses are not returned with snippets.
http://api.tripadvisor.com/api/partner/2.0/location/3202025?lang=en_US&key=PARTNER_KEY
Name |
Description |
lang |
The desired language locale. Full list of valid language codes is here. This affects the URLs, subrating labels, and trip_type output. |
preferred_lang |
The preferred language for reviews. Reviews written in the preferred language are returned first, although additional reviews may be returned in other languages if there are not enough reviews in the preferred language. Values are as for lang, plus ALL which includes all possible languages. Defaults to the value of the lang parameter. |
trip_type |
Filters results list of reviews based on trip type. Valid trip types are: Business, Leisure or Both |
all_shared |
If true, return all shared reviews (Review Collection Partners only). |