# TripAdvisor Hotels

Extract TripAdvisor hotel listings: contact details, full address, geo coordinates, star rating with breakdown, league ranking, hotel class, room count, amenities, price range, OTA price offers, room tips, and photos.

**Pricing:** $2 / 1k hotels

**Endpoint:** `POST /api/v1/agents/tripadvisor/hotels/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | A location name or keyword to search, e.g. 'Paris' or 'Lisbon hotels'. Use English place names for best coverage. (By Search mode.) |
| `startUrls` | array | No | One per line. TripAdvisor search or hotel (place) page URLs to extract. (By URL mode.) |
| `maxResults` | integer | No | Hotels per query / URL. Use 0 for all. |
| `language` | string | No | Language for the listing data. |
| `currency` | string | No | Currency for prices. |
| `includeTags` | boolean | No | Pull review category tags (e.g. "Family-friendly", "Romantic"). |
| `checkInDate` | date | No | Check-in date for room pricing and offers. |
| `checkOutDate` | date | No | Check-out date for room pricing and offers. |
| `maxPhotosPerPlace` | integer | No | Photos to fetch per hotel. Use 0 for none. Billed as an add-on per delivered photo. |
| `photosType` | string | No | Which photo source to pull from. |

## Example

```bash
curl -X POST https://api.mindcase.co/api/v1/agents/tripadvisor/hotels/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/tripadvisor/hotels/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/api/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `id` | ID | text |
| `name` | Name | text |
| `type` | Type | text |
| `subcategories` | Subcategories | array |
| `tripadvisorUrl` | TripAdvisor URL | url |
| `description` | Description | text |
| `address` | Address | object |
| `latitude` | Latitude | number |
| `longitude` | Longitude | number |
| `phone` | Phone | phone |
| `email` | Email | email |
| `website` | Website | url |
| `rating` | Rating | rating |
| `reviews` | Reviews | number |
| `ratingBreakdown` | Rating Breakdown | object |
| `reviewTags` | Review Tags | object_array |
| `rank` | Rank | number |
| `rankOutOf` | Rank Out Of | number |
| `photos` | Photos | array |
| `photoCount` | Photo Count | number |
| `hotelClass` | Hotel Class | text |
| `rooms` | Rooms | number |
| `priceRange` | Price Range | text |
| `priceLevel` | Price Level | text |
| `amenities` | Amenities | array |
| `checkInDate` | Check-In Date | text |
| `checkOutDate` | Check-Out Date | text |
| `hotelOffers` | Hotel Offers | object_array |
| `roomTips` | Room Tips | object_array |
