# Rakuten Travel Japan Hotel Scraper (`piquno/rakuten-travel-scraper`) Actor

Scrape hotel data from Rakuten Travel Japan using the official API. Search by keyword, area, coordinates, or hotel number. Get pricing, ratings, reviews, availability, and details for hotels and ryokans across Japan.

- **URL**: https://apify.com/piquno/rakuten-travel-scraper.md
- **Developed by:** [Piquno](https://apify.com/piquno) (community)
- **Categories:** Travel, E-commerce, Lead generation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $80.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

## Rakuten Travel Japan Hotel Scraper

An Apify Actor that scrapes hotel data from **Rakuten Travel** — Japan's largest online travel platform — using the official Rakuten API.

### Features

- **4 search modes**: Keyword, Area Code, GPS Coordinates, or Hotel Number
- **Availability search**: Add check-in/out dates to get live room availability and pricing
- **Detailed data**: Hotel info, ratings, reviews, images, access directions, facilities
- **Pagination**: Automatically fetches multiple pages (30 hotels per page)
- **Rate-limit safe**: Built-in delays between API calls

### Prerequisites

You need a free **Rakuten Application ID** and **Access Key**:

1. Go to [https://webservice.rakuten.co.jp/](https://webservice.rakuten.co.jp/)
2. Create a Rakuten account (or sign in)
3. Register a new application to get your **Application ID** and **Access Key**
4. Paste both into the Actor's input fields

### Input Examples

#### Keyword search (simplest)
```json
{
    "applicationId": "YOUR_APP_ID",
    "accessKey": "YOUR_ACCESS_KEY",
    "searchType": "keyword",
    "keyword": "東京 温泉"
}
````

#### Area search (Tokyo, Shinjuku)

```json
{
    "applicationId": "YOUR_APP_ID",
    "accessKey": "YOUR_ACCESS_KEY",
    "searchType": "area",
    "largeClassCode": "japan",
    "middleClassCode": "tokyo",
    "smallClassCode": "shinjuku"
}
```

#### Coordinate search (near Tokyo Station)

```json
{
    "applicationId": "YOUR_APP_ID",
    "accessKey": "YOUR_ACCESS_KEY",
    "searchType": "coordinates",
    "latitude": 35.6812,
    "longitude": 139.7671,
    "searchRadius": 1
}
```

#### Availability search with dates

```json
{
    "applicationId": "YOUR_APP_ID",
    "accessKey": "YOUR_ACCESS_KEY",
    "searchType": "area",
    "largeClassCode": "japan",
    "middleClassCode": "osaka",
    "checkinDate": "2026-05-01",
    "checkoutDate": "2026-05-03",
    "adultNum": 2,
    "rooms": 1
}
```

### Output Fields

| Field | Description |
|-------|-------------|
| `hotelName` | Hotel name (Japanese) |
| `hotelMinCharge` | Minimum price per night (JPY) |
| `reviewAverage` | Average review score |
| `reviewCount` | Number of reviews |
| `address1` | Prefecture |
| `address2` | Full address |
| `access` | Access/directions |
| `hotelImageUrl` | Main image URL |
| `hotelInformationUrl` | Rakuten hotel page URL |
| `availablePlans` | Room plans (when using availability search) |
| `serviceAverage`, `locationAverage`, etc. | Detailed rating breakdown |

### Common Area Codes (middleClassCode)

`tokyo`, `osaka`, `kyoto`, `hokkaido`, `okinawa`, `fukuoka`, `hiroshima`, `nagoya` (aichi), `yokohama` (kanagawa), `nara`, `kobe` (hyogo)

### Deploy

```bash
apify push
```

### Tech Stack

Python 3.12, Apify SDK, httpx

# Actor input Schema

## `applicationId` (type: `string`):

Your Rakuten API Application ID. Get one free at https://webservice.rakuten.co.jp/

## `accessKey` (type: `string`):

Your Rakuten API Access Key. Get one free at https://webservice.rakuten.co.jp/

## `searchType` (type: `string`):

How to search for hotels.

## `keyword` (type: `string`):

Search keyword (e.g. '東京 温泉', 'Shinjuku'). Used when searchType is 'keyword'.

## `largeClassCode` (type: `string`):

Country code for area search. Almost always 'japan'.

## `middleClassCode` (type: `string`):

Prefecture code (e.g. 'tokyo', 'osaka', 'hokkaido', 'kyoto').

## `smallClassCode` (type: `string`):

City/area code (e.g. 'shinjuku', 'shibuya').

## `latitude` (type: `number`):

Latitude for coordinate search (e.g. 35.6762).

## `longitude` (type: `number`):

Longitude for coordinate search (e.g. 139.6503).

## `searchRadius` (type: `number`):

Radius in km for coordinate search (max 3).

## `hotelNo` (type: `string`):

Comma-separated Rakuten hotel numbers (e.g. '136197,147408'). Max 15.

## `checkinDate` (type: `string`):

Check-in date (YYYY-MM-DD) for availability search. Leave empty to skip availability.

## `checkoutDate` (type: `string`):

Check-out date (YYYY-MM-DD) for availability search.

## `adultNum` (type: `integer`):

Adults per room (for availability search).

## `rooms` (type: `integer`):

Number of rooms (for availability search).

## `maxCharge` (type: `integer`):

Maximum price per night in JPY. Leave empty for no limit.

## `minCharge` (type: `integer`):

Minimum price per night in JPY.

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

Max result pages to fetch (30 hotels per page).

## `fetchDetails` (type: `boolean`):

Fetch additional details (facilities, rooms) for each hotel via HotelDetailSearch API. Slower but richer data.

## Actor input object example

```json
{
  "searchType": "keyword",
  "keyword": "東京",
  "largeClassCode": "japan",
  "searchRadius": 3,
  "adultNum": 2,
  "rooms": 1,
  "maxPages": 5,
  "fetchDetails": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("piquno/rakuten-travel-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("piquno/rakuten-travel-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 '{}' |
apify call piquno/rakuten-travel-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Rakuten Travel Japan Hotel Scraper",
        "description": "Scrape hotel data from Rakuten Travel Japan using the official API. Search by keyword, area, coordinates, or hotel number. Get pricing, ratings, reviews, availability, and details for hotels and ryokans across Japan.",
        "version": "1.0",
        "x-build-id": "9wN5Tp3hvrd3Ayqyc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/piquno~rakuten-travel-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-piquno-rakuten-travel-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/piquno~rakuten-travel-scraper/runs": {
            "post": {
                "operationId": "runs-sync-piquno-rakuten-travel-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/piquno~rakuten-travel-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-piquno-rakuten-travel-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",
                "required": [
                    "applicationId",
                    "accessKey"
                ],
                "properties": {
                    "applicationId": {
                        "title": "Rakuten Application ID",
                        "type": "string",
                        "description": "Your Rakuten API Application ID. Get one free at https://webservice.rakuten.co.jp/"
                    },
                    "accessKey": {
                        "title": "Rakuten Access Key",
                        "type": "string",
                        "description": "Your Rakuten API Access Key. Get one free at https://webservice.rakuten.co.jp/"
                    },
                    "searchType": {
                        "title": "Search Type",
                        "enum": [
                            "keyword",
                            "area",
                            "coordinates",
                            "hotelNo"
                        ],
                        "type": "string",
                        "description": "How to search for hotels.",
                        "default": "keyword"
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Search keyword (e.g. '東京 温泉', 'Shinjuku'). Used when searchType is 'keyword'.",
                        "default": "東京"
                    },
                    "largeClassCode": {
                        "title": "Large Class Code (Country)",
                        "type": "string",
                        "description": "Country code for area search. Almost always 'japan'.",
                        "default": "japan"
                    },
                    "middleClassCode": {
                        "title": "Middle Class Code (Prefecture)",
                        "type": "string",
                        "description": "Prefecture code (e.g. 'tokyo', 'osaka', 'hokkaido', 'kyoto')."
                    },
                    "smallClassCode": {
                        "title": "Small Class Code (City/Area)",
                        "type": "string",
                        "description": "City/area code (e.g. 'shinjuku', 'shibuya')."
                    },
                    "latitude": {
                        "title": "Latitude (WGS84 degrees)",
                        "type": "number",
                        "description": "Latitude for coordinate search (e.g. 35.6762)."
                    },
                    "longitude": {
                        "title": "Longitude (WGS84 degrees)",
                        "type": "number",
                        "description": "Longitude for coordinate search (e.g. 139.6503)."
                    },
                    "searchRadius": {
                        "title": "Search Radius (km)",
                        "minimum": 0.1,
                        "maximum": 3,
                        "type": "number",
                        "description": "Radius in km for coordinate search (max 3).",
                        "default": 3
                    },
                    "hotelNo": {
                        "title": "Hotel Number(s)",
                        "type": "string",
                        "description": "Comma-separated Rakuten hotel numbers (e.g. '136197,147408'). Max 15."
                    },
                    "checkinDate": {
                        "title": "Check-in Date",
                        "type": "string",
                        "description": "Check-in date (YYYY-MM-DD) for availability search. Leave empty to skip availability."
                    },
                    "checkoutDate": {
                        "title": "Check-out Date",
                        "type": "string",
                        "description": "Check-out date (YYYY-MM-DD) for availability search."
                    },
                    "adultNum": {
                        "title": "Number of Adults",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Adults per room (for availability search).",
                        "default": 2
                    },
                    "rooms": {
                        "title": "Number of Rooms",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Number of rooms (for availability search).",
                        "default": 1
                    },
                    "maxCharge": {
                        "title": "Max Price (JPY)",
                        "type": "integer",
                        "description": "Maximum price per night in JPY. Leave empty for no limit."
                    },
                    "minCharge": {
                        "title": "Min Price (JPY)",
                        "type": "integer",
                        "description": "Minimum price per night in JPY."
                    },
                    "maxPages": {
                        "title": "Max Pages",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Max result pages to fetch (30 hotels per page).",
                        "default": 5
                    },
                    "fetchDetails": {
                        "title": "Fetch Hotel Details",
                        "type": "boolean",
                        "description": "Fetch additional details (facilities, rooms) for each hotel via HotelDetailSearch API. Slower but richer data.",
                        "default": 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
