{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Japan Scraper – Listings & Sold Prices (メルカリ)",
    "description": "Scrape Mercari Japan (jp.mercari.com, メルカリ): search by keyword, category, brand, seller, price, condition and status — including SOLD items for price history. Normalized JSON (price JPY, size, condition rank, images), optional item details. No browser, no login. JP Data Works series.",
    "version": "0.2",
    "x-build-id": "WAV3p31IMZTMhQCXs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tokyo-select-jp~mercari-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tokyo-select-jp-mercari-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~mercari-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tokyo-select-jp-mercari-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~mercari-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tokyo-select-jp-mercari-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 デニム`, `visvim`, `ポケモンカード リザードン`). 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`, `categoryId`, `brandId`, `sellerId`.\n\n- `keyword`, `excludeKeyword` — free text (the site's search box / exclude box).\n- `status` — `on_sale` (default), `sold` (sold out + in trading = price history), `trading`, `all`.\n- `categoryId`, `brandId`, `sizeId`, `sellerId` — lists of Mercari ids. Find them in the site's URL after filtering, e.g. `category_id=1191`, `brand_id=9174`.\n- `priceMinJpy` / `priceMaxJpy` — price bounds in JPY.\n- `conditionMin` — minimum condition rank 1–6 (6 = 新品、未使用 … 1 = 全体的に状態が悪い), or `conditionIds` — Mercari condition ids 1 (new) … 6 (poor).\n- `shippingPayer` — `seller` (送料込み), `buyer` (着払い), `any`.\n- `sort` — `relevance` (default), `newest`, `priceAsc`, `priceDesc`, `likes`.\n- `createdAfter` / `createdBefore` — ISO date or epoch seconds; only items listed in that window.\n- `excludeWords` — drop items whose title contains any of these (client-side).\n- `itemType` — `any` (default), `mercari` (C2C listings only), `shops` (Mercari Shops products only).\n\nValues set here override the defaults below.",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "type": "string",
                  "title": "Keyword",
                  "description": "Free-text search."
                },
                "excludeKeyword": {
                  "type": "string",
                  "title": "Exclude keyword",
                  "description": "Words to exclude (site-side)."
                },
                "status": {
                  "type": "string",
                  "title": "Status",
                  "description": "on_sale (default), sold, trading, all.",
                  "enum": [
                    "on_sale",
                    "sold",
                    "trading",
                    "all"
                  ]
                },
                "categoryId": {
                  "type": "array",
                  "title": "Category id(s)",
                  "description": "Mercari category id, e.g. 1191 = メンズ > パンツ > デニム/ジーンズ.",
                  "items": {
                    "type": "integer"
                  }
                },
                "brandId": {
                  "type": "array",
                  "title": "Brand id(s)",
                  "description": "Mercari brand id, e.g. 9174 = KAPITAL.",
                  "items": {
                    "type": "integer"
                  }
                },
                "sizeId": {
                  "type": "array",
                  "title": "Size id(s)",
                  "description": "Mercari size id.",
                  "items": {
                    "type": "integer"
                  }
                },
                "sellerId": {
                  "type": "array",
                  "title": "Seller id(s)",
                  "description": "Mercari seller (user) id — list one seller's items.",
                  "items": {
                    "type": "integer"
                  }
                },
                "priceMinJpy": {
                  "type": "integer",
                  "title": "Min price (JPY)",
                  "minimum": 0,
                  "description": "Lower price bound in JPY."
                },
                "priceMaxJpy": {
                  "type": "integer",
                  "title": "Max price (JPY)",
                  "minimum": 0,
                  "description": "Upper price bound in JPY."
                },
                "conditionMin": {
                  "type": "integer",
                  "title": "Min condition rank",
                  "description": "6 = 新品、未使用, 5 = 未使用に近い, 4 = 目立った傷や汚れなし, 3 = やや傷や汚れあり, 2 = 傷や汚れあり, 1 = all.",
                  "minimum": 1,
                  "maximum": 6
                },
                "conditionIds": {
                  "type": "array",
                  "title": "Condition ids",
                  "description": "Mercari condition ids 1 (new) … 6 (poor); overrides conditionMin.",
                  "items": {
                    "type": "integer"
                  }
                },
                "shippingPayer": {
                  "type": "string",
                  "title": "Shipping payer",
                  "enum": [
                    "seller",
                    "buyer",
                    "any"
                  ],
                  "description": "seller = 送料込み (seller pays shipping), buyer = 着払い, any."
                },
                "sort": {
                  "type": "string",
                  "title": "Sort",
                  "enum": [
                    "relevance",
                    "newest",
                    "priceAsc",
                    "priceDesc",
                    "likes"
                  ],
                  "description": "relevance (default), newest, priceAsc, priceDesc, likes."
                },
                "createdAfter": {
                  "type": "string",
                  "title": "Created after",
                  "description": "ISO date/time (2026-11-01) or epoch seconds."
                },
                "createdBefore": {
                  "type": "string",
                  "title": "Created before",
                  "description": "ISO date/time or epoch seconds."
                },
                "excludeWords": {
                  "type": "array",
                  "title": "Exclude words (client-side)",
                  "items": {
                    "type": "string"
                  },
                  "description": "Drop items whose title contains any of these words (case-insensitive)."
                },
                "itemType": {
                  "type": "string",
                  "title": "Item type",
                  "enum": [
                    "any",
                    "mercari",
                    "shops"
                  ],
                  "description": "any (default), mercari = C2C listings only, shops = Mercari Shops products only."
                }
              }
            },
            "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",
              "trading",
              "all"
            ],
            "type": "string",
            "description": "Applied to every keyword / search without its own `status`. `sold` returns sold-out and in-trading items — use it for sold price history.",
            "default": "on_sale"
          },
          "sort": {
            "title": "Default sort order",
            "enum": [
              "relevance",
              "newest",
              "priceAsc",
              "priceDesc",
              "likes"
            ],
            "type": "string",
            "description": "Applied to every keyword / search without its own `sort`.",
            "default": "relevance"
          },
          "priceMinJpy": {
            "title": "Default min price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower price bound for every search without its own `priceMinJpy`."
          },
          "priceMaxJpy": {
            "title": "Default max price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper price bound for every search without its own `priceMaxJpy`."
          },
          "conditionMin": {
            "title": "Default min condition rank",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Only listings with this condition rank or better: 6 新品、未使用, 5 未使用に近い, 4 目立った傷や汚れなし, 3 やや傷や汚れあり, 2 傷や汚れあり, 1 全体的に状態が悪い. Leave empty for all."
          },
          "createdAfter": {
            "title": "Default created after",
            "type": "string",
            "description": "Only items listed after this date/time (ISO, e.g. 2026-11-01, or epoch seconds). Combine with a schedule to collect new listings or new sales incrementally."
          },
          "excludeWords": {
            "title": "Default exclude words (client-side)",
            "type": "array",
            "description": "Drop items whose title contains any of these words (case-insensitive), e.g. レプリカ, 偽物, ジャンク.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "itemType": {
            "title": "Item type",
            "enum": [
              "any",
              "mercari",
              "shops"
            ],
            "type": "string",
            "description": "`mercari` = individual (C2C) listings only, `shops` = Mercari Shops products only, `any` = both.",
            "default": "any"
          },
          "maxItemsPerSearch": {
            "title": "Max items per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many listings for each keyword / search (up to 120 per API page).",
            "default": 120
          },
          "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 details",
            "type": "boolean",
            "description": "Fetch each C2C item's detail (description, category path, colour, shipping method / payer / origin / duration, likes, comments, seller ratings, attributes, all photos). One extra request and one `detail-page` event per item. Mercari Shops products are returned without detail.",
            "default": false
          },
          "maxDetailPages": {
            "title": "Max item details per run",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on item detail requests per run. Items beyond the cap are returned without detail fields.",
            "default": 100
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 500,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum pause between API requests. Keep ≥ 2000 to stay polite; raise it if you see rate limiting.",
            "default": 2000
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Hits per API page (max 120). Smaller pages = more requests.",
            "default": 120
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Direct connections work under normal use; switch to Apify Proxy (residential, country JP) or your own proxy URLs if the API starts returning 403 / 429."
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}