{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Scraper - Listings, Sold Comps, Sellers",
    "description": "Scrape Mercari (Mercari Japan) listings, sold prices, item details, and seller profiles. Search by keyword, category, or brand, pull sold comps for resale pricing, and get likes, comments, ratings, and English translation. Pay per result, no subscription.",
    "version": "0.0",
    "x-build-id": "570Hz71OOVRSl20ft"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~mercari-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-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/sourabhbgp~mercari-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-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/sourabhbgp~mercari-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "item",
              "seller"
            ],
            "type": "string",
            "description": "What to scrape.",
            "default": "search"
          },
          "keyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Keyword for search mode.",
            "default": "nike"
          },
          "startUrls": {
            "title": "Search / category / brand URLs",
            "type": "array",
            "description": "Mercari JP search, category, or brand URLs (search mode).",
            "items": {
              "type": "string"
            }
          },
          "itemUrls": {
            "title": "Item URLs or IDs",
            "type": "array",
            "description": "Mercari JP item URLs or IDs (item mode).",
            "items": {
              "type": "string"
            }
          },
          "sellerUrls": {
            "title": "Seller URLs or IDs",
            "type": "array",
            "description": "Mercari JP seller profile URLs or numeric IDs (seller mode).",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Listing status",
            "enum": [
              "on_sale",
              "sold_out",
              "all"
            ],
            "type": "string",
            "description": "Filter by status. Use sold_out for sold comps.",
            "default": "on_sale"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "score",
              "created",
              "price",
              "likes"
            ],
            "type": "string",
            "description": "Sort order for search results.",
            "default": "score"
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Ascending or descending.",
            "default": "desc"
          },
          "priceMin": {
            "title": "Min price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price filter in Japanese yen."
          },
          "priceMax": {
            "title": "Max price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter in Japanese yen."
          },
          "categoryId": {
            "title": "Category IDs",
            "type": "array",
            "description": "Filter search by Mercari category IDs.",
            "items": {
              "type": "string"
            }
          },
          "brandId": {
            "title": "Brand IDs",
            "type": "array",
            "description": "Filter search by Mercari brand IDs.",
            "items": {
              "type": "string"
            }
          },
          "itemConditionId": {
            "title": "Condition IDs (1-6)",
            "type": "array",
            "description": "Filter by item condition IDs, 1 (new) to 6 (poor).",
            "items": {
              "type": "string"
            }
          },
          "shippingPayerId": {
            "title": "Shipping payer IDs (1-2)",
            "type": "array",
            "description": "Filter by who pays shipping: 1 seller, 2 buyer.",
            "items": {
              "type": "string"
            }
          },
          "sizeId": {
            "title": "Size IDs",
            "type": "array",
            "description": "Filter search by Mercari size IDs.",
            "items": {
              "type": "string"
            }
          },
          "includeListings": {
            "title": "Include seller listings",
            "type": "boolean",
            "description": "Seller mode: also fetch the seller's items.",
            "default": true
          },
          "listingStatus": {
            "title": "Seller listing status",
            "enum": [
              "active",
              "sold",
              "both"
            ],
            "type": "string",
            "description": "Which seller listings to fetch.",
            "default": "active"
          },
          "maxItemsPerSeller": {
            "title": "Max items per seller",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on listings fetched per seller (max 120 per status).",
            "default": 50
          },
          "includeTranslation": {
            "title": "Include English translation",
            "type": "boolean",
            "description": "Item mode: add EN title/description.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum records to return for the run.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Parallel requests: item URLs, sellers, and search URLs run concurrently up to this limit.",
            "default": 8
          },
          "useResidentialProxy": {
            "title": "Use residential proxy fallback",
            "type": "boolean",
            "description": "Escalate to JP residential on failure. Not normally needed.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}