{
  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}