{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Listings Scraper",
    "description": "The Mercari Listings Scraper extracts product listings from Mercari Japan's marketplace, capturing item names, prices, statuses, thumbnails, brands, and seller details. Ideal for resale market analysis, price tracking, and competitor research across Japan's largest C2C marketplace.",
    "version": "0.0",
    "x-build-id": "GVlOa6fYo7wdgr2Aj"
  },
  "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 to search for on Mercari (supports English and Japanese). Required unless seller profile URLs are given."
          },
          "categoryId": {
            "title": "Category ID",
            "type": "integer",
            "description": "Mercari category ID to filter results. Leave empty for all categories."
          },
          "brandId": {
            "title": "Brand ID",
            "type": "integer",
            "description": "Mercari brand ID to filter results."
          },
          "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=Seller, 2=Buyer).",
            "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": "Filter by item status.",
            "items": {
              "type": "string"
            },
            "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 items to scrape.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}