# Rakuten Travel Reviews Scraper (`huggable_quote/rakuten-travel-reviews-scraper`) Actor

Scrape structured hotel/ryokan reviews from Rakuten Travel (travel.rakuten.co.jp).

- **URL**: https://apify.com/huggable\_quote/rakuten-travel-reviews-scraper.md
- **Developed by:** [OrbitData Labs](https://apify.com/huggable_quote) (community)
- **Categories:** Travel, E-commerce, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

<p align="center">
  <img src=".actor/icon.svg" width="96" height="96" alt="Rakuten Travel Reviews Scraper icon"/>
</p>

## Rakuten Travel Reviews Scraper

Extract **structured hotel & ryokan reviews from [Rakuten Travel](https://travel.rakuten.co.jp)** (楽天トラベル) — Japan's largest accommodation review platform. This is a **review-only** actor: point it at a hotel and get every customer review as clean JSON, with ratings, sub-ratings, stay/posted dates, room & plan info, and hotel replies.

There is no other Rakuten Travel review-only actor on Apify Store. If you already use a Rakuten/Agoda hotel scraper for metadata, this is the matching review extractor.

### Run on Apify

This actor is deployed on the Apify platform: **[console.apify.com/actors/XxwoZr8npNCXBoQI8](https://console.apify.com/actors/XxwoZr8npNCXBoQI8)**

- **Console:** open the actor, fill in the *Input* tab, and click **Start**.
- **API:** `POST https://api.apify.com/v2/acts/huggable_quote~rakuten-travel-reviews-scraper/runs?token=<APIFY_TOKEN>` with the input JSON as the body.
- **CLI:** `apify call huggable_quote/rakuten-travel-reviews-scraper --input-file=input.json`

Results land in the run's default **dataset** (export as JSON / CSV / Excel from the Console or the API).

### What it does

- Collects **all reviews** for each hotel (or up to a per-hotel cap you set).
- Normalizes Japanese data: full-width → half-width numbers, Japanese dates (`2026年5月28日`) → **ISO-8601** (`2026-05-28`), clean UTF-8 text with **no HTML residue**.
- Captures **per-review sub-ratings** (room, service, location, bath, facilities, cleanliness — plus breakfast/dinner where available).
- Captures **hotel-level aggregates** (average rating, rating distribution, sub-rating averages) on the first record of each hotel.
- Captures the **hotel's reply** to each review.

### Input

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Rakuten Travel hotel/review URLs. Any URL containing the hotel number works, e.g. `https://review.travel.rakuten.co.jp/hotel/voice/5521` or `https://travel.rakuten.co.jp/HOTEL/5521/review.html`. |
| `hotelIds` | array | Hotel numbers (hotelNo) directly, e.g. `["5521"]`. Alternative to `startUrls`. |
| `maxReviewsPerHotel` | integer | Max reviews per hotel. `0` (default) = all available. |
| `requestDelayMs` | integer | Polite delay between requests (default `1000`). Rakuten tolerates ~1 req/s. |

Example:

```json
{
  "startUrls": [{ "url": "https://review.travel.rakuten.co.jp/hotel/voice/5521" }],
  "maxReviewsPerHotel": 0,
  "requestDelayMs": 1000
}
````

### Output

One dataset record per review:

```json
{
  "hotelId": "5521",
  "hotelName": "神戸ポートピアホテル",
  "reviewId": "fb2cec799cd8e6a8",
  "reviewUrl": "https://review.travel.rakuten.co.jp/hotel/voice/5521?page=1",
  "reviewerName": "shigeki777",
  "reviewerType": "家族",
  "tripPurpose": "レジャー",
  "reviewerAge": "60代",
  "reviewerGender": "男性",
  "reviewerReviewCount": 1,
  "overallRating": 4.0,
  "ratingScale": 5,
  "subRatings": { "room": 4.0, "service": 4.0, "location": 4.0, "bath": null, "facilities": 4.0, "cleanliness": 4.0 },
  "title": "30年ぶりの宿泊、南館は広くて快適でした",
  "text": "今回、30年ぶりに、宿泊しました。\n南館は…",
  "stayDate": "2026-05",
  "postedDate": "2026-05-28",
  "roomType": "南館サウスリゾートフォース(4名様)【禁煙】",
  "planName": "【事前決済限定】キャンセル・返金不可プラン 11時OUT<素泊まり>",
  "likeCount": null,
  "viewCount": 245,
  "replyFromHotel": "この度はポートピアホテルをご利用いただき…",
  "replyFromHotelDate": "2026-05-30",
  "scrapedAt": "2026-06-09T00:00:00+00:00",
  "hotelStats": {
    "displayedTotalReviewCount": 8136,
    "collectedReviewCount": 311,
    "averageRating": 4.41,
    "ratingDistribution": { "5": 2314, "4": 1490, "3": 261, "2": 101, "1": 65 },
    "subRatingAverages": { "room": 4.43, "service": 4.43, "location": 4.43, "breakfast": 4.57, "dinner": 4.54, "bath": 4.06, "facilities": 4.27, "cleanliness": 4.4 }
  }
}
```

Notes:

- `hotelStats` is attached to the **first record of each hotel** only; it is `null` on the rest.
- `displayedTotalReviewCount` is Rakuten's all-time displayed total (legacy お客さまの声). `collectedReviewCount` is the number actually browsable in the current クチコミ system — this is what the actor can collect.
- `stayDate` is `YYYY-MM` (Rakuten exposes only the stay month). `postedDate` and `replyFromHotelDate` are `YYYY-MM-DD`.
- `reviewerType` = companion type (家族/一人/カップル …); `tripPurpose` = レジャー/ビジネス.
- Some reviews are photo-only and legitimately have an empty `text`.
- Reviewer info is limited to the public display nickname Rakuten shows — no personal data is reconstructed.

### How it works

Pure Python: `httpx` fetches the server-rendered review pages and `BeautifulSoup` parses them (no headless browser needed). The actor stops immediately and logs clearly if it ever sees a block/CAPTCHA — it does not attempt evasion.

### Local development

```bash
pip install -r requirements.txt
python -m tests.test_live      # live parse + normalization validation
apify run                      # run the actor locally (Apify CLI)
apify push                     # deploy to the Apify platform
```

### Actor icon

The icon lives at [`.actor/icon.svg`](.actor/icon.svg). Apify sets the Store icon via the Console (it is not applied by `apify push`): open the actor → **Settings → Display information → Icon** and upload `.actor/icon.svg`.

# Actor input Schema

## `startUrls` (type: `array`):

Rakuten Travel hotel or review page URLs. Any URL containing the hotel number works, e.g. https://review.travel.rakuten.co.jp/hotel/voice/5521 or https://travel.rakuten.co.jp/HOTEL/5521/review.html

## `hotelIds` (type: `array`):

Rakuten Travel hotel numbers (hotelNo) to scrape, as an alternative to Start URLs. Example: 5521.

## `maxReviewsPerHotel` (type: `integer`):

Maximum reviews to collect per hotel. Use 0 (or leave empty) to collect all available reviews.

## `requestDelayMs` (type: `integer`):

Polite delay between page requests. Rakuten Travel tolerates ~1 request/second; lower values increase block risk.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://review.travel.rakuten.co.jp/hotel/voice/5521"
    }
  ],
  "hotelIds": [],
  "maxReviewsPerHotel": 0,
  "requestDelayMs": 1000
}
```

# Actor output Schema

## `reviews` (type: `string`):

All scraped reviews as dataset items in JSON.

## `reviewsCsv` (type: `string`):

All scraped reviews exported as CSV.

## `datasetInConsole` (type: `string`):

View the run and browse its dataset in the Console.

# 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 = {
    "startUrls": [
        {
            "url": "https://review.travel.rakuten.co.jp/hotel/voice/5521"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("huggable_quote/rakuten-travel-reviews-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 = { "startUrls": [{ "url": "https://review.travel.rakuten.co.jp/hotel/voice/5521" }] }

# Run the Actor and wait for it to finish
run = client.actor("huggable_quote/rakuten-travel-reviews-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 '{
  "startUrls": [
    {
      "url": "https://review.travel.rakuten.co.jp/hotel/voice/5521"
    }
  ]
}' |
apify call huggable_quote/rakuten-travel-reviews-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Rakuten Travel Reviews Scraper",
        "description": "Scrape structured hotel/ryokan reviews from Rakuten Travel (travel.rakuten.co.jp).",
        "version": "0.1",
        "x-build-id": "4JlVsZDeuk3f87Eev"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/huggable_quote~rakuten-travel-reviews-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-huggable_quote-rakuten-travel-reviews-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/huggable_quote~rakuten-travel-reviews-scraper/runs": {
            "post": {
                "operationId": "runs-sync-huggable_quote-rakuten-travel-reviews-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/huggable_quote~rakuten-travel-reviews-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-huggable_quote-rakuten-travel-reviews-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": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Rakuten Travel hotel or review page URLs. Any URL containing the hotel number works, e.g. https://review.travel.rakuten.co.jp/hotel/voice/5521 or https://travel.rakuten.co.jp/HOTEL/5521/review.html",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "hotelIds": {
                        "title": "Hotel IDs",
                        "type": "array",
                        "description": "Rakuten Travel hotel numbers (hotelNo) to scrape, as an alternative to Start URLs. Example: 5521.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxReviewsPerHotel": {
                        "title": "Max reviews per hotel",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum reviews to collect per hotel. Use 0 (or leave empty) to collect all available reviews.",
                        "default": 0
                    },
                    "requestDelayMs": {
                        "title": "Delay between requests (ms)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Polite delay between page requests. Rakuten Travel tolerates ~1 request/second; lower values increase block risk.",
                        "default": 1000
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
