GET

TripAdvisor Reviews from URL API

Extract hotel reviews directly from any TripAdvisor hotel URL - no location ID needed.

Overview

Simplest Method

Just paste any TripAdvisor hotel URL and get reviews instantly. The API handles location ID extraction automatically.

This endpoint is a convenient wrapper that extracts the location ID from a TripAdvisor URL and retrieves reviews in one step. Perfect when you have the hotel URL but not the location ID.

Endpoint URL

GET https://api.stayapi.com/v1/tripadvisor/hotel/reviews-from-url

Query Parameters

Parameter Type Required Description
url string Required Any valid TripAdvisor hotel URL
limit integer Optional Number of reviews per page (1-50, default: 10)
offset integer Optional Pagination offset (default: 0)
language string Optional Language filter (default: "en")

Supported URL Formats

This endpoint accepts any valid TripAdvisor hotel URL, including:

  • Standard hotel pages

    https://www.tripadvisor.com/Hotel_Review-g1224250-d305165-Reviews-Hotel.html
  • With page numbers

    https://www.tripadvisor.com/Hotel_Review-g1224250-d305165-Reviews-or10-Hotel.html
  • Different language versions

    https://www.tripadvisor.de/Hotel_Review-g1224250-d305165-Reviews-Hotel.html
  • Mobile URLs

    https://m.tripadvisor.com/Hotel_Review-g1224250-d305165-Reviews-Hotel.html

Benefits

Why Use This Endpoint?

  • No need to extract location IDs manually
  • Works with any TripAdvisor hotel URL format
  • Same rich review data as the location ID endpoint
  • Perfect for web scraping workflows
  • Handles URL validation automatically

Pro Tip

The response includes the extracted location_id, so you can use it for subsequent API calls if needed.

Request
curl -X GET "https://api.stayapi.com/v1/tripadvisor/hotel/reviews-from-url?url=https://www.tripadvisor.com/Hotel_Review-g1224250-d305165-Reviews-Hotel.html&limit=5" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "hotel_name": "The Siam",
    "location_id": "305165",
    "extracted_from_url": "https://www.tripadvisor.com/Hotel_Review-g1224250-d305165-Reviews-Hotel.html",
    "total_reviews": 892,
    "average_rating": 4.5,
    "reviews": [
      {
        "review_id": "874521963",
        "title": "Exceptional luxury hotel with outstanding service",
        "text": "From the moment we arrived, we were treated like royalty. The staff went above and beyond to ensure our stay was perfect. The room was beautifully appointed with traditional Thai decor and modern amenities.",
        "rating": 5,
        "published_date": "2024-01-10",
        "stay_date": "December 2023",
        "trip_type": "Couples",
        "user": {
          "username": "SarahM_London",
          "display_name": "Sarah M",
          "location": "London, UK",
          "contributions": 47,
          "helpful_votes": 123,
          "avatar_url": "https://media-cdn.tripadvisor.com/media/photo-l/user123.jpg"
        },
        "helpful_votes": 8,
        "photos": [
          {
            "url": "https://media-cdn.tripadvisor.com/media/photo-w/review123.jpg",
            "caption": "Beautiful pool area"
          }
        ],
        "room_tip": "Request a river view room for stunning sunset views",
        "language": "en"
      }
    ],
    "pagination": {
      "limit": 10,
      "offset": 0,
      "has_next": true
    }
  },
  "message": "Successfully retrieved hotel reviews from URL",
  "retrieved_at": "2024-01-15T10:30:00Z"
}