# Viator.com Tours Scraper (`shahidirfan/viator-com-tours-scraper`) Actor

Extract tours, activities, attractions, prices, ratings, reviews, durations, destinations, availability, images, itineraries, inclusions, and more from Viator.com. Ideal for travel research, market analysis, price monitoring, lead generation, and tourism data collection.

- **URL**: https://apify.com/shahidirfan/viator-com-tours-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Travel, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Viator Tours Scraper

Extract tour and activity listings from Viator destination pages with clean, structured output. Collect listing data such as titles, prices, ratings, review counts, durations, destinations, images, languages, cancellation details, and product URLs for travel research, pricing analysis, and catalog monitoring.

### Features

- **Destination listing support** - Paste a Viator listing URL such as a city tours page and collect available activities.
- **Pagination control** - Move through multiple listing pages until your result target or page limit is reached.
- **Clean dataset** - Empty and always-null values are removed from saved records.

---

### Use Cases

#### Travel Market Research
Compare Viator tours across destinations to understand what experiences are available, how they are priced, and which activities receive strong traveler interest. Ratings, review counts, and duration fields help you sort high-performing listings quickly.

#### Price Monitoring
Track starting prices for tours and activities in specific cities. Use repeated runs to monitor pricing changes for popular destinations, attractions, and competitor offerings.

#### Catalog Building
Create a structured catalog of tours with product codes, destination details, images, short descriptions, and direct URLs. This is useful for travel apps, internal research databases, and editorial planning.

#### Supplier and Product Analysis
Review listing-level signals such as cancellation policy, private tour availability, likely-to-sell-out flags, language availability, and badges. These fields help compare product positioning across similar experiences.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | String | No | Rome tours URL | Viator destination listing URL to extract listings from. |
| `results_wanted` | Integer | No | `20` | Maximum number of listings to save. |
| `max_pages` | Integer | No | `5` | Maximum listing pages to request. |
| `proxyConfiguration` | Object | No | Apify proxy disabled | Proxy settings for reliable runs. |

---

### Output Data

Each item in the dataset can contain:

| Field | Type | Description |
|-------|------|-------------|
| `product_code` | String | Viator product code. |
| `title` | String | Tour or activity title. |
| `canonical_name` | String | Canonical product name. |
| `url` | String | Viator product URL. |
| `source_url` | String | Listing page where the item was found. |
| `source_page` | Number | Listing page number. |
| `destination_id` | String | Viator destination id. |
| `destination_name` | String | Primary destination name. |
| `destination_parent_name` | String | Parent destination, such as country or region. |
| `description` | String | Listing description. |
| `brief_description` | String | Short product summary. |
| `price_from` | Number | Starting price. |
| `currency` | String | Price currency code. |
| `rating` | Number | Average traveler rating. |
| `exact_rating` | Number | Exact rating when available. |
| `review_count` | Number | Number of reviews. |
| `duration` | String | Human-readable duration. |
| `free_cancellation` | Boolean | Whether free cancellation is available. |
| `likely_to_sell_out` | Boolean | Whether Viator marks the listing as likely to sell out. |
| `new_product` | Boolean | Whether the listing is marked as new. |
| `private_tour` | Boolean | Whether the activity is a private tour. |
| `language_codes` | Array | Offered language codes. |
| `image_url` | String | Main listing image. |
| `badges` | Array | Listing badges when available. |

---

### Usage Examples

#### Destination URL

Collect listings from a Viator Rome tours page:

