
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...
AlterLab handles this automatically — scrape any URL with one API call. No infrastructure required.
Try it freeThis guide covers extracting publicly accessible data. Always review a site's robots.txt and Terms of Service before scraping.
Run a live request from this page. No sign-up needed.
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.
Quick start with AlterLab API
See the Getting started guide for SDK installation. Below are ready‑to‑run examples for Python and Node.js.
from alterlab import AlterLabSync
client = AlterLabSync("YOUR_API_KEY")
response = client.scrape("https://www.viator.com/tours/London/Eiffel-Tower-Summit-Experience/d5072-12345TOUR")
print(response["content"][:500])import { AlterLab } from "alterlab";
const client = new AlterLab({ apiKey: "YOUR_API_KEY" });
const response = await client.scrape({ url: "https://www.viator.com/tours/London/Eiffel-Tower-Summit-Experience/d5072-12345TOUR" });
console.log(response.text.slice(0, 500));curl -X POST https://api.alterlab.io/v1/scrape \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-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:
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:
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.
from alterlab import AlterLabSync
client = AlterLabSync("YOUR_API_KEY")
result = client.scrape(
url="https://www.viator.com/tours/London/Eiffel-Tower-Summit-Experience/d5072-12345TOUR",
extraction_schema={
"type": "object",
"properties": {
"title": {"type": "string"},
"price": {"type": "number"},
"rating": {"type": "number"},
"description": {"type": "string"}
},
"required": ["title", "price"]
}
)
print(result["filtered_content"]) # Typed JSON outputCortex handles JavaScript rendering and anti‑bot challenges internally, delivering consistent structured output.
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 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.txtfor disallowed paths before scaling. - Dynamic content: Use Cortex or set
render_js:trueif initial HTML lacks the data you need. - Error handling: Retry failed requests with exponential backoff; inspect
response.statusfor tier‑specific hints. - Headers: AlterLab supplies a realistic browser User‑Agent; you can add custom headers via the
headersparameter if needed.
Scaling up
For large datasets:
- Batch requests: Send up to 100 URLs per batch using the
/v1/scrape/batchendpoint 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
Was this article helpful?
Frequently Asked Questions
Related Articles

Oxylabs Alternative: Practical Developer Guide for Web Scraping Pipelines
Build reliable scraping pipelines with anti-bot handling, auto-escalation, and monitoring using a practical AltLab-compatible solution. Follow the 3-step setup, integrate with your existing workflow, and control costs at $0.0002 per request.
Herald Blog Service

Python aiohttp vs. httpx for High-Throughput Web Scraping
A benchmark‑driven comparison of aiohttp and httpx for asynchronous scraping, with concrete numbers, code snippets, and guidance on when to choose each library.
Herald Blog Service

MCP Servers Explained: How AI Tools Access the Real-Time Web in 2026
Learn how Model Context Protocol servers enable AI agents to fetch live data via scraping APIs, with architecture, code examples, and best practices for 2026.
Herald Blog Service
Popular Posts
Recommended

Selenium Bot Detection: Why You Get Flagged and How to Fix It

Why Your Headless Browser Gets Detected (and How to Fix It)

Playwright Stealth and Anti-Bot Techniques for RAG Pipelines

Mastering Playwright Stealth for Agentic Web Workflows

How to Bypass Cloudflare Bot Protection with Puppeteer in 2026
Newsletter
Scraping insights and API tips. No spam.
Recommended Reading

Selenium Bot Detection: Why You Get Flagged and How to Fix It

Why Your Headless Browser Gets Detected (and How to Fix It)

Playwright Stealth and Anti-Bot Techniques for RAG Pipelines

Mastering Playwright Stealth for Agentic Web Workflows

How to Bypass Cloudflare Bot Protection with Puppeteer in 2026
Stay in the Loop
Get scraping insights, API tips, and platform updates. No spam — we only send when we have something worth reading.
Explore AlterLab
Anti-Bot Handling API
Automatic challenge handling for protected sites — works out of the box.
JavaScript Rendering API
Render SPAs and dynamic content with headless Chromium.
Pricing
5-tier pricing from $0.0002/page. Up to 5,000 free requests to start.
Documentation
API reference, SDKs, quickstart guides, and tutorials.
Web Scraping API Resources
Part of the Web Scraping API Documentation cluster
Complete API reference with 5-tier auto-escalation — Curl to challenge resolution.
Pillar pageConfigure Tier 4 browser rendering for SPAs and dynamic content.
Scrape pages behind login using session management.
Real success rates and cost data across all 5 tiers.
MCP Server, Python SDK, and Firecrawl-compatible API for AI agent workflows.