{
  "openapi": "3.0.1",
  "info": {
    "title": "Rakuma Scraper – Rakuten Flea Market Japan (楽天ラクマ)",
    "description": "Scrape Rakuma (fril.jp, 楽天ラクマ) — Rakuten's flea-market app, Japan's #2 C2C marketplace: fashion, brand bags, sneakers, hobby. Search by keyword, brand, category, price, condition, sold-out; get normalized size, condition rank, seller and images. JP Data Works series.",
    "version": "0.2",
    "x-build-id": "MRBUeU2Y4HbPYSnQY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tokyo-select-jp~rakuma-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tokyo-select-jp-rakuma-search-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/tokyo-select-jp~rakuma-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tokyo-select-jp-rakuma-search-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/tokyo-select-jp~rakuma-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tokyo-select-jp-rakuma-search-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": {
          "keywords": {
            "title": "Keywords",
            "uniqueItems": true,
            "type": "array",
            "description": "Simple keyword searches, one per line — brand names, item types, model numbers, Japanese or English (e.g. `KAPITAL`, `リーバイス 501`, `Porter タンカー`). Each keyword is one search and inherits the defaults below. Optional when `searches` is set.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Structured searches",
            "type": "array",
            "description": "Advanced searches as JSON objects. Every field is optional, but each search needs at least one of `keyword`, `brand`, `brandId`, `categoryPath`, `categoryId`.\n\n- `keyword` — free text (site keyword search).\n- `brand` — brand name as listed on Rakuma (e.g. `KAPITAL`, `COMME des GARCONS`); resolved to the site's brand id through one keyword search. `brandId` — that id directly (1785 = KAPITAL).\n- `categoryPath` — `mens`, `ladies`, `kids`, or a path such as `mens > jackets`, `メンズ > パンツ > デニム/ジーンズ`, `ladies > バッグ`; `categoryId` — the site's category id (542 = メンズ > ジャケット/アウター > Gジャン/デニムジャケット).\n- `priceMinJpy` / `priceMaxJpy` — price bounds (client-side; the site's price filter is robots-disallowed).\n- `conditionMin` — minimum condition rank 2–6 (6 = 新品、未使用, 5 = 未使用に近い, 4 = 目立った傷や汚れなし, 3 = やや傷や汚れあり, 2 = 傷や汚れあり). Needs the item page, so it turns on enrichDetail.\n- `status` — `on_sale` (default), `sold` (sold-out listings only — price research), `all`.\n- `excludeWords` — drop items whose title contains any of these (client-side).\n- `sellerId` — keep only one seller's items (client-side).\n\nA keyword combined with a brand or category runs the keyword search and filters the cards by brand / category client-side (the site's brand_id / category_id query parameters are robots-disallowed). Without a keyword the brand page, brand × category page or category page is crawled directly.\n\nValues set here override the defaults below.",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "type": "string",
                  "title": "Keyword",
                  "description": "Free-text search."
                },
                "brand": {
                  "type": "string",
                  "title": "Brand",
                  "description": "Brand name, resolved to the site's brand id."
                },
                "brandId": {
                  "type": "string",
                  "title": "Brand id",
                  "description": "The site's brand id as a string (\"1785\" = KAPITAL)."
                },
                "categoryPath": {
                  "type": "string",
                  "title": "Category path",
                  "description": "`mens`, `ladies > バッグ`, `mens > jackets > denim jacket` …"
                },
                "categoryId": {
                  "type": "string",
                  "title": "Category id",
                  "description": "The site's category id as a string (\"542\" = Gジャン/デニムジャケット)."
                },
                "priceMinJpy": {
                  "type": "integer",
                  "title": "Min price (JPY)",
                  "description": "Lower price bound (client-side).",
                  "minimum": 0
                },
                "priceMaxJpy": {
                  "type": "integer",
                  "title": "Max price (JPY)",
                  "description": "Upper price bound (client-side).",
                  "minimum": 0
                },
                "conditionMin": {
                  "type": "integer",
                  "title": "Min condition rank",
                  "description": "6 新品、未使用 … 2 傷や汚れあり (needs item pages).",
                  "minimum": 2,
                  "maximum": 6
                },
                "status": {
                  "type": "string",
                  "title": "Status",
                  "description": "on_sale | sold | all."
                },
                "excludeWords": {
                  "type": "array",
                  "title": "Exclude words",
                  "description": "Drop items whose title contains any of these.",
                  "items": {
                    "type": "string"
                  }
                },
                "sellerId": {
                  "type": "string",
                  "title": "Seller id",
                  "description": "Keep only this seller's items (client-side)."
                }
              }
            },
            "default": []
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "items",
              "summary",
              "both"
            ],
            "type": "string",
            "description": "`items` (default): one dataset row per listing. `summary`: one market-summary row per search instead of the listings — sample size, price min / p25 / median / mean / p75 / max, price histogram, status / condition-rank / size / brand / category breakdowns, cheapest listings — billed once per search as the `summary` event (the sampled listings are not billed). `both`: listings plus the summary row.",
            "default": "items"
          },
          "status": {
            "title": "Default status",
            "enum": [
              "on_sale",
              "sold",
              "all"
            ],
            "type": "string",
            "description": "Applied to every search without its own `status`. `sold` returns sold-out listings with their last price (price research); the site shows them in the same listing.",
            "default": "on_sale"
          },
          "priceMinJpy": {
            "title": "Default min price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower price bound for every search without its own `priceMinJpy` (client-side)."
          },
          "priceMaxJpy": {
            "title": "Default max price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper price bound for every search without its own `priceMaxJpy` (client-side)."
          },
          "conditionMin": {
            "title": "Default min condition rank",
            "minimum": 2,
            "maximum": 6,
            "type": "integer",
            "description": "Only listings with this condition rank or better: 6 新品、未使用, 5 未使用に近い, 4 目立った傷や汚れなし, 3 やや傷や汚れあり, 2 傷や汚れあり. The condition is only on the item page, so this turns on item-page enrichment. Leave empty for all."
          },
          "excludeWords": {
            "title": "Default exclude words (client-side)",
            "type": "array",
            "description": "Drop items whose title contains any of these words (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSearch": {
            "title": "Max items per search",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Stop after this many listings for each keyword / search. The site shows 40 listings per page, up to 100 pages.",
            "default": 100
          },
          "maxTotalItems": {
            "title": "Max total items",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on listings saved in this run across all searches. Leave empty for no cap (Max total charge still applies)."
          },
          "dedupeAcrossSearches": {
            "title": "Deduplicate across searches",
            "type": "boolean",
            "description": "Save a listing only once when several searches return it.",
            "default": true
          },
          "enrichDetail": {
            "title": "Enrich with item pages",
            "type": "boolean",
            "description": "Open each item page for condition, size, shipping (payer, method, days, prefecture), seller (name, shop, review counts), likes, comments, description, full category path and the full-size gallery. One extra request and one `detail-page` event per item.",
            "default": false
          },
          "maxDetailPages": {
            "title": "Max item pages per run",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on item-page requests per run. Items beyond the cap are returned without detail fields.",
            "default": 100
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum pause between requests. Please keep ≥ 2000.",
            "default": 2000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy or your own proxies. Not needed under normal use."
          },
          "outputFields": {
            "title": "Output fields",
            "type": "array",
            "description": "Keep only these top-level fields in the output (`itemId` and `url` are always kept). Leave empty for all fields.",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}