{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Japan Scraper: Listings, Sold Prices and Sellers",
    "description": "Scrape Mercari Japan listings by keyword, category, brand, seller or link: price in yen, on sale or sold, condition, brand, shipping, seller name and rating, likes, description, photos and link. Sold price comps. No login.",
    "version": "0.1",
    "x-build-id": "tmpbXcknkUFWmP9cZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~mercari-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~mercari-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~mercari-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-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": {
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "What to search for, one per line, in Japanese or English, as you would type it in the Mercari search box. Example: nintendo switch, ポケモンカード, ルイヴィトン 財布. Each keyword is one search. Up to 100 searches per run.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Mercari links (optional)",
            "type": "array",
            "description": "Links copied from jp.mercari.com: search results (https://jp.mercari.com/search?keyword=iphone&status=sold_out%7Ctrading), which keep every filter in the link; category or brand pages; item pages (https://jp.mercari.com/item/m12345678901); Mercari Shops products (https://jp.mercari.com/shops/product/<id>); a seller profile (https://jp.mercari.com/user/profile/<id>) for that seller's listings; or a shop (https://jp.mercari.com/shops/profile/<id>). Bare item ids such as m12345678901 work too.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "on_sale",
              "sold",
              "all"
            ],
            "type": "string",
            "description": "On sale only, sold only (sold out and in trade, for sold price comps) or everything. Applies to keyword and category searches; a pasted link keeps its own status.",
            "default": "on_sale"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "price_low",
              "price_high",
              "most_liked"
            ],
            "type": "string",
            "description": "Order of the results, as on Mercari. Newest first follows Mercari's own order (last update, so relisted and price cut items come first).",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or above this, in yen."
          },
          "maxPrice": {
            "title": "Maximum price (JPY)",
            "minimum": 1,
            "type": "integer",
            "description": "Only listings priced at or below this, in yen."
          },
          "condition": {
            "title": "Condition",
            "type": "array",
            "description": "Only listings in these conditions. Empty means any condition.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "like_new",
                "good",
                "fair",
                "poor",
                "bad"
              ],
              "enumTitles": [
                "New, unused",
                "Like new",
                "No noticeable scratches or stains",
                "Some scratches or stains",
                "Scratches or stains",
                "Poor condition overall"
              ]
            }
          },
          "shippingPaidBy": {
            "title": "Shipping",
            "enum": [
              "any",
              "seller",
              "buyer"
            ],
            "type": "string",
            "description": "Only listings where shipping is included (the seller pays) or where the buyer pays it.",
            "default": "any"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "individual",
              "shops"
            ],
            "type": "string",
            "description": "Only listings from individual sellers, or only from Mercari Shops (business sellers).",
            "default": "any"
          },
          "categoryIds": {
            "title": "Category ids (optional)",
            "type": "array",
            "description": "Mercari category ids, from the category_id column of a previous run or the category_id in a Mercari search link. Examples: 702 Nintendo Switch games, 7002 Nintendo Switch, 1 Ladies fashion. With no keyword, the whole category is listed.",
            "items": {
              "type": "string"
            }
          },
          "brandIds": {
            "title": "Brand ids (optional)",
            "type": "array",
            "description": "Mercari brand ids, from the brand_id column of a previous run or the brand_id in a Mercari search link. Example: 7572 Nintendo Switch. With no keyword and no category, the whole brand is listed.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude words",
            "type": "string",
            "description": "Leave out listings with any of these words, separated by spaces, like Mercari's own exclude filter. Example: ジャンク 箱のみ (junk, box only)."
          },
          "maxItems": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most listings to return for each keyword, category or link, 1 to 10,000. A results page holds up to 120 listings; Mercari serves about 10,000 per search at most.",
            "default": 100
          },
          "includeDetails": {
            "title": "Read each listing's details (seller name and rating, likes, description)",
            "type": "boolean",
            "description": "On: each listing's own record is read too, for the seller name, star rating and number of ratings, likes, comments, description, category names, shipping method, ship from prefecture, days to ship and every photo. Off: rows come from the search results only, which is faster. Same price either way.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}