{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Japan Scraper | Listings, Prices & Sold Items",
    "description": "Scrape Mercari Japan listings, prices and sold items by keyword, pasted search URL or seller. Photos, brand, condition, seller or shop, with optional full item details and seller profiles.",
    "version": "0.0",
    "x-build-id": "0vYcgZV9dcq7M9CRY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piotrv1001~mercari-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piotrv1001-mercari-listings-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/piotrv1001~mercari-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-piotrv1001-mercari-listings-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/piotrv1001~mercari-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-piotrv1001-mercari-listings-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": {
          "keyword": {
            "title": "Search Keyword",
            "type": "string",
            "description": "Keyword as you would type it on Mercari Japan (English or Japanese). Add more in \"More keywords\" or paste search URLs instead. Empty input runs an example search."
          },
          "keywords": {
            "title": "More keywords",
            "type": "array",
            "description": "Extra keywords, one search each (a line with commas is split into several; a thousands comma like 10,000mAh is kept), with the same filters and Max items per search. A listing found by two keywords is saved and charged once.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Mercari search URLs",
            "type": "array",
            "description": "Paste jp.mercari.com links: search results (e.g. https://jp.mercari.com/search?keyword=switch&status=sold_out%7Ctrading&sort=price&order=asc keeps every filter you set on the site: category, brand, condition, price, sold, shipping, sort, excluded words), item pages (saved with full details), seller profiles or Mercari Shops shop pages. The filter fields below apply to keywords only. Clear the keyword field if you only want the URLs.",
            "items": {
              "type": "object"
            }
          },
          "excludeKeyword": {
            "title": "Exclude words",
            "type": "string",
            "description": "Leave out listings whose title or description contains any of these words (space-separated), as the site's \"除外キーワード\" filter. Applies to keywords and filter-only searches."
          },
          "categoryId": {
            "title": "Category ID",
            "type": "integer",
            "description": "Mercari category ID. Leave the keyword empty to list the whole category. Easier: filter on jp.mercari.com and paste the search URL above."
          },
          "brandId": {
            "title": "Brand ID",
            "type": "integer",
            "description": "Mercari brand ID. Leave the keyword empty to list the whole brand. Easier: filter on jp.mercari.com and paste the search URL above."
          },
          "itemConditionId": {
            "title": "Item Condition IDs",
            "type": "array",
            "description": "Filter by item condition (1=New, 2=Like New, 3=Good, 4=Fair, 5=Poor, 6=Bad).",
            "items": {
              "type": "integer"
            }
          },
          "shippingPayerId": {
            "title": "Shipping Payer IDs",
            "type": "array",
            "description": "Filter by who pays shipping (1 = Buyer pays, 2 = Seller pays / shipping included).",
            "items": {
              "type": "integer"
            }
          },
          "priceMin": {
            "title": "Minimum Price (¥)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in JPY."
          },
          "priceMax": {
            "title": "Maximum Price (¥)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in JPY. Set to 0 for no limit."
          },
          "itemStatus": {
            "title": "Item Status",
            "type": "array",
            "description": "On sale, in trade (sold, awaiting delivery), sold out, or any combination, used exactly as selected. For everything that has sold pick both In trade and Sold out. Select all three for every status.",
            "items": {
              "type": "string",
              "enum": [
                "STATUS_ON_SALE",
                "STATUS_TRADING",
                "STATUS_SOLD_OUT"
              ],
              "enumTitles": [
                "On sale",
                "In trade",
                "Sold out"
              ]
            },
            "default": [
              "STATUS_ON_SALE"
            ]
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "SORT_CREATED_TIME",
              "SORT_PRICE",
              "SORT_NUM_LIKES",
              "SORT_SCORE"
            ],
            "type": "string",
            "description": "Sort order for results.",
            "default": "SORT_CREATED_TIME"
          },
          "sortOrder": {
            "title": "Sort Direction",
            "enum": [
              "ORDER_DESC",
              "ORDER_ASC"
            ],
            "type": "string",
            "description": "Sort direction.",
            "default": "ORDER_DESC"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 15000,
            "type": "integer",
            "description": "Maximum number of listings to save per keyword or search URL.",
            "default": 100
          },
          "sellerUrls": {
            "title": "Seller profile URLs or IDs",
            "type": "array",
            "description": "Mercari Japan seller profiles, e.g. https://jp.mercari.com/user/profile/377235154 or just 377235154. When set, the Actor scrapes these sellers' listings (and profiles) instead of running a keyword search. Max 100 sellers per run.",
            "items": {
              "type": "string"
            }
          },
          "inventoryScope": {
            "title": "Seller inventory scope",
            "enum": [
              "on_sale",
              "all_public"
            ],
            "type": "string",
            "description": "Which of each seller's public listings to return.",
            "default": "on_sale"
          },
          "maxItemsPerSeller": {
            "title": "Max listings per seller",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop each seller's inventory after this many listings. 0 = profile only.",
            "default": 100
          },
          "includeSellerProfiles": {
            "title": "Include seller profiles",
            "type": "boolean",
            "description": "Add one profile row per seller: ratings, star score, identity-verified badge, reported listing count, followers and whether the inventory walk reached the end. Charged as a separate seller-profile event.",
            "default": true
          },
          "fetchItemDetails": {
            "title": "Fetch Item Details",
            "type": "boolean",
            "description": "Whether to fetch full item details (description, seller info, high-res photos). Slower but more 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}