```yaml
product: AlterLab
title: How to Scrape Viator Data: Complete Guide for 2026
category: Tutorials
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
last_updated: 2026-07-31
canonical_facts:
  - "Learn how to scrape Viator travel data using Python and Node.js with AlterLab's API. Covers anti-bot handling, structured extraction, pricing, and best practices for 2026."
source_url: https://alterlab.io/blog/how-to-scrape-viator-data-complete-guide-for-2026
```

# How to Scrape Viator Data: Complete Guide for 2026

This guide covers extracting publicly accessible data. Always review a site's robots.txt and Terms of Service before scraping.

## TL;DR
To scrape Viator, send a request to AlterLab's API with the target URL. Use Python or Node.js SDKs, rely on auto‑escalating tiers for anti‑bot handling, and optionally extract structured JSON with Cortex. Start at T1; the API promotes to T3/T4 as needed, charging only for the successful tier.

## Why collect travel data from Viator?
Viator lists tours, activities, and experiences worldwide. Engineers extract this data for:
- **Market research**: Compare activity pricing across cities to inform product positioning.
- **Price monitoring**: Track seasonal fluctuations and dynamic discount patterns.
- **Data analysis**: Build recommendation engines or travel trend reports using publicly listed ratings and descriptions.

## Technical challenges
Travel sites like viator.com deploy standard anti‑bot protections: rate limiting per IP, User‑Agent scrutiny, and lightweight JavaScript checks that can block raw HTTP requests. AlterLab's Smart Rendering API manages proxy rotation, header normalization, and headless browser fallback so you receive the public HTML without manually solving challenges.

- **99.2%** — Success Rate
- **1.2s** — Avg Response
- **$0.002** — Per Request (T3)

## Quick start with AlterLab API
See the [Getting started guide](/docs/quickstart/installation) for SDK installation. Below are ready‑to‑run examples for Python and Node.js.

```python title="scrape_viator-com.py" {3-5}
import alterlab

client = alterlab.Client("YOUR_API_KEY")
response = client.scrape("https://www.viator.com/tours/London/Eiffel-Tower-Summit-Experience/d5072-12345TOUR")
print(response.text[:500])
```

```javascript title="scrape_viator-com.js" {3-5}
import { AlterLab } from "alterlab";

const client = new AlterLab({ apiKey: "YOUR_API_KEY" });
const response = await client.scrape("https://www.viator.com/tours/London/Eiffel-Tower-Summit-Experience/d5072-12345TOUR");
console.log(response.text.slice(0, 500));
```

```bash title="Terminal"
curl -X POST https://api.alterlab.io/v1/scrape \
  -H "X-API-Key: YOUR_KEY" \
  -d '{"url": "https://www.viator.com/tours/London/Eiffel-Tower-Summit-Experience/d5072-12345TOUR"}'
```

These snippets retrieve the raw HTML of a public tour page. AlterLab automatically selects the lowest viable tier (starting at T1) and upgrades if the response indicates a block.

## Extracting structured data
Once you have the HTML, you can parse visible fields with CSS selectors. Common Viator data points include:
- Tour title (`h1.tour-title`)
- Price (`span.price`)
- Average rating (`div.rating-stars`)
- Description (`div.description`)

In Python with BeautifulSoup:
```python title="parse_viator.py"
from bs4 import BeautifulSoup
soup = BeautifulSoup(response.text, "html.parser")
title = soup.select_one("h1.tour-title").get_text(strip=True)
price = float(soup.select_one("span.price").get_text(strip=True).replace("$", ""))
rating = float(soup.select_one("div.rating-stars")["data-rating"])
description = soup.select_one("div.description").get_text(strip=True)
print({"title": title, "price": price, "rating": rating, "description": description})
```

Node.js equivalent with Cheerio:
```javascript title="parse_viator.js"
import cheerio from "cheerio";
const $ = cheerio.load(response.text);
const title = $("h1.tour-title").text().trim();
const price = parseFloat($("span.price").text().replace("$", ""));
const rating = parseFloat($("div.rating-stars").attr("data-rating"));
const description = $("div.description").text().trim();
console.log({ title, price, rating, description });
```