```json
{
  "startUrl": "https://www.viator.com/Rome/d511-ttd",
  "results_wanted": 20,
  "max_pages": 2
}
````

#### Larger Collection

Collect more listings from the same destination:

```json
{
  "startUrl": "https://www.viator.com/Rome/d511-ttd",
  "results_wanted": 50,
  "max_pages": 5
}
```

***

### Sample Output

```json
{
  "product_code": "62972P2",
  "title": "Colosseum Arena Floor, Roman Forum and Palatine Hill Tour",
  "canonical_name": "Colosseum Arena Floor, Roman Forum and Palatine Hill Guided Tour",
  "url": "https://www.viator.com/tours/Rome/Colosseum-Arena-Floor-Roman-Forum-and-Palatine-Hill-Guided-Tour/d511-62972P2",
  "source_url": "https://www.viator.com/Rome/d511-ttd",
  "source_page": 1,
  "destination_id": "511",
  "destination_name": "Rome",
  "destination_parent_name": "Italy",
  "price_from": 33.73,
  "currency": "USD",
  "rating": 4.5,
  "review_count": 9545,
  "duration": "150 minutes",
  "free_cancellation": true,
  "language_codes": ["de", "en", "es", "fr", "pt"],
  "image_url": "https://dynamic-media.tacdn.com/media/photo-o/2e/a6/46/1f/caption.jpg?w=1200&h=800&s=1"
}
```

***

### Tips for Best Results

#### Use Listing URLs

- Use destination pages that end with patterns like `/Rome/d511-ttd`.
- For page-specific testing, URLs such as `/Rome/d511-ttd/2` are supported.

#### Start With Small Runs

- Use `results_wanted` between 20 and 50 for tests.
- Increase `max_pages` when you need broader coverage.

#### Check Pagination

- Increase `max_pages` when the first page does not contain enough listings.
- Use the dataset `source_page` field to see where each listing was found.

***

### Integrations

Connect your data with:

- **Google Sheets** - Review listings and pricing in spreadsheets.
- **Airtable** - Build a searchable travel product catalog.
- **Slack** - Send notifications when runs finish.
- **Webhooks** - Forward datasets to your own systems.
- **Make** - Automate reporting and enrichment workflows.
- **Zapier** - Trigger downstream actions from completed runs.

#### Export Formats

- **JSON** - For applications and data pipelines.
- **CSV** - For spreadsheet analysis.
- **Excel** - For business reporting.
- **XML** - For system imports.

***

### Frequently Asked Questions

#### Can I scrape any Viator listing URL?

Yes, you can scrape Viator destination listing URLs that expose tour and activity listings, such as `/Rome/d511-ttd`.

#### Can I collect listings from multiple pages?

Yes, the actor follows listing page pagination until it reaches `results_wanted`, `max_pages`, or the available page count.

#### What happens when a field is missing?

Missing, empty, and always-null values are skipped so the dataset stays clean.

#### Do I need a proxy?

A proxy is optional for small runs. For larger or repeated runs, proxy configuration can improve reliability.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/schedules)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring their use of collected data complies with Viator terms, Tripadvisor rules, and applicable laws. Use data responsibly and respect platform limits.

# Actor input Schema

## `startUrl` (type: `string`):

A Viator destination listing URL, for example https://www.viator.com/Rome/d511-ttd.

## `results_wanted` (type: `integer`):

Maximum number of listings to save.

## `max_pages` (type: `integer`):

Maximum listing pages to request. Viator destination pages usually contain 24 listings per page.

## `proxyConfiguration` (type: `object`):

Use Apify Proxy for reliable runs at scale.

## Actor input object example

```json
{
  "startUrl": "https://www.viator.com/Rome/d511-ttd",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrl": "https://www.viator.com/Rome/d511-ttd",
    "results_wanted": 20,
    "max_pages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/viator-com-tours-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrl": "https://www.viator.com/Rome/d511-ttd",
    "results_wanted": 20,
    "max_pages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/viator-com-tours-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrl": "https://www.viator.com/Rome/d511-ttd",
  "results_wanted": 20,
  "max_pages": 5
}' |
apify call shahidirfan/viator-com-tours-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/viator-com-tours-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Viator.com Tours Scraper",
        "description": "Extract tours, activities, attractions, prices, ratings, reviews, durations, destinations, availability, images, itineraries, inclusions, and more from Viator.com. Ideal for travel research, market analysis, price monitoring, lead generation, and tourism data collection.",
        "version": "0.0",
        "x-build-id": "ZV8j1mmwyNGkAegZk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~viator-com-tours-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-viator-com-tours-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~viator-com-tours-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-viator-com-tours-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~viator-com-tours-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-viator-com-tours-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrl": {
                        "title": "Viator listing URL",
                        "type": "string",
                        "description": "A Viator destination listing URL, for example https://www.viator.com/Rome/d511-ttd."
                    },
                    "results_wanted": {
                        "title": "Results wanted",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings to save.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum listing pages to request. Viator destination pages usually contain 24 listings per page.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for reliable runs at scale.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
