> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# TripAdvisor Restaurants API

> TripAdvisor restaurants: contact, address, coordinates, rating breakdown, ranking, cuisines, dishes, hours, menu links, price level and photos.

`POST /v1/data/tripadvisor/restaurants/run`

**Pricing:** $0.002 per restaurant ($2.00 per 1,000). Setting `maxPhotosPerPlace` above 0 adds \$0.0005 per delivered photo.

## Ways to call it

* **Search**: set `query` (optional: `maxResults`, `language`, `currency`, `includeTags`, `maxPhotosPerPlace`, `photosType`)
* **URL**: set `startUrls` (optional: `language`, `currency`, `includeTags`, `maxPhotosPerPlace`, `photosType`)

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**query** `string`

A location name or keyword to search, e.g. 'Paris' or 'Rome restaurants'. Use English place names for best coverage. (By Search mode.)

**startUrls** `string`

A TripAdvisor search or restaurant page URL to extract listings from. (By URL mode.)

Format e.g. `https://www.tripadvisor.com/hotels-g189158-lisbon_lisbon_district_central_portugal-hotels.html`.

**maxResults** `integer`

Number of restaurants to return. Use 0 for all.

**language** `string` (default: en)

Language for the listing data.

**currency** `string` (default: USD)

Currency for prices.

**includeTags** `boolean` (default: true)

Pull review category tags (e.g. "Romantic", "Special occasion").

**maxPhotosPerPlace** `integer` (default: 0)

Photos to fetch per restaurant. Use 0 for none. Billed as an add-on per delivered photo.

**photosType** `string` (default: fromEveryone)

Which photo source to pull from.

Allowed values: `fromEveryone` (From Everyone), `fromManagement` (From Management), `fromTravelers` (From Travelers).

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/tripadvisor/restaurants/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "query": "Rome",
    "maxResults": 10,
    "language": "en",
    "currency": "USD"
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/tripadvisor/restaurants/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "query": "Rome",
    "maxResults": 10,
    "language": "en",
    "currency": "USD"
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/tripadvisor/restaurants/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "query": "Rome",
  "maxResults": 10,
  "language": "en",
  "currency": "USD"
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one restaurant, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `id` | ID | text |
| `name` | Name | text |
| `type` | Type | text |
| `subcategories` | Subcategories | array |
| `tripadvisorUrl` | TripAdvisor URL | url |
| `description` | Description | text |
| `address` | Address | object |
| `neighborhood` | Neighborhood | object\_array |
| `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 |
| `categoryRatings` | Category Ratings | object\_array |
| `reviewTags` | Review Tags | object\_array |
| `rank` | Rank | number |
| `rankOutOf` | Rank Out Of | number |
| `photos` | Photos | array |
| `photoCount` | Photo Count | number |
| `cuisines` | Cuisines | array |
| `popularDishes` | Popular Dishes | array |
| `mealTypes` | Meal Types | array |
| `dietaryRestrictions` | Dietary Restrictions | array |
| `features` | Features | array |
| `establishmentTypes` | Establishment Types | array |
| `priceLevel` | Price Level | text |
| `openingHours` | Opening Hours | object\_array |
| `timezone` | Timezone | text |
| `menuUrl` | Menu URL | url |
| `orderOnline` | Order Online | object\_array |
| `closed` | Closed | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "tripadvisor/restaurants",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "reviews": 5068,
      "dietaryRestrictions": [
        "Vegetarian friendly",
        "Vegan options"
      ],
      "rating": 4.6,
      "mealTypes": [
        "Lunch",
        "Dinner"
      ],
      "closed": "Open",
      "menuUrl": "http://www.tripadvisor.com/MobileRestaurantMenu-g187791-d1483757-Enoteca_Trastevere-Rome_Lazio.html",
      "orderOnline": [],
      "neighborhood": [
        {
          "name": "Trastevere"
        },
        {
          "name": "Centro"
        }
      ],
      "photos": [
        "https://media-cdn.tripadvisor.com/media/photo-o/1e/6b/31/81/3.jpg",
        "https://media-cdn.tripadvisor.com/media/photo-o/1e/6b/88/36/1.jpg"
      ],
      "timezone": "Europe/Rome",
      "priceLevel": "$$ - $$$",
      "name": "Enoteca Trastevere",
      "email": "info@enotecatrastevere.it",
      "reviewTags": [
        {
          "tag": "pasta",
          "reviews": 104
        },
        {
          "tag": "truffle",
          "reviews": 28
        }
      ],
      "rank": 60,
      "features": [
        "Reservations",
        "Outdoor Seating"
      ],
      "cuisines": [
        "Italian",
        "Mediterranean"
      ],
      "tripadvisorUrl": "https://www.tripadvisor.com/Restaurant_Review-g187791-d1483757-Reviews-Enoteca_Trastevere-Rome_Lazio.html",
      "phone": "+39 06 588 5659",
      "rankOutOf": "15488",
      "id": "1483757",
      "photoCount": 2225,
      "description": null,
      "openingHours": [
        {
          "day": "Sunday",
          "open": "11:30",
          "close": "00:30"
        },
        {
          "day": "Monday",
          "open": "12:00",
          "close": "00:30"
        }
      ],
      "longitude": 12.471353
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.