## Structured JSON extraction with Cortex
AlterLab's Cortex API returns typed JSON directly, eliminating the need for local parsing. Provide a JSON Schema that matches the fields you want.

```python title="extract_viator-com_structured.py"
import alterlab

client = alterlab.Client("YOUR_API_KEY")
result = client.extract(
    url="https://www.viator.com/tours/London/Eiffel-Tower-Summit-Experience/d5072-12345TOUR",
    schema={
        "type": "object",
        "properties": {
            "title": {"type": "string"},
            "price": {"type": "number"},
            "rating": {"type": "number"},
            "description": {"type": "string"}
        },
        "required": ["title", "price"]
    }
)
print(result.data)  # Typed JSON output
```

Cortex handles JavaScript rendering and anti‑bot challenges internally, delivering consistent structured output.

1. **Request URL** — 
2. **Auto‑tier selection** — 
3. **Data extraction** — 

## Cost breakdown
AlterLab's pricing is usage‑based. The table below shows the cost per request and per 1,000 requests for each tier. For Viator, typical pages require JavaScript rendering and light anti‑bot handling, so the effective tier is often T3 (Stealth) or T4 (Browser). AlterLab auto‑escalates—you begin at T1 and only pay for the tier that succeeds.

| Tier | Use Case | Cost per Request | Cost per 1,000 | Requests per $1 |
|------|----------|-----------------|----------------|------------------|
| T1 — Curl | Static HTML, no JS needed | $0.0002 | $0.20 | 5,000 |
| T2 — HTTP | Standard pages with headers | $0.0003 | $0.30 | 3,333 |
| T3 — Stealth | Protected pages, anti-bot active | $0.002 | $2.00 | 500 |
| T4 — Browser | Full JS rendering required | $0.004 | $4.00 | 250 |
| T5 — CAPTCHA | CAPTCHA solving + JS rendering | $0.02 | $20.00 | 50 |

See the [AlterLab pricing](/pricing) page for the latest rates and volume discounts.

## Best practices
- **Rate limiting**: Start with one request per second per IP; adjust based on response headers.
- **Robots.txt**: Check `https://www.viator.com/robots.txt` for disallowed paths before scaling.
- **Dynamic content**: Use Cortex or set `render_js:true` if initial HTML lacks the data you need.
- **Error handling**: Retry failed requests with exponential backoff; inspect `response.status` for tier‑specific hints.
- **Headers**: AlterLab supplies a realistic browser User‑Agent; you can add custom headers via the `headers` parameter if needed.

## Scaling up
For large datasets:
- **Batch requests**: Send up to 100 URLs per batch using the `/v1/scrape/batch` endpoint to reduce overhead.
- **Scheduling**: Use AlterLab's scheduling feature** lets you define cron expressions for recurring scrapes (e.g., daily price checks).
- **Handling results**: Stream responses to a file or database; avoid holding all HTML in memory.
- **Responsible scaling**: Monitor your API usage dashboard and stay within the rate limits you set for Viator.

## Key takeaways
- AlterLab abstracts anti‑bot complexity with

## Frequently Asked Questions

### Is it legal to scrape viator?

Scraping publicly accessible data is generally permissible under precedents like hiQ v LinkedIn, but you must review Viator's robots.txt and Terms of Service, apply rate limiting, and avoid private or login‑gated information. Users bear responsibility for compliance.

### What are the technical challenges of scraping viator?

Viator employs standard anti‑bot measures such as request rate limits, header checks, and occasional JavaScript challenges. AlterLab's Smart Rendering API automatically handles proxy rotation, header management, and browser rendering to maintain reliable access.

### How much does it cost to scrape viator at scale?

Costs range from $0.0002 per request for static HTML (T1) up to $0.004 per request for full JavaScript rendering (T4). AlterLab auto‑escalates tiers—you only pay for the tier that succeeds—so a typical Viator scrape averages around $0.002/request.

## Related

- [GetApp Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/getapp-data-api-extract-structured-json-in-2026>)
- [SourceForge Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/sourceforge-data-api-extract-structured-json-in-2026>)
- [How to Scrape GetYourGuide Data: Complete Guide for 2026](<https://alterlab.io/blog/how-to-scrape-getyourguide-data-complete-guide-for-2026>)