{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Rakuten Product & Hotel Search (Official API)",
    "description": "Search Rakuten Ichiba products and Rakuten Travel hotels via the official Rakuten Web Service APIs (JSON). You supply your own Rakuten application ID / access key. Unofficial; not affiliated with Rakuten Group.",
    "version": "0.1",
    "x-build-id": "iLXyqvwo5qCQ8akkH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~japan-rakuten-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-japan-rakuten-api",
        "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/jpopendata~japan-rakuten-api/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-japan-rakuten-api",
        "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/jpopendata~japan-rakuten-api/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-japan-rakuten-api",
        "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"
        ],
        "properties": {
          "mode": {
            "title": "Which Rakuten API",
            "enum": [
              "ichiba_items",
              "travel_hotels"
            ],
            "type": "string",
            "description": "Choose the sub-API to call: `ichiba_items` (default) = Rakuten Ichiba product search (set keyword / genreId / itemCode / shopCode), or `travel_hotels` = Rakuten Travel hotel/ryokan search (set middleClassCode, or latitude+longitude, or hotelNo). Aliases \"ichiba\"/\"travel\"/\"hotels\" are accepted. Example: \"ichiba_items\".",
            "default": "ichiba_items"
          },
          "applicationId": {
            "title": "Your Rakuten application ID (required)",
            "type": "string",
            "description": "REQUIRED. YOUR OWN Rakuten application ID (a 19-digit number from the Rakuten Web Service app dashboard). This Actor does NOT bundle a shared key — every request runs under your application ID so it stays within your own Rakuten Web Service agreement, and Rakuten's per-app rate limit applies to you. Register a free app (up to 5 per developer): https://webservice.rakuten.co.jp/ → アプリID発行 → copy the アプリID/developerId."
          },
          "accessKey": {
            "title": "Your Rakuten access key (recommended)",
            "type": "string",
            "description": "Your Rakuten access key (アクセスキー), shown next to the application ID in the Rakuten Web Service app dashboard. The current Rakuten endpoint versions require it alongside the application ID (older apps may work without it)."
          },
          "affiliateId": {
            "title": "Rakuten affiliate ID (optional)",
            "type": "string",
            "description": "Optional. Your Rakuten affiliate ID. When set, each record includes an affiliateUrl. Note: Rakuten's terms permit earning income from this data only via Rakuten Affiliate (第10条(4))."
          },
          "keyword": {
            "title": "[Ichiba] Search keyword",
            "type": "string",
            "description": "[Ichiba] Free-text product keyword (e.g. \"緑茶\", \"Nintendo Switch\"). Japanese matches best. Ichiba mode: at least ONE of keyword / genreId / itemCode / shopCode is required."
          },
          "genreId": {
            "title": "[Ichiba] Genre ID",
            "type": "string",
            "description": "[Ichiba] Rakuten Ichiba genre ID to restrict results (numeric, e.g. \"100316\"). Discover IDs with Rakuten's genre-search API."
          },
          "itemCode": {
            "title": "[Ichiba] Item code",
            "type": "string",
            "description": "[Ichiba] Exact Rakuten item code in the form shopCode:itemId (e.g. \"shop-name:10000123\") to look up a specific product."
          },
          "shopCode": {
            "title": "[Ichiba] Shop code",
            "type": "string",
            "description": "[Ichiba] Restrict results to a single Rakuten Ichiba shop by its shop code (the shop slug in the URL, e.g. \"rakuten24\")."
          },
          "minPrice": {
            "title": "[Ichiba] Minimum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "[Ichiba] Lower price bound in yen (inclusive, whole number, e.g. 500)."
          },
          "maxPrice": {
            "title": "[Ichiba] Maximum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "[Ichiba] Upper price bound in yen (inclusive, whole number, e.g. 3000). Must be >= minPrice."
          },
          "sort": {
            "title": "[Ichiba] Sort order",
            "enum": [
              "standard",
              "+itemPrice",
              "-itemPrice",
              "-reviewCount",
              "+reviewCount",
              "-reviewAverage",
              "+reviewAverage",
              "-affiliateRate",
              "+affiliateRate",
              "-updateTimestamp",
              "+updateTimestamp"
            ],
            "type": "string",
            "description": "[Ichiba] Result ordering. `standard` relevance (default), `+itemPrice`/`-itemPrice` price asc/desc, `-reviewCount` most reviewed, `-reviewAverage` best rated, `-updateTimestamp` newest. Aliases such as \"price_asc\", \"cheapest\", \"newest\" are accepted via the API."
          },
          "largeClassCode": {
            "title": "[Travel] Country class code",
            "type": "string",
            "description": "Rakuten Travel large class code. Defaults to `japan`.",
            "default": "japan"
          },
          "middleClassCode": {
            "title": "[Travel] Prefecture class code",
            "type": "string",
            "description": "[Travel] Rakuten Travel middle class code = prefecture, lower-case romaji, e.g. \"tokyo\", \"osaka\", \"kyoto\", \"hokkaido\", \"okinawa\". Travel mode requires this, OR latitude+longitude, OR hotelNo. Discover codes with Rakuten's GetAreaClass API."
          },
          "smallClassCode": {
            "title": "[Travel] City / area class code",
            "type": "string",
            "description": "[Travel] Rakuten Travel small class code (city/area within the prefecture, e.g. \"shinjuku\"). Requires middleClassCode."
          },
          "detailClassCode": {
            "title": "[Travel] Detailed area class code",
            "type": "string",
            "description": "[Travel] Rakuten Travel detail class code (a sub-area, e.g. \"A\"). Requires smallClassCode."
          },
          "latitude": {
            "title": "[Travel] Latitude (decimal degrees)",
            "type": "string",
            "description": "[Travel] Latitude for a geo radius search, decimal degrees (WGS84), e.g. \"35.6895\". Provide together with longitude."
          },
          "longitude": {
            "title": "[Travel] Longitude (decimal degrees)",
            "type": "string",
            "description": "[Travel] Longitude for a geo radius search, decimal degrees (WGS84), e.g. \"139.6917\". Provide together with latitude."
          },
          "searchRadius": {
            "title": "[Travel] Search radius (km)",
            "type": "string",
            "description": "[Travel] Radius for a geo search, 0.1 to 3.0 km (one decimal, e.g. \"3.0\"). Defaults to 3.0 when a geo search is used."
          },
          "hotelNo": {
            "title": "[Travel] Hotel number",
            "type": "string",
            "description": "[Travel] Look up a single Rakuten Travel facility by its hotelNo (the number in the hotel's travel.rakuten.co.jp URL, e.g. \"1234\")."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Maximum number of records to output (1-3000, default 100). The upstream paginates 30 hits per request up to page 100 (~3000 hits per query).",
            "default": 100
          },
          "maxApiRequests": {
            "title": "Max upstream requests per run",
            "minimum": 1,
            "maximum": 110,
            "type": "integer",
            "description": "Hard safety cap on API requests per run (1-110, default 5; each page = up to 30 items). Politeness (1 connection, >= 1.1 s spacing per Rakuten's ~1 req/sec limit, exponential backoff on 429/5xx) is enforced in code.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Default is NO proxy (direct connection) — an official JSON API rarely needs one. The Actor backs off exponentially on 429/5xx and fails visibly on a persistent block; it never attempts rate-limit evasion.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}