GET

TripAdvisor Details from URL API

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

Overview

One-Step Solution

Simply provide any TripAdvisor hotel URL and get comprehensive hotel details instantly.

This endpoint combines URL parsing and detail extraction in one call. Perfect when you have the hotel URL but not the location ID. Returns the same comprehensive data as the location ID endpoint.

Endpoint URL

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

Query Parameters

Parameter Type Required Description
url string Required Any valid TripAdvisor hotel URL

Accepted URL Formats

This endpoint works with any TripAdvisor hotel URL:

Standard format:

https://www.tripadvisor.com/Hotel_Review-g2400063-d8622290-Reviews-Hotel.html

With page navigation:

https://www.tripadvisor.com/Hotel_Review-g2400063-d8622290-Reviews-or10-Hotel.html

Different domains:

https://www.tripadvisor.co.uk/Hotel_Review-g2400063-d8622290-Reviews-Hotel.html

Response Data

Returns the same comprehensive hotel information as the location ID endpoint, including:

Property Information

  • • Hotel name and description
  • • Star rating and price level
  • • Rankings and awards
  • • Number of rooms

Location Details

  • • Full address
  • • GPS coordinates
  • • Nearby attractions
  • • Neighborhood info

Reviews & Ratings

  • • Overall rating
  • • Category breakdowns
  • • Review distribution
  • • Traveler types

Amenities & Features

  • • Complete amenity list
  • • Room features
  • • Hotel highlights
  • • Contact information

Why Use This Endpoint?

Best for Automation

Ideal for web scraping, browser extensions, or any workflow where you have URLs but not location IDs.

  • No need to parse location IDs from URLs
  • Works with any TripAdvisor hotel page URL
  • Single API call for complete hotel data
  • Includes the extracted location ID in response
  • Perfect for browser automation workflows
Request
curl -X GET "https://api.stayapi.com/v1/tripadvisor/hotel/details-from-url?url=https://www.tripadvisor.com/Hotel_Review-g2400063-d8622290-Reviews-Hotel.html" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "location_id": "8622290",
    "extracted_from_url": "https://www.tripadvisor.com/Hotel_Review-g2400063-d8622290-Reviews-Hotel.html",
    "name": "Mandarin Oriental, Bangkok",
    "description": "Situated on the banks of the Chao Phraya River, the Mandarin Oriental, Bangkok has been an inspiration to travelers for over 140 years.",
    "hotel_class": 5,
    "price_level": "$$$$",
    "rating": 4.5,
    "num_reviews": 3456,
    "ranking_position": 12,
    "ranking_geo": "Bangkok",
    "awards": [
      {
        "award_type": "TRAVELLERS_CHOICE",
        "year": "2023",
        "display_name": "Travelers' Choice 2023"
      }
    ],
    "address": {
      "street1": "48 Oriental Avenue",
      "city": "Bangkok",
      "country": "Thailand",
      "postalcode": "10500",
      "latitude": 13.7234,
      "longitude": 100.5132
    },
    "phone": "+66 2 659 9000",
    "website": "https://www.mandarinoriental.com/bangkok",
    "rating_breakdown": {
      "Location": 4.8,
      "Cleanliness": 4.7,
      "Service": 4.9,
      "Value": 4.2
    },
    "amenities": [
      "Free WiFi",
      "Pool",
      "Restaurant",
      "Spa",
      "Fitness center",
      "Business center",
      "Concierge",
      "Room service"
    ],
    "num_rooms": 393,
    "nearby_attractions": [
      {
        "name": "Wat Pho",
        "distance": "1.2 km"
      },
      {
        "name": "Grand Palace",
        "distance": "1.8 km"
      }
    ]
  },
  "message": "Successfully retrieved hotel details from URL",
  "retrieved_at": "2024-01-15T10:30:00Z"
}