Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIRakuten

    rakuten.travel_search

    A page of places to stay in Japan on Rakuten Travel for words: name, star rating, review count, lowest price a night, area and what matched.

    Id
    rakuten.travel_search
    Version
    1
    Billed per
    request — 1 unit for a charged run
    Runs
    within one request

    Start it with POST /v1/scrapers/rakuten.travel_search/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.

    Inputs

    The fields of input. A field that is not listed here is refused.

    Inputs of rakuten.travel_search
    FieldTypeDescription
    keywordsrequiredstringWhat to search for, in Japanese or in Latin letters: a town, an area, a station, a hotel's name or chain, a kind of stay (京都, 箱根 温泉, Hilton).Limit: at least 1 characters, at most 50 characters.
    sort"recommended" | "price_low" | "price_high" | "best_rated"The order: the site's recommended order (default), cheapest or dearest lowest price, or best rated.Default: "recommended".
    pageintegerWhich page of results, from 1; 30 places a page.Limit: 1 to 100. Default: 1.

    Record fields

    Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.

    Record fields of rakuten.travel_search
    FieldTypeNotes
    positionintegerThe place's place in the results, from 1 across pages (30 a page).
    hotel_idstringRakuten Travel's number of the place. rakuten.travel_hotel takes it.
    urlstringThe place's page on travel.rakuten.co.jp.
    namestringThe place's name as the site writes it (often in full-width letters).
    starsnumber or nullThe average of its guests' ratings as the page draws it, in whole and half stars out of 5; null for a place without reviews. rakuten.travel_hotel gives the exact average.
    review_countinteger or nullHow many reviews (お客さまの声) the place has.
    lowest_priceinteger or nullThe lowest price the site estimates for a room a night, in yen, tax included (最安料金(目安)).
    lowest_price_before_taxinteger or nullThe same price before consumption tax, as the page writes it first.
    currencystringAlways JPY.Default: "JPY".
    areastring or nullThe prefecture and areas the site files the place under, e.g. 京都府 京都 京都駅.
    summarystring or nullThe place's own line about itself (特徴).
    matchesobject of string valuesThe details the words were found in, as label and text in Japanese: 住所 (address), アクセス (access), 館内設備 (facilities), その他設備・サービス, 風呂情報 (baths).
    plans_matchedinteger or nullHow many of the place's plans (rooms and offers) the words were found in.
    imagestring or nullThe place's picture.
    total_resultsinteger or nullHow many places the site says match the search, the same on every record.
    fetched_atstring (date-time)When the site answered, in UTC.

    Example request

    # Start a run and wait up to 60 seconds for it to finish
    curl -X POST "https://api.enrichednow.com/v1/scrapers/rakuten.travel_search/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"keywords":"京都"}}'
    
    # Read its records, with the id the first call answered
    curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
    from enrichednow import EnrichedNow
    
    client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY
    
    # Start a run, wait for it to end, and get its records
    result = client.scrape("rakuten.travel_search", {"keywords": "京都"})
    print(result.run.id, result.run.status, result.run.record_count)
    
    # Read its records: pages are fetched as you go
    for record in result.records:
        print(record)

    Install it with pip install enrichednow, then save as run.py and run python3 run.py

    import EnrichedNow from "enrichednow";
    
    const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
    
    // Start a run, wait for it to end, and get its records
    const { run, records } = await client.scrape("rakuten.travel_search", { keywords: "京都" });
    console.log(run.id, run.status, run.record_count);
    
    // Read its records: pages are fetched as you go
    for await (const record of records) console.log(record);

    Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"time"
    
    	enrichednow "github.com/enrichednow/enrichednow-go"
    )
    
    func main() {
    	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
    	if err != nil {
    		log.Fatal(err)
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
    	defer cancel()
    
    	// Start a run, wait for it to end, and get its records
    	run, records, err := client.Scrape(ctx, "rakuten.travel_search", map[string]any{"keywords": "京都"})
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(run.ID, run.Status, run.RecordCount)
    
    	// Read its records: pages are fetched as you go
    	for records.Next() {
    		fmt.Println(string(records.Current()))
    	}
    	if err := records.Err(); err != nil {
    		log.Fatal(err)
    	}
    }

    Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

    import com.enrichednow.EnrichedNowClient;
    import com.enrichednow.ScrapeResult;
    import java.util.Map;
    
    public class Run {
        public static void main(String[] args) {
            EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
    
            // Start a run, wait for it to end, and get its records
            ScrapeResult result = client.scrape("rakuten.travel_search", Map.of("keywords", "\u4eac\u90fd"));
            System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
    
            // Read its records: pages are fetched as you go
            for (Map<String, Object> record : result.records()) {
                System.out.println(record);
            }
        }
    }

    Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

    enrichednow run rakuten.travel_search --input 'keywords=京都'

    Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

    It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.

    The body on its own:

    JSON
    {
      "input": {
        "keywords": "京都"
      }
    }

    Example response

    The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.

    JSON
    {
      "id": "run_841742f37553189ff9c27ba1",
      "scraper_id": "rakuten.travel_search",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "keywords": "京都"
      },
      "record_count": 1,
      "units": 1,
      "units_per_request": 1,
      "units_per_record": null,
      "units_per_page": null,
      "diagnostics": {
        "requests": 1,
        "bytes": 259214,
        "wall_ms": 885,
        "facts": {}
      },
      "created_at": "2026-11-16T22:37:50.170950Z",
      "started_at": "2026-11-16T22:37:50.178331Z",
      "finished_at": "2026-11-16T22:37:51.066313Z"
    }

    Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.

    JSON
    {
      "records": [
        {
          "position": 1,
          "hotel_id": "179147",
          "url": "https://travel.rakuten.co.jp/HOTEL/179147/179147.html",
          "name": "レフ京都八条口byベッセルホテルズ|REF京都八条口(京都2号店)",
          "stars": 4.5,
          "review_count": 751,
          "lowest_price": 5700,
          "lowest_price_before_tax": 5182,
          "currency": "JPY",
          "area": "京都府 京都 京都駅",
          "summary": "2021年開業!Wi-Fi全室無料。京都駅八条口から徒歩約3分。京都の今を感じるホテルです。",
          "matches": {
            "住所": "京都府京都市南区東九条室町57番地",
            "アクセス": "JR「京都駅」八条口より徒歩にて約3分。京都東ICから約20分■京都南ICから約29分"
          },
          "plans_matched": 14,
          "image": "https://img.travel.rakuten.co.jp/image/imgr_90?no=179147",
          "total_results": 3195,
          "fetched_at": "2026-11-19T22:28:10.851364Z"
        }
      ],
      "next_cursor": null
    }

    A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Rakuten scrapers are in their own section there.