# Viator API

> Viator returns tour listings and starting prices as a workflow and API.

Viator returns city tour listings through Search tours, using a required city and optional date, topic, currency, sorting, and result count. Listings include titles, ratings, durations, review counts, cancellation details, and starting prices.

- Page: https://fous.com/workflows/viator
- Handle: `@viator`
- Category: [Travel](https://fous.com/workflows/category/travel)
- Source website: https://viator.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Viator.

## Methods

### Search tours

Operation `search_tours`, version 1. 1 credit per call.

Find tours and experiences in a city, with optional keywords, date, currency, and sorting. Prices are starting prices; available dates and prices can change.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `city` | string | yes | `"Paris"` | City to explore, e.g. Paris. |
| `date` | string | no | `"2026-10-18"` | Day tours should be available, e.g. 2026-10-18. |
| `sort` | string | no | `"featured"` | Order of tours, e.g. featured. |
| `query` | string | no | `"Eiffel Tower"` | Tour topic or attraction, e.g. Eiffel Tower. Leave blank for any tours. |
| `currency` | string | no | `"EUR"` | Three-letter price currency, e.g. EUR. |
| `max_results` | integer | no | `5` | Maximum tours to return, e.g. 20. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "city"
  ],
  "properties": {
    "city": {
      "type": "string",
      "description": "City to explore, e.g. Paris.",
      "examples": [
        "Paris",
        "Rome"
      ]
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "Day tours should be available, e.g. 2026-10-18.",
      "examples": [
        "2026-10-18"
      ]
    },
    "sort": {
      "enum": [
        "featured",
        "price_low_to_high",
        "rating"
      ],
      "type": "string",
      "default": "featured",
      "description": "Order of tours, e.g. featured.",
      "examples": [
        "featured",
        "rating",
        "price_low_to_high"
      ]
    },
    "query": {
      "type": "string",
      "default": "",
      "description": "Tour topic or attraction, e.g. Eiffel Tower. Leave blank for any tours.",
      "examples": [
        "Eiffel Tower",
        "Seine cruise",
        "zzznotourmatch999"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USD",
      "description": "Three-letter price currency, e.g. EUR.",
      "examples": [
        "EUR",
        "USD"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum tours to return, e.g. 20.",
      "x-fous-developer": true,
      "examples": [
        5,
        6,
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "city": "Paris"
    },
    {
      "city": "Paris",
      "date": "2026-10-18",
      "sort": "featured",
      "query": "Eiffel Tower",
      "currency": "EUR",
      "max_results": 5
    },
    {
      "city": "Paris",
      "sort": "rating",
      "query": "Seine cruise",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `tours` | array |  | Tours matching the city and filters. |
| `tours[].link` | string | `"https://www.viator.com/tours/Paris/Eiffel-Tower-guided-climb-with-optional-summit/d479-5522676P3"` | Viator tour page link. |
| `tours[].title` | string | `"Eiffel Tower Guided Tour by Stairs with Optional Summit by Lift"` | Tour title. |
| `tours[].badges` | array |  | Badges shown on the listing. |
| `tours[].rating` | number or null | `4.8` | Rating out of five. |
| `tours[].currency` | string | `"EUR"` | Price currency. |
| `tours[].duration` | string or null | `"2 hours"` | Tour duration. |
| `tours[].product_code` | string | `"5522676P3"` | Viator product code. |
| `tours[].review_count` | integer or null | `5980` | Number of reviews. |
| `tours[].free_cancellation` | boolean or null | `true` | Whether cancellation is free. |
| `tours[].short_description` | string or null | `"Experience the Eiffel Tower the way Gustave Eiffel himself would have by climbing its stairs on a guided adventure. Lea` | Short description when shown. |
| `tours[].starting_price_per_person` | number or null | `45` | Starting price per person. |

**Example input**

```json
{
  "city": "Paris",
  "date": "2026-10-18",
  "sort": "featured",
  "query": "Eiffel Tower",
  "currency": "EUR",
  "max_results": 5
}
```

**Example output**

```json
{
  "tours": [
    {
      "link": "https://www.viator.com/tours/Paris/Eiffel-Tower-guided-climb-with-optional-summit/d479-5522676P3",
      "title": "Eiffel Tower Guided Tour by Stairs with Optional Summit by Lift",
      "badges": [],
      "rating": 4.8,
      "currency": "EUR",
      "duration": "2 hours",
      "product_code": "5522676P3",
      "review_count": 5980,
      "free_cancellation": true,
      "short_description": "Experience the Eiffel Tower the way Gustave Eiffel himself would have by climbing its stairs on a guided adventure. Learn about its history, hidden stories and engineering feats along the way. Then fr…",
      "starting_price_per_person": 45
    },
    {
      "link": "https://www.viator.com/tours/Paris/Eiffel-Tower-Climbing-Tour-with-Summit-Access/d479-5512924P12",
      "title": "Eiffel Tower Reserved Access Guided Tour with Optional Summit",
      "badges": [],
      "rating": 4.6,
      "currency": "EUR",
      "duration": "1 hour 30 minutes",
      "product_code": "5512924P12",
      "review_count": 3550,
      "free_cancellation": true,
      "short_description": null,
      "starting_price_per_person": 49.9
    },
    {
      "link": "https://www.viator.com/tours/Paris/Prestige-Dinner-Cruise-departing-from-the-Eiffel-Tower/d479-425783P1",
      "title": "Dinner Cruise Prestige Check-out from the Eiffel Tower",
      "badges": [
        "Likely to Sell Out"
      ],
      "rating": 4,
      "currency": "EUR",
      "duration": "2 hours",
      "product_code": "425783P1",
      "review_count": 877,
      "free_cancellation": true,
      "short_description": null,
      "starting_price_per_person": 62
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@viator",
  "visibility": "public",
  "operation": "search_tours",
  "version": 1,
  "input": {
    "city": "Paris"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@viator\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_tours\",\n  \"version\": 1,\n  \"input\": {\n    \"city\": \"Paris\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@viator",
  "visibility": "public",
  "operation": "search_tours",
  "version": 1,
  "input": {
    "city": "Paris"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@viator","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare tour ratings and review counts by city.
- Find tours for a specific date or attraction.
- Review starting prices and currencies for city tours.
- Identify tours with free cancellation.
- Sort tour listings for travel planning.

## FAQ

### Is Fous affiliated with Viator?

No. Fous is not affiliated with Viator. This workflow reads the public viator.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Viator account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from viator.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What tours are available in a city?

Search tours returns matching tours when you provide a city, with optional filters such as date, topic, currency, and sorting.

### What is the starting price of a tour?

Search tours returns starting prices per person and their currency. Prices and available dates can change.

### Which tours offer free cancellation?

Search tours returns whether free cancellation is available for each listed tour.

## Related

- [GetYourGuide API](https://fous.com/workflows/getyourguide.md): Tours, tickets and activities in destinations around the world.
- [Tripadvisor API](https://fous.com/workflows/tripadvisor.md): Tripadvisor provides traveler-ranked first-page city listings of attractions, restaurants and hotels, plus latest reviews; hotel prices and booking sites depend on supplied stay dates and availability.
- [Trip.com API](https://fous.com/workflows/trip-com.md): Trip.com offers hotel and flight bookings, with hotel listings limited to initial public results and prices and fares subject to change.
- [Klook API](https://fous.com/workflows/klook.md): Activities, attraction tickets, tours and travel passes.
- [Expedia API](https://fous.com/workflows/expedia.md): Expedia helps travelers find hotels, vacation stays, and travel deals, with hotel prices and flight options for selected destinations and dates; flight listings may be limited.
- [FlixBus API](https://fous.com/workflows/flixbus.md): Find and book bus and train trips on FlixBus.
- [Airbnb API](https://fous.com/workflows/airbnb.md): Airbnb returns public stays, listing details, dated trip prices, and night availability, which depend on dates and may be limited, unavailable, or change.
- [Booking.com API](https://fous.com/workflows/booking-com.md): Booking.com helps find stays, property details and public guest reviews; prices and cancellation terms depend on selected dates, and displayed prices may exclude taxes and fees.
- [All Travel workflows](https://fous.com/workflows/category/travel)
