{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Scraper — Japan & US Listings, Prices & Sold Items",
    "description": "Scrape Mercari Japan (jp.mercari.com) and Mercari US listings by keyword or search URL: price, sold status, condition, brand, size, seller, photos; optional full item details.",
    "version": "0.1",
    "x-build-id": "FE3qEMde7WACETMuD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~mercari-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-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/tortuga~mercari-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-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/tortuga~mercari-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-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": {
          "market": {
            "title": "Market",
            "enum": [
              "jp",
              "us"
            ],
            "type": "string",
            "description": "Which Mercari to search with the search terms: Mercari Japan (jp.mercari.com, prices in JPY) or Mercari US (mercari.com, prices in USD). Start URLs always use the market of their own domain.",
            "default": "jp"
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords as you would type them into the Mercari search box, one search per line, e.g. \"ポケモンカード\", \"nintendo switch\", \"chanel bag\". Japanese and English keywords both work on Mercari Japan.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Alternative to search terms: Mercari search pages with any filters set in the browser (https://jp.mercari.com/search?keyword=...&status=on_sale, https://www.mercari.com/search/?keyword=...&itemStatuses=1) or single item pages (https://jp.mercari.com/item/m12345678901, https://jp.mercari.com/shops/product/..., https://www.mercari.com/us/item/m12345678901/), which are returned with full details.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "all",
              "on_sale",
              "sold"
            ],
            "type": "string",
            "description": "Used with the search terms: all listings (as Mercari shows them by default), only items on sale, or only sold items (sold out or in a transaction). Keep 'All' for monitoring so listings that sell are reported as changes.",
            "default": "all"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "newest",
              "price_asc",
              "price_desc",
              "relevance",
              "likes"
            ],
            "type": "string",
            "description": "Used with the search terms. Newest first is the best choice for monitoring new listings.",
            "default": "newest"
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Used with the search terms. In yen on Mercari Japan, in dollars on Mercari US."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Used with the search terms. In yen on Mercari Japan, in dollars on Mercari US."
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Used with the search terms: only these item conditions. Mercari Japan: New/unused, Like new, No noticeable scratches (Good), Some scratches (Fair), Scratches or stains (Poor), Poor condition (Bad). Mercari US has the first five. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "like_new",
                "good",
                "fair",
                "poor",
                "bad"
              ],
              "enumTitles": [
                "New / unused",
                "Like new",
                "Good (no noticeable scratches)",
                "Fair (some scratches)",
                "Poor (scratches or stains)",
                "Bad (Japan only)"
              ]
            }
          },
          "categoryIds": {
            "title": "Category IDs",
            "type": "string",
            "description": "Used with the search terms: one or more Mercari category ids, comma-separated. Take them from a Mercari URL: category_id=1289 on jp.mercari.com (Pokémon cards), categoryIds=84 on mercari.com (Video games & consoles). With no search term, the category is browsed."
          },
          "brandIds": {
            "title": "Brand IDs",
            "type": "string",
            "description": "Used with the search terms: one or more Mercari brand ids, comma-separated, as in a Mercari URL (brand_id=... on jp.mercari.com, brandIds=... on mercari.com)."
          },
          "sizeIds": {
            "title": "Size IDs",
            "type": "string",
            "description": "Used with the search terms: one or more Mercari size ids, comma-separated, as in a Mercari URL (size_id=... on jp.mercari.com, sizeIds=... on mercari.com)."
          },
          "excludeKeyword": {
            "title": "Exclude keywords (Japan)",
            "type": "string",
            "description": "Mercari Japan only: leave out listings that contain these words, e.g. \"ジャンク\" (junk) or \"空箱\" (empty box)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many listings in total (across all searches). Keeps cost predictable. Mercari serves at most 12,000 listings per search on Mercari Japan and 1,000 on Mercari US; split big searches by price range or category to get more.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max items per search",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap for each search term or search URL, so one busy search does not use up Max items for the others (e.g. 50 newest listings for each of 10 keywords). Empty = no per-search cap."
          },
          "includeDetails": {
            "title": "Include item details",
            "type": "boolean",
            "description": "Also open every item page for the full description, all photos, seller name and rating, likes, comments (Japan), ship-from area, shipping duration or fee and item attributes. One extra request per listing; charged as an extra 'detail' event (see pricing).",
            "default": false
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only new items or items whose price/status changed (new listings, price drops, auction bids, items that sold). Use with a Schedule; unchanged items are not charged. With this on, Max items is the number of listings checked per run (e.g. the newest 100).",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) works for both Mercari Japan and Mercari US and is the default; no residential proxy is needed.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}