{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Japan Scraper",
    "description": "Scrape Mercari Japan (メルカリ) listings without login: search by keyword or link with price, status (on sale or sold), condition, category and brand filters, or read full item pages. Price in JPY, condition, photos, shipping and description. Error rows are free.",
    "version": "0.1",
    "x-build-id": "hMwEy4abLQRzVHfX4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~mercari-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-mercari-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/scrapewise~mercari-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-mercari-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/scrapewise~mercari-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-mercari-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "item"
            ],
            "type": "string",
            "description": "search: run Mercari searches from keywords or search links and return every listing. item: read the full page of each item link (description, category path, shipping, likes).",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Mercari Japan, one per line. Japanese and English both work (for example ポケモンカード, nintendo switch, supreme). Each term is a separate search. Also accepts 'keyword', 'keywords' or 'queries' from other Mercari scrapers.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Mercari links",
            "type": "array",
            "description": "Mercari Japan links, one per line: search or category pages (jp.mercari.com/search?keyword=...&status=sold_out, with their filters) or item pages (jp.mercari.com/item/m12345678901). Plain item ids such as m12345678901 also work. In item mode, put the item links here.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSearch": {
            "title": "Max items per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each search after this many listings. Mercari serves 120 per page and about 12,000 per search. 0 = as many as Mercari shows.",
            "default": 120
          },
          "status": {
            "title": "Status",
            "enum": [
              "onSale",
              "sold",
              "all"
            ],
            "type": "string",
            "description": "On sale only, sold only (sold and in-transaction listings, for price research), or both.",
            "default": "onSale"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "bestMatch",
              "newest",
              "priceLowToHigh",
              "priceHighToLow",
              "mostLiked"
            ],
            "type": "string",
            "description": "Mercari's own orders. With a per-search limit it also decides which listings you get.",
            "default": "bestMatch"
          },
          "minPrice": {
            "title": "Minimum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or above this price in yen."
          },
          "maxPrice": {
            "title": "Maximum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or below this price in yen."
          },
          "itemCondition": {
            "title": "Condition",
            "type": "array",
            "description": "Only these conditions. Empty = any condition.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "likeNew",
                "noNoticeableWear",
                "someWear",
                "visibleWear",
                "poor"
              ],
              "enumTitles": [
                "New, unused",
                "Like new",
                "No noticeable scratches or stains",
                "Some scratches or stains",
                "Scratches or stains",
                "Poor overall condition"
              ]
            }
          },
          "categoryIds": {
            "title": "Category ids",
            "type": "array",
            "description": "Numeric Mercari category ids, as in category_id=701 in a Mercari search link. Empty = every category.",
            "items": {
              "type": "string"
            }
          },
          "brandIds": {
            "title": "Brand ids",
            "type": "array",
            "description": "Numeric Mercari brand ids, as in brand_id=15487 in a Mercari search link. Empty = every brand.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeyword": {
            "title": "Exclude keyword",
            "type": "string",
            "description": "Mercari drops listings that match this word (for example ジャンク to skip junk)."
          },
          "shippingPaidBy": {
            "title": "Shipping paid by",
            "enum": [
              "any",
              "seller",
              "buyer"
            ],
            "type": "string",
            "description": "Only listings where shipping is included (seller pays) or paid on delivery (buyer pays).",
            "default": "any"
          },
          "includeDetails": {
            "title": "Full item pages in search",
            "type": "boolean",
            "description": "Also read each listing's full page: description, category path, shipping method and days, likes, colors. Same price per item, slower runs.",
            "default": false
          },
          "includeShopItems": {
            "title": "Include Mercari Shops",
            "type": "boolean",
            "description": "Keep listings from Mercari Shops (business sellers) that appear in the search. Off = only regular Mercari listings.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The default Apify Proxy (datacenter) works; tested with 15 pages in a row from three datacenter IPs without a block.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}