# Traveloka Hotels Scraper — Bulk Hotel Data by City (Keyless) (`galih_rakasiwi/traveloka-hotels-scraper`) Actor

Scrape Traveloka hotels in bulk by city or region: names, prices in IDR, star and guest ratings, full address and coordinates, amenities, check-in times, 100 photos and guest reviews. Keyless — no API key, no browser, no captcha.

- **URL**: https://apify.com/galih_rakasiwi/traveloka-hotels-scraper.md
- **Developed by:** [RD.Galih Rakasiwi](https://apify.com/galih_rakasiwi) (community)
- **Categories:** Travel, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 hotels

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Traveloka Hotels Scraper — Bulk Hotel Data by City

Scrape Traveloka hotel listings **in bulk by city or region** and get clean,
typed JSON per hotel: name, price, currency, star rating, guest rating, review
count, full address, GPS coordinates, amenities, check-in/out times, room and
building facts, photos and up to 20 recent guest reviews.

Keyless and browserless: Traveloka serves its server-rendered SEO pages to a
crawler user agent, so the actor reads the embedded `__NEXT_DATA__` JSON with
`curl_cffi` (Safari TLS fingerprint). No API key, no login, no captcha solver.

### Why this actor

Most Traveloka actors on Apify look hotels up one URL at a time. This one
crawls a **whole region** — Traveloka reports up to 10,000 hotels for a region
such as Bali (21 per page, ~477 pages) — and paginates with area paths
(`indonesia/area/ubud-102771`) for city-level market sampling.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `regionPaths` | array | Bali region | Traveloka region/area paths or full URLs (e.g. `indonesia/region/bali-102746`, `indonesia/area/ubud-102771`) |
| `locale` | select | `id-id` | `id-id`, `en-id`, `en-sg`, `en-my`, `th-th`, `vi-vn` |
| `maxPages` | integer | `1` | Listing pages per region (21 hotels each); `0` = all |
| `maxHotels` | integer | `100` | Hard cap across all regions; `0` = unlimited |
| `includeDetails` | boolean | `true` | Fetch the hotel detail page (address, GPS, amenities, reviews) |
| `includeReviews` | boolean | `true` | Attach up to 20 recent guest reviews |
| `requestDelaySeconds` | number | `0.7` | Polite pause between requests |
| `maxRetries` | integer | `3` | Retries with exponential backoff |
| `proxyConfiguration` | proxy | disabled (direct) | Traveloka SEO pages are reachable directly from Apify's datacenter IPs (proven). If a run is challenged, enable an Apify residential proxy — the client switches to it automatically after a 403/405/429 |

### Output

One dataset record per hotel. Money fields use `<name>_amount` plus
`currency_code`; missing values are `null`, never `""`.

```json
{
  "id": "3000020019601",
  "name": "The Apurva Kempinski Bali",
  "accommodation_type": "Hotel",
  "star_rating": 5.0,
  "user_rating": 9.1,
  "review_count": 2704,
  "rating_label": "Exceptional",
  "price_amount": 5078534.0,
  "currency_code": "IDR",
  "address": "Jalan Raya Nusa Dua Selatan, Sawangan, Nusa Dua, Bali, ...",
  "city": "Badung",
  "province": "Bali",
  "country_code": "ID",
  "latitude": -8.828413,
  "longitude": 115.216006,
  "area_name": "Nusa Dua Beach",
  "facility_tags": ["POOL", "SPA", "SAUNA", "RESTAURANT", "..."],
  "image_count": 100,
  "main_image_url": "https://img.cnt.traveloka.com/...",
  "hotel_url": "https://www.traveloka.com/id-id/hotel/indonesia/...",
  "reviews": [
    {
      "review_id": "EXPEDIA-...",
      "author": "Mark",
      "score": 10.0,
      "max_score": 10.0,
      "text": "Well worth it! Very friendly staff...",
      "trip_type": "friends",
      "published_at": "2022-06-14T18:57:01+00:00",
      "reply_text": null
    }
  ],
  "scraped_at": "2026-11-12T03:00:00+00:00"
}
```

The run summary (pages fetched, hotels written, listing/detail errors) is stored
in the key-value store under `SUMMARY`.

The actor ships a full **dataset schema**: every field is typed and documented,
with two ready-made views — **Hotels** (name, rating, price, location, link) and
**All fields** (everything, including amenities and nested reviews). The output
schema exposes the dataset as JSON/CSV plus the summary record and the run
console.

### Pricing

Pay per delivered hotel record — **one `hotel` event per record**. Nothing is
charged for a listing or detail page that fails, and the summary record is free.
Records are only charged after they are pushed to the dataset.

| Tier | USD / hotel |
|---|---|
| FREE | 0.0035 |
| BRONZE | 0.0032 |
| SILVER | 0.0028 |
| GOLD | 0.0024 |
| PLATINUM | 0.0024 |
| DIAMOND | 0.0024 |

Example: 100 hotels with details and reviews (the default input) = 100 events =
**$0.35** of usage on the FREE tier, plus the platform's normal compute and proxy
costs. Set `includeDetails: false` for a cheaper listing-only run.

### Limitations

- **Price is a snapshot** of the region page's default stay window, not a quote
  for a user-chosen date.
- Traveloka caps region listings at **10,000 hotels**; use area paths to reach
  smaller sub-markets.
- Descriptions, policies and review bodies are kept in the source language;
  structured fields and labels are English.
- A Traveloka frontend release can rename `__NEXT_DATA__` fields; the parser
  degrades to nulls and records `detail_available: false` instead of crashing.

See [RE.md](RE.md) for the proven endpoint recipe, the DataDome behavior and the
failure modes per IP class.

# Actor input Schema

## `regionPaths` (type: `array`):

Traveloka hotel region or area paths (or full Traveloka URLs). Examples: indonesia/region/bali-102746, indonesia/area/ubud-102771, indonesia/region/jakarta-102749. A region page holds up to 10,000 hotels across ~477 pages.

## `locale` (type: `string`):

Traveloka locale. Prices are returned in the locale's currency (IDR for Indonesian locales).

## `maxPages` (type: `integer`):

How many listing pages (21 hotels each) to crawl per region. 0 means all pages — a full Bali region is ~477 pages / 10,000 hotels.

## `maxHotels` (type: `integer`):

Hard cap on delivered hotel records across all regions. 0 means unlimited. Each record is billed as one 'hotel' event.

## `includeDetails` (type: `boolean`):

One extra request per hotel adds address, GPS coordinates, amenities, check-in/out times, room/floor counts, breakfast charge and photos. Turn off for a fast listing-only run.

## `includeReviews` (type: `boolean`):

Attach up to 20 recent guest reviews (score, text, trip type, reply) to each hotel record. Requires 'Fetch full hotel details'.

## `requestDelaySeconds` (type: `number`):

Polite pause between requests. Raise it if you see repeated 403/429 responses.

## `maxRetries` (type: `integer`):

Retries with exponential backoff on 403/429/5xx and network errors.

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

Apify proxy settings. Leave disabled (recommended): Traveloka's SEO pages are reachable directly from Apify's datacenter IPs. If a run is rate-limited, enable an Apify residential proxy; the actor switches to it automatically after a 403/405/429.

## Actor input object example

```json
{
  "regionPaths": [
    "indonesia/region/bali-102746"
  ],
  "locale": "id-id",
  "maxPages": 1,
  "maxHotels": 100,
  "includeDetails": true,
  "includeReviews": true,
  "requestDelaySeconds": 0.7,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

All hotel records as clean JSON — one object per hotel.

## `datasetCsv` (type: `string`):

The same hotel records as a CSV download.

## `summary` (type: `string`):

Pages fetched, hotels written, list of region summaries and any listing/detail errors (KEY_VALUE_STORE record SUMMARY).

## `runConsole` (type: `string`):

Logs, storage and metrics.

# 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 = {
    "regionPaths": [
        "indonesia/region/bali-102746"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("galih_rakasiwi/traveloka-hotels-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 = {
    "regionPaths": ["indonesia/region/bali-102746"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("galih_rakasiwi/traveloka-hotels-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "regionPaths": [
    "indonesia/region/bali-102746"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call galih_rakasiwi/traveloka-hotels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,galih_rakasiwi/traveloka-hotels-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Zfz9noHYRri9yZNZc/builds/ZZyb3oqPKqNtSZXeI/openapi.json
