GET
# TripAdvisor Prices from URL API

Get real-time hotel prices directly from any TripAdvisor URL - no location ID needed.

## Overview

#### URL-Based Pricing

Simply paste a TripAdvisor hotel URL and get current prices from all booking providers in one API call.

This endpoint combines URL parsing and price retrieval in a single request. Perfect for price comparison tools, browser extensions, or any workflow where you have hotel URLs.

### Endpoint URL

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

## Query Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| url | string | Required | Any valid TripAdvisor hotel URL |
| check\_in | string | Required | Check-in date (YYYY-MM-DD) |
| check\_out | string | Required | Check-out date (YYYY-MM-DD) |
| adults | integer | Optional | Number of adult guests (1-8, default: 2) |
| rooms | integer | Optional | Number of rooms (1-4, default: 1) |
| currency | string | Optional | Currency code (default: "USD") |

## Perfect For

### Browser Extensions

Build price comparison extensions that work on any TripAdvisor hotel page. Users can see prices without leaving the site.

### Price Monitoring

Track price changes for specific hotels over time. Just store the URL and check prices periodically.

### Travel Planning Tools

Let users paste TripAdvisor links to compare prices across their shortlisted hotels.

### Automated Workflows

Integrate with automation tools that collect hotel URLs from various sources.

## Example Workflow

1. User browses TripAdvisor and finds an interesting hotel
2. User copies the URL from their browser
3. Your application calls this API with the URL and desired dates
4. API returns prices from all available booking sites
5. User compares prices and books through their preferred provider

#### URL Flexibility

This endpoint accepts any TripAdvisor hotel URL format - mobile, desktop, different domains, with or without review pages.

Request

```curl
curl -X GET "https://api.stayapi.com/v1/tripadvisor/hotel/prices-from-url?url=https://www.tripadvisor.com/Hotel_Review-g187791-d1418033-Reviews-Hotel_Ciao-Rome_Lazio.html&check_in=2026-04-01&check_out=2026-04-03" \
  -H "x-api-key: YOUR_API_KEY"
```

Response

```json
{
  "success": true,
  "location_id": 1418033,
  "search_params": {
    "check_in": "2026-04-01",
    "check_out": "2026-04-03",
    "adults": 2,
    "rooms": 1,
    "currency": "USD"
  },
  "pricing_summary": {
    "lowest_price": "$140",
    "pricing_complete": true,
    "has_member_rates": false
  },
  "available_offers": [
    {
      "provider": "Priceline",
      "price_per_night": "$140",
      "total_stay_price": "$304",
      "is_lowest_price": true,
      "rooms_remaining": 2,
      "taxes_value": 13
    },
    {
      "provider": "Booking.com",
      "price_per_night": "$173",
      "total_stay_price": "$380",
      "is_lowest_price": false,
      "rooms_remaining": null,
      "taxes_value": 17
    },
    {
      "provider": "Agoda.com",
      "price_per_night": "$170",
      "total_stay_price": "$392",
      "is_lowest_price": false,
      "rooms_remaining": 2,
      "taxes_value": 26
    }
  ],
  "message": "Successfully retrieved hotel pricing",
  "retrieved_at": "2026-02-27T10:55:08Z"
}
```

```json
{
  "error": "Invalid URL",
  "detail": "The provided URL is not a valid TripAdvisor hotel URL",
  "status_code": 400
}
```
